Package com.evolveum.midpoint.web.util
Class ExpressionUtil
java.lang.Object
com.evolveum.midpoint.web.util.ExpressionUtil
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static enum
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addAsIsExpressionValue
(ExpressionType expression) static void
addShadowRefEvaluatorValue
(ExpressionType expression, String oid, PrismContext prismContext) static @Nullable ExpressionUtil.Language
converLanguage
(String language) static jakarta.xml.bind.JAXBElement<?>
createAssociationTargetSearchElement
(PrismContext prismContext) static @NotNull List<jakarta.xml.bind.JAXBElement<?>>
findAllEvaluatorsByName
(ExpressionType expression, QName elementName) static jakarta.xml.bind.JAXBElement<?>
findFirstEvaluatorByName
(ExpressionType expression, QName elementName) static MapXNode
static ExpressionUtil.Language
getExpressionLanguage
(String expression) static String
static String
static String
getExpressionType
(String expression) getGenerateExpressionValue
(ExpressionType expression) getLiteralExpressionValues
(ExpressionType expression) static MapXNode
getOrCreateAssociationTargetSearchValues
(ExpressionType expression, PrismContext prismContext) getScriptExpressionValue
(ExpressionType expression) static @NotNull List<ObjectReferenceType>
getShadowRefValue
(ExpressionType expressionType, PrismContext prismContext) static String
getTargetSearchExpPathValue
(ExpressionType expression) static String
getTargetSearchExpValue
(ExpressionType expression) static boolean
isEmpty
(ExpressionType expression) static boolean
isShadowRefNodeExists
(ExpressionType expression) static String
loadExpression
(ExpressionType expression, PrismContext prismContext, Trace LOGGER) static void
parseExpressionEvaluators
(String xml, ExpressionType expressionObject, PrismContext context) static RootXNode
parseSearchFilter
(String data, PrismContext context) static void
removeEvaluatorByName
(ExpressionType expression, QName elementName) static void
removeShadowRefEvaluatorValue
(ExpressionType expression, String shadowRefOid, PrismContext prismContext) static String
serialize
(jakarta.xml.bind.JAXBElement<?> element, PrismContext prismContext) static void
updateAssociationTargetSearchValue
(ExpressionType expression, String newPath, String newValue, PrismContext prismContext) static void
updateGenerateExpressionValue
(ExpressionType expression, GenerateExpressionEvaluatorType evaluator) static void
updateLiteralExpressionValue
(ExpressionType expression, List<String> values, PrismContext prismContext) static ExpressionType
updateScriptExpressionValue
(ExpressionType expression, ScriptExpressionEvaluatorType evaluator) static void
updateShadowRefEvaluatorValue
(ExpressionType expression, List<ObjectReferenceType> values)
-
Field Details
-
SHADOW_REF_KEY
-
EXPRESSION_SCRIPT
- See Also:
-
EXPRESSION_LITERAL
- See Also:
-
EXPRESSION_AS_IS
- See Also:
-
EXPRESSION_PATH
- See Also:
-
EXPRESSION_GENERATE
- See Also:
-
ELEMENT_SCRIPT
- See Also:
-
ELEMENT_GENERATE
- See Also:
-
ELEMENT_GENERATE_WITH_NS
- See Also:
-
ELEMENT_PATH
- See Also:
-
ELEMENT_VALUE
- See Also:
-
ELEMENT_AS_IS
- See Also:
-
ELEMENT_AS_IS_WITH_NS
- See Also:
-
-
Constructor Details
-
ExpressionUtil
public ExpressionUtil()
-
-
Method Details
-
getExpressionString
public static String getExpressionString(ExpressionUtil.ExpressionEvaluatorType type, ObjectReferenceType policy) -
getExpressionString
public static String getExpressionString(ExpressionUtil.ExpressionEvaluatorType type, ExpressionUtil.Language lang) -
getExpressionString
-
getExpressionType
-
getExpressionLanguage
-
converLanguage
-
loadExpression
public static String loadExpression(ExpressionType expression, PrismContext prismContext, Trace LOGGER) -
serialize
public static String serialize(jakarta.xml.bind.JAXBElement<?> element, PrismContext prismContext) throws SchemaException - Throws:
SchemaException
-
isEmpty
-
parseExpressionEvaluators
public static void parseExpressionEvaluators(String xml, ExpressionType expressionObject, PrismContext context) throws SchemaException - Throws:
SchemaException
-
parseSearchFilter
- Throws:
SchemaException
-
findFirstEvaluatorByName
public static jakarta.xml.bind.JAXBElement<?> findFirstEvaluatorByName(ExpressionType expression, QName elementName) -
findAllEvaluatorsByName
@NotNull public static @NotNull List<jakarta.xml.bind.JAXBElement<?>> findAllEvaluatorsByName(ExpressionType expression, QName elementName) -
removeEvaluatorByName
-
removeShadowRefEvaluatorValue
public static void removeShadowRefEvaluatorValue(ExpressionType expression, String shadowRefOid, PrismContext prismContext) -
createAssociationTargetSearchElement
public static jakarta.xml.bind.JAXBElement<?> createAssociationTargetSearchElement(PrismContext prismContext) -
getOrCreateAssociationTargetSearchValues
public static MapXNode getOrCreateAssociationTargetSearchValues(ExpressionType expression, PrismContext prismContext) -
updateAssociationTargetSearchValue
public static void updateAssociationTargetSearchValue(ExpressionType expression, String newPath, String newValue, PrismContext prismContext) throws SchemaException - Throws:
SchemaException
-
getShadowRefValue
@NotNull public static @NotNull List<ObjectReferenceType> getShadowRefValue(ExpressionType expressionType, PrismContext prismContext) -
isShadowRefNodeExists
-
addShadowRefEvaluatorValue
public static void addShadowRefEvaluatorValue(ExpressionType expression, String oid, PrismContext prismContext) -
updateShadowRefEvaluatorValue
public static void updateShadowRefEvaluatorValue(ExpressionType expression, List<ObjectReferenceType> values) -
getLiteralExpressionValues
@NotNull public static @NotNull List<String> getLiteralExpressionValues(ExpressionType expression) throws SchemaException - Throws:
SchemaException
-
getScriptExpressionValue
public static ScriptExpressionEvaluatorType getScriptExpressionValue(ExpressionType expression) throws SchemaException - Throws:
SchemaException
-
getGenerateExpressionValue
public static GenerateExpressionEvaluatorType getGenerateExpressionValue(ExpressionType expression) throws SchemaException - Throws:
SchemaException
-
updateLiteralExpressionValue
public static void updateLiteralExpressionValue(ExpressionType expression, List<String> values, PrismContext prismContext) -
updateScriptExpressionValue
public static ExpressionType updateScriptExpressionValue(ExpressionType expression, ScriptExpressionEvaluatorType evaluator) throws SchemaException - Throws:
SchemaException
-
updateGenerateExpressionValue
public static void updateGenerateExpressionValue(ExpressionType expression, GenerateExpressionEvaluatorType evaluator) throws SchemaException - Throws:
SchemaException
-
addAsIsExpressionValue
-
getAssociationTargetSearchFilterValuesMap
-
getTargetSearchExpPathValue
-
getTargetSearchExpValue
-