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

    return container.isItemVisible(this);
  }
  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;
  }
  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;
  }
 public ItemDefinition getDefinition() {
   return property.getDefinition();
 }