java.lang.Object
com.aquima.interactions.framework.handler.profile.editors.ProfileEditor

public class ProfileEditor extends Object
The profile editor class contains the implementation of the various actions that can be performed.
Since:
5.0
Author:
Jon van Leuven
  • Constructor Details

  • Method Details

    • create

      public static ProfileEditor create(IProfile profile, IMetaModel metamodel)
      This method creates the profile editor using the provided profile and meta model.
      Parameters:
      profile - The profile containing the current state.
      metamodel - The meta model of the application.
      Returns:
      Profile editor for the specified profile.
      Throws:
      AppException - This exception is thrown when the editor could not be created.
    • getInstanceEditor

      public InstanceEditor getInstanceEditor(EntityValue instance)
      This method returns the instance editor for the specified instance ID.
      Parameters:
      instance - The ID of the instance whose editor is requested.
      Returns:
      The instance editor for the specified instance.
    • createInstance

      public InstanceEditor createInstance(String entityName, IProfile profile, IMetaModel metamodel)
      This method can be used to create a new instance. The create method will also add the instance editor for the created instance.
      Parameters:
      entityName - The type of the instance that should be created.
      profile - The profile that should be used to create the instance in.
      metamodel - The meta model of the application.
      Returns:
      The instance editor for the new instance.
      Throws:
      AppException - This exception is thrown when the instance could not be created.
    • deleteInstance

      public void deleteInstance(EntityValue instance, IProfile profile)
      This method can be used to remove an instance. The remove action will also remove the instance editor.
      Parameters:
      instance - The ID of the instance that should be removed.
      profile - The profile where the instance should be removed from.
      Throws:
      AppException - This exception is thrown when the instance could not be removed.
    • cancelInstance

      public void cancelInstance(EntityValue instance)
      This method can be used to cancel any action that was scheduled for the specified instance. The cancel action will remove the instance editor.
      Parameters:
      instance - The ID of the instance whose action was canceled.
    • saveInstance

      public void saveInstance(EntityValue instance, IProfile profile)
      This method can be used to save (commit) the actions for an instance to the profile.
      Parameters:
      instance - The ID of the instance whose action should be saved.
      profile - The profile that should be used to perform the action on.
      Throws:
      AppException - This exception is thrown when the instance could not be saved.
    • getInstanceEditors

      public InstanceEditor[] getInstanceEditors()
      This method returns all the instance editors.
      Returns:
      array containing all the instance editors.
    • getInstanceEditors

      public InstanceEditor[] getInstanceEditors(String entityName)
      This method returns the instance editors for the specified entity type.
      Parameters:
      entityName - The entity type of the editors.
      Returns:
      array containing the instance editors of the specified type.
    • addInstanceEditor

      public void addInstanceEditor(EntityValue instance, InstanceEditor editor)
      This method adds an instance editor.
      Parameters:
      instance - The ID of the instance.
      editor - The editor for the instance.