Class ProfileEditor
java.lang.Object
com.aquima.interactions.framework.handler.profile.editors.ProfileEditor
The profile editor class contains the implementation of the various actions that can be performed.
- Since:
- 5.0
- Author:
- Jon van Leuven
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addInstanceEditor
(EntityValue instance, InstanceEditor editor) This method adds an instance editor.void
cancelInstance
(EntityValue instance) This method can be used to cancel any action that was scheduled for the specified instance.static ProfileEditor
create
(IProfile profile, IMetaModel metamodel) This method creates the profile editor using the provided profile and meta model.createInstance
(String entityName, IProfile profile, IMetaModel metamodel) This method can be used to create a new instance.void
deleteInstance
(EntityValue instance, IProfile profile) This method can be used to remove an instance.getInstanceEditor
(EntityValue instance) This method returns the instance editor for the specified instance ID.This method returns all the instance editors.getInstanceEditors
(String entityName) This method returns the instance editors for the specified entity type.void
saveInstance
(EntityValue instance, IProfile profile) This method can be used to save (commit) the actions for an instance to the profile.
-
Constructor Details
-
ProfileEditor
-
-
Method Details
-
create
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
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
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
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
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
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
This method returns all the instance editors.- Returns:
- array containing all the instance editors.
-
getInstanceEditors
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
This method adds an instance editor.- Parameters:
instance
- The ID of the instance.editor
- The editor for the instance.
-