@NotNull public static List<ItemPath> pathListFromStrings(List<String> pathsAsStrings, PrismContext prismContext) { List<ItemPath> rv = new ArrayList<>(); if (pathsAsStrings != null) { for (String pathAsString : pathsAsStrings) { rv.add(prismContext.itemPathParser().asItemPath(pathAsString)); } } return rv; }
public <T> T getPropertyValue(PrismContainerValue<?> pcv, String path) throws SchemaException { return getPropertyValue(pcv, prismContext.itemPathParser().asItemPathType(path)); }
public <T> Collection<T> getPropertyValues(PrismContainerValue<?> pcv, String path) { return getPropertyValues(pcv, prismContext.itemPathParser().asItemPathType(path)); }
public <T> Collection<T> getPropertyValues(Containerable c, String path) { return getPropertyValues(c, prismContext.itemPathParser().asItemPathType(path)); }
public <T> T getPropertyValue(Containerable c, String path) throws SchemaException { return getPropertyValue(c, prismContext.itemPathParser().asItemPathType(path)); }
public <O extends ObjectType, T> List<O> getObjectsInConflictOnPropertyValue(O objectType, String propertyPathString, T propertyValue, String matchingRuleName, boolean getAllConflicting) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { Validate.notEmpty(propertyPathString, "Empty property path"); OperationResult result = getCurrentResult(MidpointFunctions.class.getName() + ".getObjectsInConflictOnPropertyValue"); ItemPath propertyPath = prismContext.itemPathParser().asItemPath(propertyPathString); QName matchingRuleQName = new QName(matchingRuleName); // no namespace for now return getObjectsInConflictOnPropertyValue(objectType, propertyPath, propertyValue, matchingRuleQName, getAllConflicting, getCurrentTask(), result); }
public static ItemPathType createItemPathType(String stringPath, PrismContext prismContext) { String pathDeclaration = "declare default namespace '" + NS_COMMON + "'; " + stringPath; ItemPathType itemPathType = prismContext.itemPathParser().asItemPathType(pathDeclaration); return itemPathType; }
public <T> boolean isUniquePropertyValue(ObjectType objectType, String propertyPathString, T propertyValue) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { Validate.notEmpty(propertyPathString, "Empty property path"); OperationResult result = getCurrentResult(MidpointFunctions.class.getName() + ".isUniquePropertyValue"); ItemPath propertyPath = prismContext.itemPathParser().asItemPath(propertyPathString); return isUniquePropertyValue(objectType, propertyPath, propertyValue, getCurrentTask(), result); }
ItemDeltaType itemDeltaType = new ItemDeltaType(); itemDeltaType.setModificationType(ModificationTypeType.REPLACE); ItemPathType itemPath = prismContext.itemPathParser().asItemPathType(path); itemDeltaType.setPath(itemPath); ValueParser<String> valueParser = new ValueParser<String>() {
ItemPathType path = prismContext.itemPathParser().asItemPathType("credentials/password/value");