public class RestoreRevisionFunction extends AbstractContentFunction
EditContentFunction, which does the real job.| Modifier and Type | Field and Description |
|---|---|
protected ContentTypeExtensionPoint |
_cTypeEP
The content type extension point.
|
protected ContentTypesHelper |
_cTypeHelper
The content type helper.
|
protected JSONUtils |
_jsonUtils
The JSON conversion utilities.
|
protected AmetysObjectResolver |
_resolver
The ametys object resolver.
|
_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 |
|---|
RestoreRevisionFunction() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(Map transientVars,
Map args,
com.opensymphony.module.propertyset.PropertySet ps) |
protected void |
processBinaryMetadata(CompositeMetadata metaHolder,
String metaName,
MetadataDefinition metaDef,
String metaPath,
Map<String,Object> newValues)
Get the value from a binary old content metadata and put it in the new values map.
|
protected void |
processCompositeMetadata(CompositeMetadata metaHolder,
String metaName,
MetadataDefinition metaDef,
String metaPath,
Map<String,Object> newValues,
Map<String,Object> brokenReferences)
Get the value from a Composite old content metadata and put it in the new values map.
|
protected void |
processContentMetadata(CompositeMetadata metaHolder,
String metaName,
MetadataDefinition metaDef,
String metaPath,
Map<String,Object> newValues,
Map<String,Object> brokenReferences)
Get the value from a Content old content metadata and put it in the new values map.
|
protected void |
processDateMetadata(CompositeMetadata metaHolder,
String metaName,
MetadataDefinition metaDef,
String metaPath,
Map<String,Object> newValues)
Get the value from a Date old content metadata and put it in the new values map.
|
protected void |
processDatetimeMetadata(CompositeMetadata metaHolder,
String metaName,
MetadataDefinition metaDef,
String metaPath,
Map<String,Object> newValues)
Get the value from a DateTime old content metadata and put it in the new values map.
|
protected void |
processFileMetadata(CompositeMetadata metaHolder,
String metaName,
MetadataDefinition metaDef,
String metaPath,
Map<String,Object> newValues)
Get the value from a File old content metadata and put it in the new values map.
|
protected void |
processGeocodeMetadata(CompositeMetadata metaHolder,
String metaName,
MetadataDefinition metaDef,
String metaPath,
Map<String,Object> newValues)
Get the value from a geocode old content metadata and put it in the new values map.
|
protected void |
processMetadata(CompositeMetadata metaHolder,
String metaName,
MetadataDefinition metaDef,
String metaPath,
Map<String,Object> newValues,
Map<String,Object> brokenReferences)
Process a metadata from the old content.
|
protected void |
processMetadatas(CompositeMetadata metaHolder,
MetadataDefinition metaDef,
String metaPath,
Map<String,Object> newValues,
Map<String,Object> brokenReferences)
Process the old content metadatas.
|
protected void |
processMetadatas(Content content,
Content oldContent,
Map<String,Object> newValues,
Map<String,Object> brokenReferences)
Process the old content metadatas.
|
protected void |
processMultilingualStringMetadata(CompositeMetadata metaHolder,
String metaName,
MetadataDefinition metaDef,
String metaPath,
Map<String,Object> newValues)
Get the value from a
MultilingualString old content metadata and put it in the new values map. |
protected void |
processReferenceMetadata(CompositeMetadata metaHolder,
String metaName,
MetadataDefinition metaDef,
String metaPath,
Map<String,Object> newValues,
Map<String,Object> brokenReferences)
Get the value from a Reference old content metadata and put it in the new values map.
|
protected void |
processRichtextMetadata(CompositeMetadata metaHolder,
String metaName,
MetadataDefinition metaDef,
String metaPath,
Map<String,Object> newValues)
Get the value from a RichText old content metadata and put it in the new values map.
|
protected void |
processStringMetadata(CompositeMetadata metaHolder,
String metaName,
MetadataDefinition metaDef,
String metaPath,
Map<String,Object> newValues)
Get the value from a String old content metadata and put it in the new values map.
|
protected void |
processUserMetadata(CompositeMetadata metaHolder,
String metaName,
MetadataDefinition metaDef,
String metaPath,
Map<String,Object> newValues)
Get the value from a user old content metadata and put it in the new values map.
|
void |
service(ServiceManager manager) |
_addLabel, _addLockToken, _createVersion, _setCurrentStepId, _setCurrentStepIdAndNotify, initializegetContentaddWorkflowError, addWorkflowWarning, enableLogging, getConditionFailures, getContextParameters, getResultsMap, getUserprotected AmetysObjectResolver _resolver
protected ContentTypeExtensionPoint _cTypeEP
protected ContentTypesHelper _cTypeHelper
protected JSONUtils _jsonUtils
public RestoreRevisionFunction()
public void service(ServiceManager manager) 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 processMetadatas(Content content, Content oldContent, Map<String,Object> newValues, Map<String,Object> brokenReferences) throws com.opensymphony.workflow.WorkflowException
content - the current content (the one being modified).oldContent - the old content.newValues - the Map to fill with the old content's values.brokenReferences - the Map of broken references (which could not be restored).com.opensymphony.workflow.WorkflowException - if an error occurs.protected void processMetadatas(CompositeMetadata metaHolder, MetadataDefinition metaDef, String metaPath, Map<String,Object> newValues, Map<String,Object> brokenReferences) throws com.opensymphony.workflow.WorkflowException
metaHolder - the source metadata holder.metaDef - the metadata definition.metaPath - the metadata path.newValues - the Map to fill with the old content's values.brokenReferences - the Map of broken references (which could not be restored).com.opensymphony.workflow.WorkflowException - if an error occurs.protected void processMetadata(CompositeMetadata metaHolder, String metaName, MetadataDefinition metaDef, String metaPath, Map<String,Object> newValues, Map<String,Object> brokenReferences) throws com.opensymphony.workflow.WorkflowException
metaHolder - the source metadata holder.metaName - the metadata name.metaDef - the metadata definition.metaPath - the metadata path.newValues - the Map to fill with the old content's values.brokenReferences - the Map of broken references (which could not be restored).com.opensymphony.workflow.WorkflowException - if an error occurs.protected void processStringMetadata(CompositeMetadata metaHolder, String metaName, MetadataDefinition metaDef, String metaPath, Map<String,Object> newValues)
metaHolder - the source metadata holder.metaName - the metadata name.metaDef - the metadata definition.metaPath - the metadata path.newValues - the Map to fill with the old content's values.protected void processDateMetadata(CompositeMetadata metaHolder, String metaName, MetadataDefinition metaDef, String metaPath, Map<String,Object> newValues)
metaHolder - the source metadata holder.metaName - the metadata name.metaDef - the metadata definition.metaPath - the metadata path.newValues - the Map to fill with the old content's values.protected void processDatetimeMetadata(CompositeMetadata metaHolder, String metaName, MetadataDefinition metaDef, String metaPath, Map<String,Object> newValues)
metaHolder - the source metadata holder.metaName - the metadata name.metaDef - the metadata definition.metaPath - the metadata path.newValues - the Map to fill with the old content's values.protected void processGeocodeMetadata(CompositeMetadata metaHolder, String metaName, MetadataDefinition metaDef, String metaPath, Map<String,Object> newValues)
metaHolder - the source metadata holder.metaName - the metadata name.metaDef - the metadata definition.metaPath - the metadata path.newValues - the Map to fill with the old content's values.protected void processUserMetadata(CompositeMetadata metaHolder, String metaName, MetadataDefinition metaDef, String metaPath, Map<String,Object> newValues)
metaHolder - the source metadata holder.metaName - the metadata name.metaDef - the metadata definition.metaPath - the metadata path.newValues - the Map to fill with the old content's values.protected void processMultilingualStringMetadata(CompositeMetadata metaHolder, String metaName, MetadataDefinition metaDef, String metaPath, Map<String,Object> newValues)
MultilingualString old content metadata and put it in the new values map.metaHolder - the source metadata holder.metaName - the metadata name.metaDef - the metadata definition.metaPath - the metadata path.newValues - the Map to fill with the old content's values.protected void processRichtextMetadata(CompositeMetadata metaHolder, String metaName, MetadataDefinition metaDef, String metaPath, Map<String,Object> newValues) throws com.opensymphony.workflow.WorkflowException
metaHolder - the source metadata holder.metaName - the metadata name.metaDef - the metadata definition.metaPath - the metadata path.newValues - the Map to fill with the old content's values.com.opensymphony.workflow.WorkflowException - if an error occurs.protected void processBinaryMetadata(CompositeMetadata metaHolder, String metaName, MetadataDefinition metaDef, String metaPath, Map<String,Object> newValues)
metaHolder - the source metadata holder.metaName - the metadata name.metaDef - the metadata definition.metaPath - the metadata path.newValues - the Map to fill with the old content's values.protected void processFileMetadata(CompositeMetadata metaHolder, String metaName, MetadataDefinition metaDef, String metaPath, Map<String,Object> newValues)
metaHolder - the source metadata holder.metaName - the metadata name.metaDef - the metadata definition.metaPath - the metadata path.newValues - the Map to fill with the old content's values.protected void processReferenceMetadata(CompositeMetadata metaHolder, String metaName, MetadataDefinition metaDef, String metaPath, Map<String,Object> newValues, Map<String,Object> brokenReferences)
metaHolder - the source metadata holder.metaName - the metadata name.metaDef - the metadata definition.metaPath - the metadata path.newValues - the Map to fill with the old content's values.brokenReferences - the Map of broken references (which could not be restored).protected void processContentMetadata(CompositeMetadata metaHolder, String metaName, MetadataDefinition metaDef, String metaPath, Map<String,Object> newValues, Map<String,Object> brokenReferences)
metaHolder - the source metadata holder.metaName - the metadata name.metaDef - the metadata definition.metaPath - the metadata path.newValues - the Map to fill with the old content's values.brokenReferences - the Map of broken references (which could not be restored).protected void processCompositeMetadata(CompositeMetadata metaHolder, String metaName, MetadataDefinition metaDef, String metaPath, Map<String,Object> newValues, Map<String,Object> brokenReferences) throws com.opensymphony.workflow.WorkflowException
metaHolder - the source metadata holder.metaName - the metadata name.metaDef - the metadata definition.metaPath - the metadata path.newValues - the Map to fill with the old content's values.brokenReferences - the Map of broken references (which could not be restored).com.opensymphony.workflow.WorkflowException - if an error occurs.