Example #1
0
  private boolean hasEmptyPlaceholder(
      ItemWrapper<? extends Item, ? extends ItemDefinition> property) {
    for (ValueWrapper value : property.getValues()) {
      value.normalize(property.getItemDefinition().getPrismContext());
      if (ValueStatus.ADDED.equals(value.getStatus()) && !value.hasValueChanged()) {
        return true;
      }
    }

    return false;
  }
Example #2
0
  private int countUsableValues(ItemWrapper<? extends Item, ? extends ItemDefinition> property) {
    int count = 0;
    for (ValueWrapper value : property.getValues()) {
      value.normalize(property.getItemDefinition().getPrismContext());

      if (ValueStatus.DELETED.equals(value.getStatus())) {
        continue;
      }

      if (ValueStatus.ADDED.equals(value.getStatus()) && !value.hasValueChanged()) {
        continue;
      }

      count++;
    }
    return count;
  }