Class PlantNotificationFormManager
java.lang.Object
overit.geocallapp.wfm.notifications.constraint.plant.PlantNotificationFormManager
- All Implemented Interfaces:
NotificationFormManager
Implementation of the
NotificationFormManager
for the Plant scenario.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected NotificationFormManagerConfigurationprotected PlantNotificationHelper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Collection<String> getEditableElements(Notification notification, Collection<String> availableFields) Remember that a user could be either creator and mantainerprotected Collection<String> getMandatoryElements(Notification notification) protected Collection<String> getVisibleElements(Notification notification) protected PlantNotificationHelperhelper()booleanisElementEditable(Notification notification, String elementName) booleanisElementMandatory(Notification notification, String elementName) booleanisElementVisible(Notification notification, String elementName) voidprepareForm(NotificationForm form, Notification notification) For each field in the given form, decide if the field is visible, editable and mandatoryvoidsetConfiguration(NotificationFormManagerConfiguration configuration)
-
Field Details
-
_helper
-
_configuration
-
-
Constructor Details
-
PlantNotificationFormManager
public PlantNotificationFormManager()
-
-
Method Details
-
setConfiguration
-
prepareForm
Description copied from interface:NotificationFormManagerFor each field in the given form, decide if the field is visible, editable and mandatory- Specified by:
prepareFormin interfaceNotificationFormManager- Parameters:
form- theNotificationFormto prepare for the update of the Notificationnotification- theNotificationto update
-
isElementVisible
- Specified by:
isElementVisiblein interfaceNotificationFormManager- Parameters:
notification- theNotificationto considerelementName- the name ofNotificationElementsto check- Returns:
- true if the given element is visible; false otherwise
-
isElementEditable
- Specified by:
isElementEditablein interfaceNotificationFormManager- Parameters:
notification- theNotificationto considerelementName- the name ofNotificationElementsto check- Returns:
- true if the given element is editable; false otherwise
-
isElementMandatory
- Specified by:
isElementMandatoryin interfaceNotificationFormManager- Parameters:
notification- theNotificationto considerelementName- the name ofNotificationElementsto check- Returns:
- true if the given element is mandatory; false otherwise
-
getEditableElements
protected Collection<String> getEditableElements(Notification notification, Collection<String> availableFields) Remember that a user could be either creator and mantainer- Parameters:
notification-availableFields-- Returns:
-
getVisibleElements
-
getMandatoryElements
-
helper
-