public ObjectSynchronizationType objectClass(QName value) { getObjectClass().add(value); return this; }
@Override public String toString() { String policyDesc = null; if (objectSynchronization != null) { if (objectSynchronization.getName() == null) { policyDesc = "(kind=" + objectSynchronization.getKind() + ", intent=" + objectSynchronization.getIntent() + ", objectclass=" + objectSynchronization.getObjectClass() + ")"; } else { policyDesc = objectSynchronization.getName(); } } return policyDesc; }
public boolean isSatisfyTaskConstraints() throws SchemaException { ShadowKindType kind = getTaskPropertyValue(SchemaConstants.MODEL_EXTENSION_KIND); String intent = getTaskPropertyValue(SchemaConstants.MODEL_EXTENSION_INTENT); QName objectClass = getTaskPropertyValue(SchemaConstants.MODEL_EXTENSION_OBJECTCLASS); LOGGER.trace("checking task constraints: {}", task); boolean isApplicable = SynchronizationUtils.isPolicyApplicable(objectClass, kind, intent, objectSynchronization, resource, true); //this mean that kind/intent are null in the task..but this can be a case, so check if at least the objectClass is the same if (!isApplicable && objectClass != null) { return QNameUtil.matchAny(objectClass, objectSynchronization.getObjectClass()); } return isApplicable; }
public static boolean isPolicyApplicable(QName objectClass, ShadowKindType kind, String intent, ObjectSynchronizationType synchronizationPolicy, PrismObject<ResourceType> resource, boolean strictIntent) throws SchemaException { List<QName> policyObjectClasses = synchronizationPolicy.getObjectClass();
copyObjectClass(this.getObjectClass(), clone.getObjectClass());
copyObjectClass(o.getObjectClass(), this.getObjectClass());
lhsObjectClass = (((this.objectClass!= null)&&(!this.objectClass.isEmpty()))?this.getObjectClass():null); List<QName> rhsObjectClass; rhsObjectClass = (((that.objectClass!= null)&&(!that.objectClass.isEmpty()))?that.getObjectClass():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "objectClass", lhsObjectClass), LocatorUtils.property(thatLocator, "objectClass", rhsObjectClass), lhsObjectClass, rhsObjectClass)) { return false;
theObjectClass = (((this.objectClass!= null)&&(!this.objectClass.isEmpty()))?this.getObjectClass():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "objectClass", theObjectClass), currentHashCode, theObjectClass);