Package com.evolveum.midpoint.common
Class StaticExpressionUtil
java.lang.Object
com.evolveum.midpoint.common.StaticExpressionUtil
Utility class for manipulation of static values in expressions. This is not
intended for a general public usage. It is used to set and get pre-computed
values in expressions and mappings, e.g. when used between model and provisioning
in provisioning scripts.
- Author:
- Radovan Semancik
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ItemDefinition<?>
deriveOutputDefinitionFromValueElements
(QName elementName, Collection<jakarta.xml.bind.JAXBElement<?>> valueElements, String contextDescription) static Object
getStaticOutput
(ExpressionType expressionBean, PrismPropertyDefinition<?> outputDefinition, String contextDescription, ExpressionReturnMultiplicityType preferredMultiplicity) Returns either Object (if result is supposed to be single-value) or Collection(if result is supposed to be multi-value) static <IV extends PrismValue,
ID extends ItemDefinition<?>>
Item<IV,ID> parseValueElements
(Collection<?> valueElements, ID outputDefinition, String contextDescription) parseValueElements
(Collection<?> valueElements, String contextDescription) Parses value elements without definitions into raw values - this allows further conversion.static <IV extends PrismValue,
ID extends ItemDefinition<?>>
List<jakarta.xml.bind.JAXBElement<RawType>>serializeValueElements
(Item<IV, ID> item)
-
Constructor Details
-
StaticExpressionUtil
public StaticExpressionUtil()
-
-
Method Details
-
getStaticOutput
public static Object getStaticOutput(ExpressionType expressionBean, PrismPropertyDefinition<?> outputDefinition, String contextDescription, ExpressionReturnMultiplicityType preferredMultiplicity) throws SchemaException Returns either Object (if result is supposed to be single-value) or Collection(if result is supposed to be multi-value) - Throws:
SchemaException
-
deriveOutputDefinitionFromValueElements
public static ItemDefinition<?> deriveOutputDefinitionFromValueElements(QName elementName, Collection<jakarta.xml.bind.JAXBElement<?>> valueElements, String contextDescription) throws SchemaException - Throws:
SchemaException
-
parseValueElements
public static <IV extends PrismValue,ID extends ItemDefinition<?>> Item<IV,ID> parseValueElements(Collection<?> valueElements, ID outputDefinition, String contextDescription) throws SchemaException - Throws:
SchemaException
-
parseValueElements
public static List<Object> parseValueElements(Collection<?> valueElements, String contextDescription) throws SchemaException Parses value elements without definitions into raw values - this allows further conversion.- Throws:
SchemaException
-
serializeValueElements
public static <IV extends PrismValue,ID extends ItemDefinition<?>> List<jakarta.xml.bind.JAXBElement<RawType>> serializeValueElements(Item<IV, ID> item) throws SchemaException- Throws:
SchemaException
-