Class WorkflowReferenceHelper

java.lang.Object
de.xima.fc.helper.WorkflowReferenceHelper

public final class WorkflowReferenceHelper extends Object
Utilities for scanning workflow element model class instances via reflection.
Since:
7.0.0
Author:
XIMA MEDIA GmbH
  • 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 a Set of IEntityReferenceDescriptors for the given query using formcycle's default implementation for getting references. This is the default implementation of IElementHandler.readEntityReferences(IReadEntityRefsParams).
      Type Parameters:
      TData - property model class
      Parameters:
      dataModelClass - property model class
      params - Query to get the references for
      Returns:
      Set of IEntityReferenceDescriptors 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 of IElementHandler.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.