示例#1
0
 @Override
 public ItemDefinition getItemDefinition() {
   ItemDefinition propDef = null;
   if (container.getItemDefinition() != null) {
     propDef =
         container.getItemDefinition().findItemDefinition(property.getDefinition().getName());
   }
   if (propDef == null) {
     propDef = property.getDefinition();
   }
   return propDef;
 }
示例#2
0
 @Override
 public String getDisplayName() {
   if (StringUtils.isNotEmpty(displayName)) {
     return displayName;
   }
   return ContainerWrapper.getDisplayNameFromItem(property);
 }
示例#3
0
  public boolean isVisible() {
    if (property.getDefinition().isOperational()) {
      return false;
    }

    return container.isItemVisible(this);
  }
示例#4
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;
  }
示例#5
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();
  }