Class WorkflowReferenceHelper
java.lang.Object
de.xima.fc.helper.WorkflowReferenceHelper
Utilities for scanning workflow element model class instances via reflection.
- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptionstatic <Model> de.xima.cmn.criteria.FilterCriteriongetFilterCriteriaForObjects(IElementHandler<Model, ?> handler, IGetFilterCriteriaForObjectsParams params) static <Model> List<IEntityReferenceDescriptor> readDefaultEntityReferenceDescriptors(IReadEntityRefsParams<Model> params) Deprecated.static <Model> List<IObjectReferenceDescriptor> readDefaultObjectReferenceDescriptors(IElementHandler<Model, ?> handler, IReadObjectReferencesParams<Model> params) Creates a list ofobject reference descriptorsfrom the given model, using the default strategy for getting references.static List<IPlaceholderProperty<?, ?>> readDefaultPlaceholders(IReadPlaceholdersParams<?> params) Iterates over all fields via reflection and looks for placeholders in string fields.static intDeprecated.static <Model> intwriteDefaultObjectReferenceDescriptors(IElementHandler<Model, ?> handler, IWriteObjectReferencesParams<Model> params) Updates all object references in the given model with the given descriptors, using the default strategy for updating object references.static voidwriteDefaultPlaceholders(IWritePlaceholdersParams<?> params) Writes back the placeholders to string fields via reflection.
-
Method Details
-
getFilterCriteriaForObjects
public static <Model> de.xima.cmn.criteria.FilterCriterion getFilterCriteriaForObjects(IElementHandler<Model, ?> handler, IGetFilterCriteriaForObjectsParams params) -
readDefaultEntityReferenceDescriptors
@Deprecated public static <Model> List<IEntityReferenceDescriptor> readDefaultEntityReferenceDescriptors(IReadEntityRefsParams<Model> params) Deprecated.Creates a list ofentity reference descriptorsfrom the given model, using the default strategy for getting references. Used as the default implementation ofhandler.readEntityReferences().- Type Parameters:
Model- Type of the deserialized property model of the workflow node or trigger.- Parameters:
params- Parameters with the deserialized model from which to read the entity references.- Returns:
- A list of entity reference descriptors from the given model.
-
readDefaultObjectReferenceDescriptors
public static <Model> List<IObjectReferenceDescriptor> readDefaultObjectReferenceDescriptors(IElementHandler<Model, ?> handler, IReadObjectReferencesParams<Model> params) Creates a list ofobject reference descriptorsfrom the given model, using the default strategy for getting references. Used as the default implementation ofhandler.readObjectReferences().- Type Parameters:
Model- Type of the deserialized property model of the workflow node or trigger.- Parameters:
handler- The trigger or node handler instance.params- Parameters with the deserialized model from which to read the entity references.- Returns:
- A list of entity reference descriptors from the given model.
-
readDefaultPlaceholders
public static List<IPlaceholderProperty<?,?>> readDefaultPlaceholders(IReadPlaceholdersParams<?> params) Iterates over all fields via reflection and looks for placeholders in string fields.- Parameters:
params- Properties model to scan.- Returns:
- All placeholders found in the properties model.
-
writeDefaultEntityReferenceDescriptors
@Deprecated public static int writeDefaultEntityReferenceDescriptors(IWriteEntityRefsParams<?> params) Deprecated.Updates all entity references in the given model with the given descriptors, using the default strategy for updating entity references. Each descriptor consists of a path pointing to the reference to update, and a new value for the reference. This is the default implementation ofhandler.writeEntityReferences().- Parameters:
params- Parameters with the deserialized properties model (of the workflow node or trigger) that should be updated.- Returns:
- The number of references that have been updated
-
writeDefaultObjectReferenceDescriptors
public static <Model> int writeDefaultObjectReferenceDescriptors(IElementHandler<Model, ?> handler, IWriteObjectReferencesParams<Model> params) Updates all object references in the given model with the given descriptors, using the default strategy for updating object references. Each descriptor consists of a path pointing to the reference to update, and a new value for the reference. This is the default implementation ofhandler.writeobjectReferences().- Type Parameters:
Model- Type of the deserialized property model of the workflow node or trigger.- Parameters:
handler- The trigger or node handler instance.params- Parameters with the deserialized properties model (of the workflow node or trigger) that should be updated.- Returns:
- The number of references that have been updated
-
writeDefaultPlaceholders
Writes back the placeholders to string fields via reflection.- Parameters:
params- Properties model to scan.
-