Beispiel #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;
 }
Beispiel #2
0
  public boolean isVisible() {
    if (property.getDefinition().isOperational()) {
      return false;
    }

    return container.isItemVisible(this);
  }
Beispiel #3
0
  private List<ValueWrapper> createValues() {
    List<ValueWrapper> values = new ArrayList<ValueWrapper>();

    for (PrismValue prismValue : (List<PrismValue>) property.getValues()) {
      values.add(new ValueWrapper(this, prismValue, ValueStatus.NOT_CHANGED));
    }

    int minOccurs = property.getDefinition().getMinOccurs();
    while (values.size() < minOccurs) {
      values.add(createAddedValue());
    }

    if (values.isEmpty()) {
      values.add(createAddedValue());
    }

    return values;
  }
Beispiel #4
0
  public ValueWrapper createAddedValue() {
    ItemDefinition definition = property.getDefinition();

    ValueWrapper wrapper;
    if (SchemaConstants.T_POLY_STRING_TYPE.equals(definition.getTypeName())) {
      wrapper =
          new ValueWrapper(
              this,
              new PrismPropertyValue(new PolyString("")),
              new PrismPropertyValue(new PolyString("")),
              ValueStatus.ADDED);
    } else if (isUser() && isThisPropertyActivationEnabled()) {
      wrapper =
          new ValueWrapper(
              this, new PrismPropertyValue(null), new PrismPropertyValue(null), ValueStatus.ADDED);
    } else {
      wrapper = new ValueWrapper(this, new PrismPropertyValue(null), ValueStatus.ADDED);
    }

    return wrapper;
  }
Beispiel #5
0
 public ItemDefinition getDefinition() {
   return property.getDefinition();
 }