@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; }
@Override public String getDisplayName() { if (StringUtils.isNotEmpty(displayName)) { return displayName; } return ContainerWrapper.getDisplayNameFromItem(property); }
public boolean isVisible() { if (property.getDefinition().isOperational()) { return false; } return container.isItemVisible(this); }
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; }
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(); }