Class FunctionConfigItem
java.lang.Object
com.evolveum.midpoint.schema.config.ConfigurationItem<ExpressionType>
com.evolveum.midpoint.schema.config.ExpressionConfigItem
com.evolveum.midpoint.schema.config.FunctionConfigItem
- All Implemented Interfaces:
PrivilegesMixin<ExpressionType>
,Serializable
,Cloneable
Represents an
ExpressionType
that is part of a FunctionLibraryType
as a custom function.
Intentionally differs from the standard naming convention. The embedded value is ExpressionType
but it is used
in a specialized way.- See Also:
-
Field Summary
Fields inherited from class com.evolveum.midpoint.schema.config.ConfigurationItem
DESC
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<X extends ConfigurationItem<T>>
Xdefault void
checkNamespace
(@NotNull QName name, String expectedNamespace) <X extends Serializable & Cloneable,
CI extends ConfigurationItem<X>>
CIdefault void
configCheck
(boolean value, String template, Object... arguments) Checks the value, and if it's `false`, emits aConfigurationException
.default @NotNull ConfigurationException
configException
(String template, Object... arguments) default @NotNull ConfigurationException
configException
(Throwable cause, String template, Object... arguments) default <V> V
configNonNull
(V value, String template, Object... arguments) AsconfigCheck(boolean, String, Object...)
, but checks that the value is not null.boolean
doesMatchArguments
(Collection<String> argumentNames) Matching parameter names, ignoring all the other information (e.g., types).default @NotNull QName
enforceNamespace
(@NotNull QName name, @NotNull String requiredNamespace) Just likeQNameUtil.enforceNamespace(QName, String)
but throwingConfigurationException
.@NotNull String
default @NotNull String
getLocalPart
(@NotNull QName name, String expectedNamespace) @NotNull String
getName()
Unlike generalExpressionConfigItem
, the function must have a name.@NotNull ExpressionParameterConfigItem
getParameter
(@NotNull String paramName) @NotNull QName
boolean
boolean
default <C extends Collection<?>>
Cdefault <C extends Collection<?>>
Cdefault <V> V
Even more shortened version.static FunctionConfigItem
of
(@NotNull ExpressionType bean, @NotNull ConfigurationItemOrigin origin) @NotNull ConfigurationItemOrigin
origin()
SeeConfigurationItem.origin
.default @NotNull ConfigurationItemOrigin
default <C extends Containerable>
@NotNull OriginProvider<C>originProviderFor
(@NotNull ItemPath path) default <C> C
single
(Collection<? extends C> collection, String template, Object... arguments) default @NotNull ItemName
singleNameRequired
(ItemPathType name, Object itemDesc) value()
SeeConfigurationItem.value
.Methods inherited from class com.evolveum.midpoint.schema.config.ExpressionConfigItem
getPrivileges, isAllowEmptyValues, isTrace
Methods inherited from class com.evolveum.midpoint.schema.config.ConfigurationItem
as, as, asList, child, child, clone, configItem, configItem, configItemNullable, embedded, embeddedNullable, equals, fullDescription, fullOriginLessDescription, hashCode, localDescription, of, ofList, origin, toString, value, value
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.evolveum.midpoint.schema.config.PrivilegesMixin
getPrivileges
-
Constructor Details
-
FunctionConfigItem
-
-
Method Details
-
of
public static FunctionConfigItem of(@NotNull @NotNull ExpressionType bean, @NotNull @NotNull ConfigurationItemOrigin origin) -
getName
Unlike generalExpressionConfigItem
, the function must have a name.- Throws:
ConfigurationException
-
doesMatchArguments
Matching parameter names, ignoring all the other information (e.g., types). -
getParameter
@NotNull public @NotNull ExpressionParameterConfigItem getParameter(@NotNull @NotNull String paramName) throws ConfigurationException - Throws:
ConfigurationException
-
getReturnTypeName
-
isReturnMultiValue
public boolean isReturnMultiValue() -
isReturnSingleValue
public boolean isReturnSingleValue() -
value
SeeConfigurationItem.value
. -
origin
SeeConfigurationItem.origin
. -
as
-
child
@Contract("null, _, _ -> null; !null, _, _ -> !null") <X extends Serializable & Cloneable,CI extends ConfigurationItem<X>> CI child(@Nullable X value, @NotNull @NotNull Class<CI> clazz, Object... pathSegments) -
fullDescription
-
configCheck
@Contract("false, _, _ -> fail") default void configCheck(boolean value, String template, Object... arguments) throws ConfigurationException Checks the value, and if it's `false`, emits aConfigurationException
. Note thatConfigurationItem.DESC
can be used as a placeholder forfullDescription()
in the `arguments`.- Throws:
ConfigurationException
-
checkNamespace
default void checkNamespace(@NotNull @NotNull QName name, String expectedNamespace) throws ConfigurationException - Throws:
ConfigurationException
-
enforceNamespace
@NotNull default @NotNull QName enforceNamespace(@NotNull @NotNull QName name, @NotNull @NotNull String requiredNamespace) throws ConfigurationException Just likeQNameUtil.enforceNamespace(QName, String)
but throwingConfigurationException
.- Throws:
ConfigurationException
-
getLocalPart
@NotNull default @NotNull String getLocalPart(@NotNull @NotNull QName name, String expectedNamespace) throws ConfigurationException - Throws:
ConfigurationException
-
configException
@NotNull default @NotNull ConfigurationException configException(Throwable cause, String template, Object... arguments) -
configException
@NotNull default @NotNull ConfigurationException configException(String template, Object... arguments) -
configNonNull
@Contract("null, _, _ -> fail") @NotNull default <V> V configNonNull(V value, String template, Object... arguments) throws ConfigurationException AsconfigCheck(boolean, String, Object...)
, but checks that the value is not null.- Throws:
ConfigurationException
-
nonNull
@Contract("null, _ -> fail") @NotNull default <V> V nonNull(V value, Object itemDesc) throws ConfigurationException Even more shortened version.- Throws:
ConfigurationException
-
nonEmpty
@NotNull default <C extends Collection<?>> C nonEmpty(C collection, Object itemDescription) throws ConfigurationException - Throws:
ConfigurationException
-
nonEmpty
@NotNull default <C extends Collection<?>> C nonEmpty(C collection, String template, Object... arguments) throws ConfigurationException - Throws:
ConfigurationException
-
singleNameRequired
@NotNull default @NotNull ItemName singleNameRequired(ItemPathType name, Object itemDesc) throws ConfigurationException - Throws:
ConfigurationException
-
single
@Nullable default <C> C single(Collection<? extends C> collection, String template, Object... arguments) throws ConfigurationException - Throws:
ConfigurationException
-
originProviderFor
@NotNull default <C extends Containerable> @NotNull OriginProvider<C> originProviderFor(@NotNull @NotNull ItemPath path) -
originFor
-