Class InstanceEditor
java.lang.Object
com.aquima.interactions.framework.handler.profile.editors.InstanceEditor
This class contains the implementation of the various action that can be performed on an instance.
- Since:
- 5.0
- Author:
- Jon van Leuven
-
Constructor Summary
ConstructorsModifierConstructorDescriptionInstanceEditor
(EntityValue instance) Constructs the editor with the ID of the instance the editor is defined for.protected
InstanceEditor
(InstanceEditor other) -
Method Summary
Modifier and TypeMethodDescriptionaddAttributeEditor
(String attributeName, AttributeEditor editor) This method adds an attribute editor.void
This method cancels any actions that were scheduled for this instance.getAttributeEditor
(String attributeName) This method returns the attribute editor for the specified attribute name.This method returns the attribute editors of this instance editor.This method returns the ID of the instance the editor is defined for.void
saveInstance
(IProfile profile) This method commits the scheduled actions to the profile.
-
Constructor Details
-
InstanceEditor
-
InstanceEditor
Constructs the editor with the ID of the instance the editor is defined for.- Parameters:
instance
- the ID of the instance the editor is defined for.
-
-
Method Details
-
getEntityValue
This method returns the ID of the instance the editor is defined for.- Returns:
- the ID of the instance the editor is defined for.
-
addAttributeEditor
This method adds an attribute editor.- Parameters:
attributeName
- The name of the attribute the editor is defined for.editor
- The editor for the attribute.- Returns:
- The attribute editor that was added.
-
getAttributeEditor
This method returns the attribute editor for the specified attribute name.- Parameters:
attributeName
- The name of the attribute whose editor is requested.- Returns:
- The attribute editor of the attribute.
-
cancelActions
public void cancelActions()This method cancels any actions that were scheduled for this instance. -
saveInstance
This method commits the scheduled actions to the profile.- Parameters:
profile
- The profile that should be used to apply the actions on.- Throws:
AppException
- This exception is thrown when the actions could not be saved.
-
getAttributeEditors
This method returns the attribute editors of this instance editor.- Returns:
- array containing the attribute editors of this instance editor.
-