Package wt.change2.listeners
Class PendingChangeEventHandler
java.lang.Object
wt.services.ServiceEventListenerAdapter
wt.change2.listeners.ChangeStatusEventHandler
wt.change2.listeners.PendingChangeEventHandler
- All Implemented Interfaces:
KeyedEventListener
- Direct Known Subclasses:
DefaultPendingChangeEventHandler
This class is responsible for implementing the common functionality for processing the events that can change the
pending status of a changeable.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidappendChangeNoticeCondition(QuerySpec querySpec, int changeIdx) Appends the condition that determines whether a change notice is pending.protected abstract voidappendChangeRequestCondition(QuerySpec querySpec, int changeIdx) Appends the condition that determines whether a change request is pending.protected final StringReturns the property to register the events for pending change inwt.properties.Methods inherited from class wt.change2.listeners.ChangeStatusEventHandler
appendByChangeables, appendByChangeItem, appendLatestChangeCondition, buildCompoundQuerySpec, buildCompoundQuerySpec2, buildJoinQuerySpec, calculate, getChangeableQueryClass, getChangeables, getChangeables, getChangeablesToResetIndicator, getChangeablesToResetIndicator, getChangeablesToSetIndicator, getChangeablesToSetIndicator, getGeneratedEventKeys, notifyVetoableMultiObjectEvent, setChangeableQueryClass, updateChangeStatus, updateChangeStatus
-
Constructor Details
-
PendingChangeEventHandler
Supported API: true- Parameters:
serviceId-
-
-
Method Details
-
appendChangeNoticeCondition
protected abstract void appendChangeNoticeCondition(QuerySpec querySpec, int changeIdx) throws QueryException Appends the condition that determines whether a change notice is pending. By default, the change notice is pending if the life cycle state matches a state defined in the propertywt.change2.pendingOrderStatesfromwt.properties. The current implementation would append the following condition phrase to the specified query spec, where A0 is the changeIdx(the table index for the change Item):
A0.statestate = 'IMPLEMENTATION'
A custom event handler should implement this method to define the conditions that make a change notice pending.
Supported API: true- Overrides:
appendChangeNoticeConditionin classChangeStatusEventHandler- Parameters:
querySpec- - query spec to which the condition need to be appendedchangeIdx- - table index for the change notice- Throws:
WTExceptionQueryException
-
appendChangeRequestCondition
protected abstract void appendChangeRequestCondition(QuerySpec querySpec, int changeIdx) throws QueryException Appends the condition that determines whether a change request is pending. By default, the change request is pending if the life cycle state matches a state defined in the propertywt.change2.pendingRequestStatesfromwt.properties. The current implementation would append the following condition phrase to the specified query spec, where A0 is the changeIdx(the table index for the change Item):
A0.statestate = 'IMPLEMENTATION'
A custom event handler should implement this method to define the conditions that make a change request pending.
Supported API: true- Parameters:
querySpec- - query spec to which the condition need to be appendedchangeIdx- - table index for the change request- Throws:
WTExceptionQueryException
-
getEventRegisterProperty
Returns the property to register the events for pending change inwt.properties.
Supported API: true- Specified by:
getEventRegisterPropertyin classChangeStatusEventHandler- Throws:
IOException
-