Class CoreProxyWithWorkflowFactory
- java.lang.Object
-
- org.nuxeo.ecm.platform.publisher.api.AbstractBasePublishedDocumentFactory
-
- org.nuxeo.ecm.platform.publisher.impl.core.CoreProxyFactory
-
- org.nuxeo.ecm.platform.publisher.task.CoreProxyWithWorkflowFactory
-
- All Implemented Interfaces:
PublishedDocumentFactory
- Direct Known Subclasses:
FolderishProxyFactory
,RenditionPublicationFactory
public class CoreProxyWithWorkflowFactory extends CoreProxyFactory implements PublishedDocumentFactory
Implementation of thePublishedDocumentFactory
for core implementation using native proxy system with validation workflow.- Author:
- Thomas Roger, Thierry Martins, Antoine Taillefer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
CoreProxyWithWorkflowFactory.DocumentPublisherUnrestricted
-
Field Summary
Fields Modifier and Type Field Description static String
ACL_NAME
static String
JBPM_ACL_NAME
static String
LOOKUP_STATE_PARAM_BYACL
static String
LOOKUP_STATE_PARAM_BYTASK
static String
LOOKUP_STATE_PARAM_KEY
protected LookupState
lookupState
static String
PUBLISH_TASK_TYPE
static String
TASK_NAME
-
Fields inherited from class org.nuxeo.ecm.platform.publisher.api.AbstractBasePublishedDocumentFactory
coreSession, ENABLE_SNAPSHOT, eventProducer, parameters, publicationTree, TARGET_PUBLISHED_DOCUMENT_STATE, validatorsRule
-
-
Constructor Summary
Constructors Constructor Description CoreProxyWithWorkflowFactory()
-
Method Summary
-
Methods inherited from class org.nuxeo.ecm.platform.publisher.impl.core.CoreProxyFactory
snapshotDocumentBeforePublish, unwrapPublishedDocument
-
Methods inherited from class org.nuxeo.ecm.platform.publisher.api.AbstractBasePublishedDocumentFactory
getEventProducer, getName, getParameter, getTargetPublishedDocumentState, getValidatorsFor, getValidatorsRule, init, isSnapshotingEnabled, needToVersionDocument, notifyEvent, notifyEvent, publishDocument
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.ecm.platform.publisher.api.PublishedDocumentFactory
getName, getValidatorsFor, getValidatorsRule, init, publishDocument, snapshotDocumentBeforePublish
-
-
-
-
Field Detail
-
TASK_NAME
public static final String TASK_NAME
- See Also:
- Constant Field Values
-
ACL_NAME
public static final String ACL_NAME
- See Also:
- Constant Field Values
-
JBPM_ACL_NAME
public static final String JBPM_ACL_NAME
- See Also:
- Constant Field Values
-
PUBLISH_TASK_TYPE
public static final String PUBLISH_TASK_TYPE
- See Also:
- Constant Field Values
-
LOOKUP_STATE_PARAM_KEY
public static final String LOOKUP_STATE_PARAM_KEY
- See Also:
- Constant Field Values
-
LOOKUP_STATE_PARAM_BYACL
public static final String LOOKUP_STATE_PARAM_BYACL
- See Also:
- Constant Field Values
-
LOOKUP_STATE_PARAM_BYTASK
public static final String LOOKUP_STATE_PARAM_BYTASK
- See Also:
- Constant Field Values
-
lookupState
protected LookupState lookupState
-
-
Method Detail
-
init
public void init(CoreSession coreSession, ValidatorsRule validatorsRule, Map<String,String> parameters)
- Specified by:
init
in interfacePublishedDocumentFactory
- Overrides:
init
in classAbstractBasePublishedDocumentFactory
-
setLookupByTask
public void setLookupByTask()
-
setLookupByACL
public void setLookupByACL()
-
publishDocument
public PublishedDocument publishDocument(DocumentModel doc, PublicationNode targetNode, Map<String,String> params)
- Specified by:
publishDocument
in interfacePublishedDocumentFactory
- Overrides:
publishDocument
in classCoreProxyFactory
-
isPublishedDocWaitingForPublication
protected boolean isPublishedDocWaitingForPublication(DocumentModel doc, CoreSession session)
-
isValidator
protected boolean isValidator(DocumentModel document, NuxeoPrincipal principal)
-
restrictPermission
protected void restrictPermission(DocumentModel newProxy, NuxeoPrincipal principal, CoreSession coreSession, ACL acl)
-
createTask
protected void createTask(DocumentModel document, CoreSession session, NuxeoPrincipal principal)
-
getTaskService
protected TaskService getTaskService()
-
removeExistingProxiesOnPreviousVersions
protected void removeExistingProxiesOnPreviousVersions(DocumentModel newProxy)
-
validatorPublishDocument
public void validatorPublishDocument(PublishedDocument publishedDocument, String comment)
Description copied from interface:PublishedDocumentFactory
A validator (the current user) approves the publication.- Specified by:
validatorPublishDocument
in interfacePublishedDocumentFactory
- Overrides:
validatorPublishDocument
in classAbstractBasePublishedDocumentFactory
- Parameters:
publishedDocument
- the current published document that will be approved
-
removeACL
protected void removeACL(DocumentModel document, CoreSession coreSession)
-
endTask
protected void endTask(DocumentModel document, NuxeoPrincipal currentUser, CoreSession session, String comment, PublishingEvent event)
-
getLiveDocument
protected DocumentModel getLiveDocument(CoreSession session, DocumentModel proxy)
-
validatorRejectPublication
public void validatorRejectPublication(PublishedDocument publishedDocument, String comment)
Description copied from interface:PublishedDocumentFactory
A validator (the current user) rejects the publication.- Specified by:
validatorRejectPublication
in interfacePublishedDocumentFactory
- Overrides:
validatorRejectPublication
in classAbstractBasePublishedDocumentFactory
- Parameters:
publishedDocument
- the currently published document that will be rejected
-
removeProxy
protected void removeProxy(DocumentModel doc, CoreSession coreSession)
-
wrapDocumentModel
public PublishedDocument wrapDocumentModel(DocumentModel doc)
- Specified by:
wrapDocumentModel
in interfacePublishedDocumentFactory
- Overrides:
wrapDocumentModel
in classCoreProxyFactory
-
isPublished
protected boolean isPublished(PublishedDocument publishedDocument, CoreSession session)
-
canManagePublishing
public boolean canManagePublishing(PublishedDocument publishedDocument)
- Specified by:
canManagePublishing
in interfacePublishedDocumentFactory
- Overrides:
canManagePublishing
in classAbstractBasePublishedDocumentFactory
-
hasValidationTask
protected boolean hasValidationTask(DocumentModel proxy, NuxeoPrincipal currentUser)
-
hasValidationTask
public boolean hasValidationTask(PublishedDocument publishedDocument)
- Specified by:
hasValidationTask
in interfacePublishedDocumentFactory
- Overrides:
hasValidationTask
in classAbstractBasePublishedDocumentFactory
-
-