Package de.xima.fc.helper
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 final <TData> List<IPlaceholderProperty<?,?>> readDefaultPlaceholders(Class<?> dataModelClass, IReadPlaceholdersParams<?> params) Iterates over all fields via reflection and looks for placeholders in string fields.static <TData> List<IEntityReferenceDescriptor>readDefaultReferenceDescriptors(Class<? extends TData> dataModelClass, IReadEntityRefsParams<TData> params) Create aSetofIEntityReferenceDescriptors for the given query using formcycle's default implementation for getting references.static intwriteDefaultEntityReferenceDescriptors(Class<?> dataModelClass, IWriteEntityRefsParams<?> params) Updates all entity references according to the given query using formcycle's default implementation for updating entity references.static final <TData> voidwriteDefaultPlaceholders(Class<?> dataModelClass, IWritePlaceholdersParams<?> params) Writes back the placeholders to string fields via reflection.
-
Method Details
-
readDefaultPlaceholders
public static final <TData> List<IPlaceholderProperty<?,?>> readDefaultPlaceholders(Class<?> dataModelClass, IReadPlaceholdersParams<?> params) Iterates over all fields via reflection and looks for placeholders in string fields.- Parameters:
dataModelClass- Class of the element's properties model.params- Properties model to scan.- Returns:
- All placeholders found in the properties model.
-
readDefaultReferenceDescriptors
public static <TData> List<IEntityReferenceDescriptor> readDefaultReferenceDescriptors(Class<? extends TData> dataModelClass, IReadEntityRefsParams<TData> params) Create aSetofIEntityReferenceDescriptors for the given query using formcycle's default implementation for getting references. This is the default implementation ofIElementHandler.readEntityReferences(IReadEntityRefsParams).- Type Parameters:
TData- property model class- Parameters:
dataModelClass- property model classparams- Query to get the references for- Returns:
SetofIEntityReferenceDescriptors for the given query
-
writeDefaultEntityReferenceDescriptors
public static int writeDefaultEntityReferenceDescriptors(Class<?> dataModelClass, IWriteEntityRefsParams<?> params) Updates all entity references according to the given query using formcycle's default implementation for updating entity references. This is the default implementation ofIElementHandler.writeEntityReferences(IWriteEntityRefsParams).- Parameters:
dataModelClass- Class of the workflow element's properties model.params- Query containing the update information- Returns:
- the number of references that have been updated
-
writeDefaultPlaceholders
public static final <TData> void writeDefaultPlaceholders(Class<?> dataModelClass, IWritePlaceholdersParams<?> params) Writes back the placeholders to string fields via reflection.- Parameters:
dataModelClass- Class of the element's properties model.params- Properties model to scan.
-