public class CreateContentByCopyFunction extends CreateContentFunction
| Modifier and Type | Field and Description | 
|---|---|
| protected CopyContentMetadataComponent | _copyContentMetadataHelperThe metadata copy component | 
| protected ContentTypesHelper | _cTypesHelperThe content type helper | 
| protected I18nUtils | _i18nUtilsI18n Utils | 
| static String | BASE_CONTENT_IDConstant for storing the id of base content used for the duplication into the transient variables map. | 
| static String | BASE_CONTENT_KEYConstant for storing the base content used for the duplication into the transient variables map. | 
| static String | COPY_MAP_KEYConstant for storing the map containing the duplication info into the transient variables map. | 
| static String | COPY_METADATASET_NAMEConstant for storing the name of metadata set to use for copy. | 
| static String | COPY_METADATASET_TYPEConstant for storing the type of metadata set to use for copy. | 
| static String | COPY_REPORT_KEYConstant for storing the copy report object into the transient variables map. | 
_contentTypeEP, _contentTypeHelper, _observationManager, _resolver, CONTENT_LANGUAGE_KEY, CONTENT_MIXINS_KEY, CONTENT_NAME_KEY, CONTENT_TITLE_KEY, CONTENT_TITLE_VARIANTS_KEY, CONTENT_TYPES_KEY, PARENT_CONTENT_ID_KEY, PARENT_CONTENT_METADATA_PATH_KEY_contentHelper, CONTENT_KEY_logger, _manager, CONTEXT_PARAMETERS_KEY, FAIL_CONDITIONS_KEY, RESULT_MAP_KEY, WORKFLOW_ERRORS_KEY, WORKFLOW_WARNS_KEY| Constructor and Description | 
|---|
| CreateContentByCopyFunction() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected Map<String,Object> | _buildCopyMap(Map transientVars,
             Content baseContent,
             String metadataSetName,
             String metadataSetType)Get the builded copy map | 
| protected void | _populateAdditionalData(Map transientVars,
                       ModifiableContent content)Populate the content. | 
| void | execute(Map transientVars,
       Map args,
       com.opensymphony.module.propertyset.PropertySet ps) | 
| protected Content | getBaseContentForCopy(Map transientVars)Get the content | 
| void | service(ServiceManager manager) | 
_createContent, _getContentRoot, _getNonNullVar, _getObjectType, _getSubContentRoot, _isMultilingual, _notifyContentAdded, _populateContent, _setTitle, getSystemUsergetContentaddWorkflowError, addWorkflowWarning, enableLogging, getConditionFailures, getContextParameters, getResultsMap, getUserpublic static final String BASE_CONTENT_KEY
public static final String BASE_CONTENT_ID
public static final String COPY_MAP_KEY
public static final String COPY_REPORT_KEY
public static final String COPY_METADATASET_NAME
public static final String COPY_METADATASET_TYPE
protected CopyContentMetadataComponent _copyContentMetadataHelper
protected ContentTypesHelper _cTypesHelper
protected I18nUtils _i18nUtils
public CreateContentByCopyFunction()
public void service(ServiceManager manager) throws ServiceException
service in interface Serviceableservice in class CreateContentFunctionServiceExceptionpublic void execute(Map transientVars, Map args, com.opensymphony.module.propertyset.PropertySet ps) throws com.opensymphony.workflow.WorkflowException
execute in interface com.opensymphony.workflow.FunctionProviderexecute in class CreateContentFunctioncom.opensymphony.workflow.WorkflowExceptionprotected Content getBaseContentForCopy(Map transientVars)
transientVars - The workflow transiant vars with BASE_CONTENT_KEY (the content itself) or BASE_CONTENT_ID (the id of the content)protected void _populateAdditionalData(Map transientVars, ModifiableContent content) throws com.opensymphony.workflow.WorkflowException
CreateContentFunction_populateAdditionalData in class CreateContentFunctiontransientVars - the transient variables.content - the content.com.opensymphony.workflow.WorkflowException - if an error occurs.protected Map<String,Object> _buildCopyMap(Map transientVars, Content baseContent, String metadataSetName, String metadataSetType)
transientVars - the varsbaseContent - the base content to be copiedmetadataSetName - the metadata set namemetadataSetType - the metadata set type