public class ValidateMetadataCondition extends AbstractContentWorkflowComponent implements com.opensymphony.workflow.Condition, Initializable
Modifier and Type | Field and Description |
---|---|
private ContentTypeExtensionPoint |
_cTypeEP |
_contentHelper, CONTENT_KEY
_logger, _manager, CONTEXT_PARAMETERS_KEY, FAIL_CONDITIONS_KEY, RESULT_MAP_KEY, WORKFLOW_ERRORS_KEY, WORKFLOW_WARNS_KEY
Constructor and Description |
---|
ValidateMetadataCondition() |
Modifier and Type | Method and Description |
---|---|
private boolean |
_validateCompositeMetadata(CompositeMetadata parentMetadata,
MetadataDefinition metadataDef,
String metadataName,
Errors errors) |
private boolean |
_validateOtherMetadata(CompositeMetadata parentMetadata,
MetadataDefinition metadataDef,
String metadataName,
Errors errors) |
private boolean |
_validateRepeaterMetadata(CompositeMetadata parentMetadata,
MetadataDefinition metadataDef,
String metadataName,
Errors errors) |
protected Object |
getValue(CompositeMetadata metadata,
MetadataDefinition metadataDef,
String metadataName)
Get the metadata value
|
void |
initialize() |
boolean |
passesCondition(Map transientVars,
Map args,
com.opensymphony.module.propertyset.PropertySet ps) |
protected boolean |
validateMetadata(CompositeMetadata parentMetadata,
MetadataDefinition metadataDef,
String metadataName,
Errors errors)
Validate a metadata
|
getContent, service
addWorkflowError, addWorkflowWarning, enableLogging, getConditionFailures, getContextParameters, getResultsMap, getUser
private ContentTypeExtensionPoint _cTypeEP
public ValidateMetadataCondition()
public void initialize() throws Exception
initialize
in interface Initializable
Exception
public boolean passesCondition(Map transientVars, Map args, com.opensymphony.module.propertyset.PropertySet ps) throws com.opensymphony.workflow.WorkflowException
passesCondition
in interface com.opensymphony.workflow.Condition
com.opensymphony.workflow.WorkflowException
protected boolean validateMetadata(CompositeMetadata parentMetadata, MetadataDefinition metadataDef, String metadataName, Errors errors)
parentMetadata
- The parent metadatametadataDef
- The metadata definitionmetadataName
- The metadata nameerrors
- The errorstrue
if metadata is validprivate boolean _validateOtherMetadata(CompositeMetadata parentMetadata, MetadataDefinition metadataDef, String metadataName, Errors errors)
private boolean _validateCompositeMetadata(CompositeMetadata parentMetadata, MetadataDefinition metadataDef, String metadataName, Errors errors)
private boolean _validateRepeaterMetadata(CompositeMetadata parentMetadata, MetadataDefinition metadataDef, String metadataName, Errors errors)
protected Object getValue(CompositeMetadata metadata, MetadataDefinition metadataDef, String metadataName)
metadata
- The metadatametadataDef
- The metadata definitionmetadataName
- The metadata name