Class RestoreRevisionFunction

    • Method Detail

      • execute

        public void execute​(Map transientVars,
                            Map args,
                            com.opensymphony.module.propertyset.PropertySet ps)
                     throws com.opensymphony.workflow.WorkflowException
        Throws:
        com.opensymphony.workflow.WorkflowException
      • processMetadatas

        protected void processMetadatas​(Content content,
                                        Content oldContent,
                                        Map<String,​Object> newValues,
                                        Map<String,​Object> brokenReferences)
                                 throws com.opensymphony.workflow.WorkflowException
        Process the old content metadatas.
        Parameters:
        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).
        Throws:
        com.opensymphony.workflow.WorkflowException - if an error occurs.
      • processMetadatas

        protected void processMetadatas​(CompositeMetadata metaHolder,
                                        MetadataDefinition metaDef,
                                        String metaPath,
                                        Map<String,​Object> newValues,
                                        Map<String,​Object> brokenReferences)
                                 throws com.opensymphony.workflow.WorkflowException
        Process the old content metadatas.
        Parameters:
        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).
        Throws:
        com.opensymphony.workflow.WorkflowException - if an error occurs.
      • processMetadata

        protected void processMetadata​(CompositeMetadata metaHolder,
                                       String metaName,
                                       MetadataDefinition metaDef,
                                       String metaPath,
                                       Map<String,​Object> newValues,
                                       Map<String,​Object> brokenReferences)
                                throws com.opensymphony.workflow.WorkflowException
        Process a metadata from the old content.
        Parameters:
        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).
        Throws:
        com.opensymphony.workflow.WorkflowException - if an error occurs.
      • processStringMetadata

        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.
        Parameters:
        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.
      • processDateMetadata

        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.
        Parameters:
        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.
      • processDatetimeMetadata

        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.
        Parameters:
        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.
      • processGeocodeMetadata

        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.
        Parameters:
        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.
      • processUserMetadata

        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.
        Parameters:
        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.
      • processRichtextMetadata

        protected void processRichtextMetadata​(CompositeMetadata metaHolder,
                                               String metaName,
                                               MetadataDefinition metaDef,
                                               String metaPath,
                                               Map<String,​Object> newValues)
                                        throws com.opensymphony.workflow.WorkflowException
        Get the value from a RichText old content metadata and put it in the new values map.
        Parameters:
        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.
        Throws:
        com.opensymphony.workflow.WorkflowException - if an error occurs.
      • processBinaryMetadata

        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.
        Parameters:
        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.
      • processFileMetadata

        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.
        Parameters:
        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.
      • processReferenceMetadata

        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.
        Parameters:
        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).
      • processContentMetadata

        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.
        Parameters:
        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).
      • processCompositeMetadata

        protected void processCompositeMetadata​(CompositeMetadata metaHolder,
                                                String metaName,
                                                MetadataDefinition metaDef,
                                                String metaPath,
                                                Map<String,​Object> newValues,
                                                Map<String,​Object> brokenReferences)
                                         throws com.opensymphony.workflow.WorkflowException
        Get the value from a Composite old content metadata and put it in the new values map.
        Parameters:
        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).
        Throws:
        com.opensymphony.workflow.WorkflowException - if an error occurs.