Class PlantNotificationValidator
java.lang.Object
overit.geocallapp.wfm.notifications.constraint.base.DefaultNotificationValidator
overit.geocallapp.wfm.notifications.constraint.plant.PlantNotificationValidator
- All Implemented Interfaces:
NotificationValidator
Implementation of the
NotificationValidator
for the Plant scenario.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected NotificationFormManagerConfigurationprotected PlantNotificationHelperprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final StringFields inherited from class overit.geocallapp.wfm.notifications.constraint.base.DefaultNotificationValidator
ERROD_FAILURE_BEGIN_AFTER_REQUEST_BEGIN, ERROR_END_DATE_AFTER_CREATION, ERROR_FAILURE_BEGIN_AFTER_REQUEST_END, ERROR_FAILURE_BEGIN_DATE_AFTER_END, ERROR_REQUEST_BEGIN_AFTER_REQUEST_END, ERROR_WORK_CENTER_NOT_FOUND_IN_OPERATIONAL_CENTER, ERROR_WRONG_CREATION_DATE, ERROR_WRONG_DOWNTIME_PERIOD, ERROR_WRONG_END_DATE, ERROR_WRONG_FAILURE_BEGIN_DATE, ERROR_WRONG_FAILURE_END_DATE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanUserEditTheNotification(Notification notification) protected voidcheckActivity(DBView positions, Notification notification, Collection<String> problems) protected voidcheckForEndingState(Notification notification, Collection<String> problems) protected voidcheckReason(DBView positions, Notification notification, Collection<String> problems) protected Collection<String> getHeaderProblems(Notification notification, Collection<String> mandatoryForTheState) protected Collection<String> getPositionProblems(Notification notification, Collection<String> mandatoryForTheState) getProblems(Notification notification) Apply the rule to validate the notification for the insert or update operationprotected Collection<String> getSubPositionProblems(Notification notification, Collection<String> mandatoryForTheState) protected PlantNotificationHelperhelper()voidsetConfiguration(NotificationFormManagerConfiguration configuration) Methods inherited from class overit.geocallapp.wfm.notifications.constraint.base.DefaultNotificationValidator
checkWorkCenterCoherence
-
Field Details
-
MANTAINER_FUNCTION
-
ERROR_NULL_FAILURE_DATES
- See Also:
-
ERROR_NULL_OPEN_DATE
- See Also:
-
ERROR_NULL_CLOSE_DATE
- See Also:
-
ERROR_NULL_POSITION
- See Also:
-
ERROR_NULL_ANOMALY
- See Also:
-
ERROR_NULL_OBJECT
- See Also:
-
ERROR_NULL_REASON
- See Also:
-
ERROR_NULL_ACTIVITY
- See Also:
-
ERROR_NULL_ODL
- See Also:
-
ERROR_NULL_DESCRIPTION
- See Also:
-
ERROR_NULL_OPERATIONAL_CENTER
- See Also:
-
ERROR_NULL_WORK_CENTER
- See Also:
-
ERROR_NULL_PRIORITY
- See Also:
-
ERROR_NULL_STATE
- See Also:
-
ERROR_NULL_TYPE
- See Also:
-
ERROR_NULL_FACILITY
- See Also:
-
ERROR_NO_EQUIPMENT_SAP_TYPE_FACILITY
- See Also:
-
ERROR_NULL_FAULT_BEGIN_DATE
- See Also:
-
ERROR_NULL_FAULT_END_DATE
- See Also:
-
ERROR_NULL_REQUEST_BEGIN_DATE
- See Also:
-
ERROR_NULL_REQUEST_END_DATE
- See Also:
-
ERROR_NULL_DOWNTIME_PERIOD
- See Also:
-
ERROR_NULL_REPORTER
- See Also:
-
_helper
-
_configuration
-
-
Constructor Details
-
PlantNotificationValidator
public PlantNotificationValidator()
-
-
Method Details
-
setConfiguration
-
canUserEditTheNotification
- Specified by:
canUserEditTheNotificationin interfaceNotificationValidator- Overrides:
canUserEditTheNotificationin classDefaultNotificationValidator- Parameters:
notification- theNotificationto update- Returns:
- true if the user can update the notification; false otherwise
-
getProblems
Description copied from interface:NotificationValidatorApply the rule to validate the notification for the insert or update operation- Specified by:
getProblemsin interfaceNotificationValidator- Overrides:
getProblemsin classDefaultNotificationValidator- Parameters:
notification- theNotificationto insert- Returns:
- a collection of error messages
-
getHeaderProblems
protected Collection<String> getHeaderProblems(Notification notification, Collection<String> mandatoryForTheState) -
getPositionProblems
protected Collection<String> getPositionProblems(Notification notification, Collection<String> mandatoryForTheState) -
getSubPositionProblems
protected Collection<String> getSubPositionProblems(Notification notification, Collection<String> mandatoryForTheState) -
checkActivity
protected void checkActivity(DBView positions, Notification notification, Collection<String> problems) -
checkReason
protected void checkReason(DBView positions, Notification notification, Collection<String> problems) -
checkForEndingState
-
helper
-