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 the
PublishedDocumentFactory
for core implementation using native proxy system with
validation workflow.- Author:
- Thomas Roger, Thierry Martins, Antoine Taillefer
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
protected LookupState
static final String
static final String
Fields inherited from class org.nuxeo.ecm.platform.publisher.api.AbstractBasePublishedDocumentFactory
coreSession, ENABLE_SNAPSHOT, eventProducer, parameters, publicationTree, TARGET_PUBLISHED_DOCUMENT_STATE, validatorsRule
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canManagePublishing
(PublishedDocument publishedDocument) protected void
createTask
(DocumentModel document, CoreSession session, NuxeoPrincipal principal) protected void
endTask
(DocumentModel document, NuxeoPrincipal currentUser, CoreSession session, String comment, PublishingEvent event) protected DocumentModel
getLiveDocument
(CoreSession session, DocumentModel proxy) protected TaskService
protected boolean
hasValidationTask
(DocumentModel proxy, NuxeoPrincipal currentUser) boolean
hasValidationTask
(PublishedDocument publishedDocument) void
init
(CoreSession coreSession, ValidatorsRule validatorsRule, Map<String, String> parameters) protected boolean
isPublished
(PublishedDocument publishedDocument, CoreSession session) protected boolean
isPublishedDocWaitingForPublication
(DocumentModel doc, CoreSession session) protected boolean
isValidator
(DocumentModel document, NuxeoPrincipal principal) publishDocument
(DocumentModel doc, PublicationNode targetNode, Map<String, String> params) protected void
removeACL
(DocumentModel document, CoreSession coreSession) protected void
protected void
removeProxy
(DocumentModel doc, CoreSession coreSession) protected void
restrictPermission
(DocumentModel newProxy, NuxeoPrincipal principal, CoreSession coreSession, ACL acl) void
void
void
validatorPublishDocument
(PublishedDocument publishedDocument, String comment) A validator (the current user) approves the publication.void
validatorRejectPublication
(PublishedDocument publishedDocument, String comment) A validator (the current user) rejects the publication.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 Details
-
TASK_NAME
- See Also:
-
ACL_NAME
- See Also:
-
JBPM_ACL_NAME
- See Also:
-
PUBLISH_TASK_TYPE
- See Also:
-
LOOKUP_STATE_PARAM_KEY
- See Also:
-
LOOKUP_STATE_PARAM_BYACL
- See Also:
-
LOOKUP_STATE_PARAM_BYTASK
- See Also:
-
lookupState
-
-
Constructor Details
-
CoreProxyWithWorkflowFactory
public CoreProxyWithWorkflowFactory()
-
-
Method Details
-
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
-
isValidator
-
restrictPermission
protected void restrictPermission(DocumentModel newProxy, NuxeoPrincipal principal, CoreSession coreSession, ACL acl) -
createTask
-
getTaskService
-
removeExistingProxiesOnPreviousVersions
-
validatorPublishDocument
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
-
endTask
protected void endTask(DocumentModel document, NuxeoPrincipal currentUser, CoreSession session, String comment, PublishingEvent event) -
getLiveDocument
-
validatorRejectPublication
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
-
wrapDocumentModel
- Specified by:
wrapDocumentModel
in interfacePublishedDocumentFactory
- Overrides:
wrapDocumentModel
in classCoreProxyFactory
-
isPublished
-
canManagePublishing
- Specified by:
canManagePublishing
in interfacePublishedDocumentFactory
- Overrides:
canManagePublishing
in classAbstractBasePublishedDocumentFactory
-
hasValidationTask
-
hasValidationTask
- Specified by:
hasValidationTask
in interfacePublishedDocumentFactory
- Overrides:
hasValidationTask
in classAbstractBasePublishedDocumentFactory
-