Esempio n. 1
0
  private boolean isThisPropertyActivationEnabled() {
    if (!new ItemPath(UserType.F_ACTIVATION).equivalent(container.getPath())) {
      return false;
    }

    if (!ActivationType.F_ADMINISTRATIVE_STATUS.equals(property.getElementName())) {
      return false;
    }

    if (ContainerStatus.MODIFYING.equals(container.getObject().getStatus())) {
      // when modifying then we don't want to create "true" value for c:activation/c:enabled, only
      // during add
      return false;
    }

    return true;
  }
Esempio n. 2
0
  public PropertyWrapper(
      ContainerWrapper container, I property, boolean readonly, ValueStatus status) {
    Validate.notNull(property, "Property must not be null.");
    Validate.notNull(status, "Property status must not be null.");

    this.container = container;
    this.property = property;
    this.status = status;
    this.readonly = readonly;
    this.itemDefinition = getItemDefinition();

    ItemPath passwordPath =
        new ItemPath(SchemaConstantsGenerated.C_CREDENTIALS, CredentialsType.F_PASSWORD);
    if (passwordPath.equivalent(container.getPath())
        && PasswordType.F_VALUE.equals(property.getElementName())) {
      displayName = "prismPropertyPanel.name.credentials.password";
    }

    values = createValues();
  }