public class ValidateODFContentFunction extends AbstractContentFunction
| Modifier and Type | Field and Description |
|---|---|
protected ContentWorkflowHelper |
_contentWorkflowHelper
The workflow helper for contents
|
protected ODFHelper |
_odfHelper
The ODF helper
|
protected ODFWorkflowHelper |
_odfWorkflowHelper
The ODF workflow helper
|
protected AmetysObjectResolver |
_resolver
The Ametys object resolver
|
static int |
GLOBAL_VALIDATE_ACTION_ID
The action id of global validation
|
static String |
INVALIDATED_CONTENTS_KEY
Constant for storing the result map into the transient variables map.
|
static String |
VALID_LABEL
Label for the validated version of contents.
|
static int |
VALIDATE_ACTION_ID
The action id of global validation
|
static String |
VALIDATE_RECURSIVELY_ARG
Label for the validated version of contents.
|
static int |
VALIDATED_STEP_ID
The validate step id
|
_observationManager, _workflowProvider_contentHelper, CONTENT_KEY_logger, _manager, CONTEXT_PARAMETERS_KEY, FAIL_CONDITIONS_KEY, RESULT_MAP_KEY, WORKFLOW_ERRORS_KEY, WORKFLOW_WARNS_KEY| Constructor and Description |
|---|
ValidateODFContentFunction() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
_doValidateWorkflowAction(WorkflowAwareContent content,
Map transientVars,
int actionId)
Validate a content
|
protected Map<String,Object> |
_getInputs(Content content,
Map transientVars)
Get inputs
|
protected Set<String> |
_getInvalidatedContents(Map transientVars)
Get the contents that were not validated during global validation
|
protected void |
_notifyObservers(Map transientVars,
Content content)
Notify observers of content validation
|
protected void |
_validateContent(ModifiableWorkflowAwareContent content)
Validates the content.
|
protected void |
_validateRecursively(WorkflowAwareContent content,
Map transientVars)
Validate the referenced contents recursively
|
protected void |
_validateReferencedContents(Collection<String> contentIds,
Map transientVars)
Validate the list of contents
|
void |
execute(Map transientVars,
Map args,
com.opensymphony.module.propertyset.PropertySet ps) |
void |
service(ServiceManager smanager) |
_addLabel, _addLockToken, _createVersion, _setCurrentStepId, _setCurrentStepIdAndNotify, initializegetContentaddWorkflowError, addWorkflowWarning, enableLogging, getConditionFailures, getContextParameters, getResultsMap, getUserpublic static final String VALID_LABEL
public static final String VALIDATE_RECURSIVELY_ARG
public static final String INVALIDATED_CONTENTS_KEY
public static final int GLOBAL_VALIDATE_ACTION_ID
public static final int VALIDATE_ACTION_ID
public static final int VALIDATED_STEP_ID
protected AmetysObjectResolver _resolver
protected ContentWorkflowHelper _contentWorkflowHelper
protected ODFHelper _odfHelper
protected ODFWorkflowHelper _odfWorkflowHelper
public ValidateODFContentFunction()
public void service(ServiceManager smanager) throws ServiceException
service in interface Serviceableservice in class AbstractContentWorkflowComponentServiceExceptionpublic void execute(Map transientVars, Map args, com.opensymphony.module.propertyset.PropertySet ps) throws com.opensymphony.workflow.WorkflowException
com.opensymphony.workflow.WorkflowExceptionprotected void _notifyObservers(Map transientVars, Content content) throws AmetysRepositoryException, com.opensymphony.workflow.WorkflowException
transientVars - The transient variablescontent - The created contentAmetysRepositoryException - If an error occurred with the repositorycom.opensymphony.workflow.WorkflowException - If an error occurred with the workflowprotected void _validateContent(ModifiableWorkflowAwareContent content) throws com.opensymphony.workflow.WorkflowException, RepositoryException
content - the content.com.opensymphony.workflow.WorkflowException - if an error occurs.RepositoryException - if an error occurs.protected void _validateRecursively(WorkflowAwareContent content, Map transientVars) throws com.opensymphony.workflow.WorkflowException
content - The validated contenttransientVars - The parameters from the call.com.opensymphony.workflow.WorkflowException - if an error occursprotected void _validateReferencedContents(Collection<String> contentIds, Map transientVars) throws com.opensymphony.workflow.WorkflowException
contentIds - The id of contents to validatetransientVars - The parameters from the call.com.opensymphony.workflow.WorkflowException - if an error occurredprotected void _doValidateWorkflowAction(WorkflowAwareContent content, Map transientVars, int actionId) throws com.opensymphony.workflow.WorkflowException
content - The content to validatetransientVars - The parameters from the call.actionId - The id of validate actioncom.opensymphony.workflow.WorkflowException - if an error occurredprotected Set<String> _getInvalidatedContents(Map transientVars) throws com.opensymphony.workflow.WorkflowException
transientVars - The parameters from the call.com.opensymphony.workflow.WorkflowException - if failed to get invalidated contents