/** * Create an instance of {@link PropertyConstraintType } * */ public PropertyConstraintType createPropertyConstraintType() { return new PropertyConstraintType(); }
public PropertyConstraintType clone() { PropertyConstraintType object = new PropertyConstraintType(); PrismContainerValue value = asPrismContainerValue().clone(); object.setupContainerValue(value); return object; }
public PropertyConstraintType oidBound(Boolean value) { setOidBound(value); return this; }
@Override protected PropertyConstraintType createItem(PrismContainerValue value) { PropertyConstraintType propertyConstraint = new PropertyConstraintType(); propertyConstraint.setupContainerValue(value); return propertyConstraint; }
private <O extends ObjectType> void applyObjectPolicy(LensFocusContext<O> focusContext, ObjectDelta<O> focusDelta, ObjectPolicyConfigurationType objectPolicyConfigurationType) { if (objectPolicyConfigurationType == null) { return; } PrismObject<O> objectNew = focusContext.getObjectNew(); if (focusDelta.isAdd() && objectNew.getOid() == null) { for (PropertyConstraintType propertyConstraintType : objectPolicyConfigurationType .getPropertyConstraint()) { if (BooleanUtils.isTrue(propertyConstraintType.isOidBound())) { ItemPath itemPath = propertyConstraintType.getPath().getItemPath(); PrismProperty<Object> prop = objectNew.findProperty(itemPath); String stringValue = prop.getRealValue().toString(); focusContext.setOid(stringValue); } } // deprecated if (BooleanUtils.isTrue(objectPolicyConfigurationType.isOidNameBoundMode())) { String name = objectNew.asObjectable().getName().getOrig(); focusContext.setOid(name); } } }
@Override protected PrismContainerValue getValueFrom(PropertyConstraintType value) { return value.asPrismContainerValue(); }
public PropertyConstraintType path(ItemPathType value) { setPath(value); return this; }
public ItemPathType beginPath() { ItemPathType value = new ItemPathType(); path(value); return value; }
public PropertyConstraintType(PrismContext prismContext) { setupContainerValue(new PrismContainerValueImpl<>(this, prismContext)); }
ItemPath itemPath = propertyConstraintType.getPath().getItemPath(); if (BooleanUtils.isTrue(propertyConstraintType.isOidBound())) { if (focusDelta != null) { if (focusDelta.isAdd()) {
@Override public boolean equals(Object object) { if (!(object instanceof PropertyConstraintType)) { return false; } PropertyConstraintType other = ((PropertyConstraintType) object); return asPrismContainerValue().equivalent(other.asPrismContainerValue()); }
/** * Create an instance of {@link PropertyConstraintType } * */ public PropertyConstraintType createPropertyConstraintType() { return new PropertyConstraintType(); }
if (propertyConstraintType.getPath() == null) { LOGGER.error("Invalid configuration. Path is mandatory for property constraint definition in {} defined in system configuration", objectPolicyConfigurationType); throw new SchemaException("Invalid configuration. Path is mandatory for property constraint definition in " + objectPolicyConfigurationType + " defined in system configuration."); ItemPath itemPath = propertyConstraintType.getPath().getItemPath(); if (BooleanUtils.isTrue(propertyConstraintType.isOidBound())) { PrismProperty<Object> prop = focusNew.findProperty(itemPath); if (prop == null || prop.isEmpty()) {
@Override public String toString() { return asPrismContainerValue().toString(); }
/** * Create an instance of {@link PropertyConstraintType } * */ public PropertyConstraintType createPropertyConstraintType() { return new PropertyConstraintType(); }
@XmlElement(required = true, name = "path") public ItemPathType getPath() { return PrismForJAXBUtil.getPropertyValue(asPrismContainerValue(), F_PATH, ItemPathType.class); }
public PropertyConstraintType beginPropertyConstraint() { PropertyConstraintType value = new PropertyConstraintType(); propertyConstraint(value); return value; }
@Override public int hashCode() { return asPrismContainerValue().hashCode(); }
public PropertyConstraintType beginPropertyConstraint() { PropertyConstraintType value = new PropertyConstraintType(); propertyConstraint(value); return value; }
@XmlElement(defaultValue = "false", name = "oidBound") public Boolean isOidBound() { return PrismForJAXBUtil.getPropertyValue(asPrismContainerValue(), F_OID_BOUND, Boolean.class); }