Package org.ametys.cms.workflow.schedule
Class ScheduledPublicationCondition
java.lang.Object
org.ametys.plugins.workflow.AbstractWorkflowComponent
org.ametys.cms.workflow.AbstractContentWorkflowComponent
org.ametys.cms.workflow.schedule.ScheduledPublicationCondition
- All Implemented Interfaces:
com.opensymphony.workflow.Condition,EnhancedCondition,Contextualizable,LogEnabled,Serviceable
public class ScheduledPublicationCondition
extends AbstractContentWorkflowComponent
implements EnhancedCondition, Contextualizable
Condition that check if a publication or unpublication is currently scheduled on the content.
If so, the condition is invalid unless a parameter is provided to allow the scheduled action to process
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ametys.plugins.workflow.AbstractWorkflowComponent
AbstractWorkflowComponent.ConditionFailure -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ContextThe avalon contextstatic final StringSet a transientVars or request param to true with this key to ignore this conditionFields inherited from class org.ametys.cms.workflow.AbstractContentWorkflowComponent
_contentHelper, CONTENT_KEY, HAS_CHANGED_KEYFields inherited from class org.ametys.plugins.workflow.AbstractWorkflowComponent
_logger, _manager, CONTEXT_PARAMETERS_KEY, FAIL_CONDITIONS_KEY, RESULT_MAP_KEY, WORKFLOW_VALIDATION_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcontextualize(Context context) getLabel()Get the label for this conditionbooleanpassesCondition(Map transientVars, Map args, com.opensymphony.module.propertyset.PropertySet ps) Methods inherited from class org.ametys.cms.workflow.AbstractContentWorkflowComponent
getContent, serviceMethods inherited from class org.ametys.plugins.workflow.AbstractWorkflowComponent
addWorkflowError, addWorkflowWarning, enableLogging, getConditionFailures, getContextParameters, getResultsMap, getUserMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.plugins.workflow.EnhancedCondition
getArguments, getFullLabel, getVisibilities
-
Field Details
-
ALLOW_SCHEDULED_ACTION
Set a transientVars or request param to true with this key to ignore this condition -
_context
The avalon context
-
-
Constructor Details
-
ScheduledPublicationCondition
public ScheduledPublicationCondition()
-
-
Method Details
-
contextualize
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
passesCondition
public boolean passesCondition(Map transientVars, Map args, com.opensymphony.module.propertyset.PropertySet ps) throws com.opensymphony.workflow.WorkflowException - Specified by:
passesConditionin interfacecom.opensymphony.workflow.Condition- Throws:
com.opensymphony.workflow.WorkflowException
-
getLabel
Description copied from interface:EnhancedConditionGet the label for this condition- Specified by:
getLabelin interfaceEnhancedCondition- Returns:
- the label
-