public class CoreProxyWithWorkflowFactory extends CoreProxyFactory implements PublishedDocumentFactory
PublishedDocumentFactory
for core implementation using native proxy system with
validation workflow.Modifier and Type | Class and Description |
---|---|
protected class |
CoreProxyWithWorkflowFactory.DocumentPublisherUnrestricted |
Modifier and Type | Field and 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 |
coreSession, ENABLE_SNAPSHOT, eventProducer, parameters, publicationTree, TARGET_PUBLISHED_DOCUMENT_STATE, validatorsRule
Constructor and Description |
---|
CoreProxyWithWorkflowFactory() |
snapshotDocumentBeforePublish, unwrapPublishedDocument
getEventProducer, getName, getParameter, getTargetPublishedDocumentState, getValidatorsFor, getValidatorsRule, init, isSnapshotingEnabled, needToVersionDocument, notifyEvent, notifyEvent, publishDocument
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName, getValidatorsFor, getValidatorsRule, init, publishDocument, snapshotDocumentBeforePublish
public static final String TASK_NAME
public static final String ACL_NAME
public static final String JBPM_ACL_NAME
public static final String PUBLISH_TASK_TYPE
public static final String LOOKUP_STATE_PARAM_KEY
public static final String LOOKUP_STATE_PARAM_BYACL
public static final String LOOKUP_STATE_PARAM_BYTASK
protected LookupState lookupState
public CoreProxyWithWorkflowFactory()
public void init(CoreSession coreSession, ValidatorsRule validatorsRule, Map<String,String> parameters)
init
in interface PublishedDocumentFactory
init
in class AbstractBasePublishedDocumentFactory
public void setLookupByTask()
public void setLookupByACL()
public PublishedDocument publishDocument(DocumentModel doc, PublicationNode targetNode, Map<String,String> params)
publishDocument
in interface PublishedDocumentFactory
publishDocument
in class CoreProxyFactory
protected boolean isPublishedDocWaitingForPublication(DocumentModel doc, CoreSession session)
protected boolean isValidator(DocumentModel document, NuxeoPrincipal principal)
protected void restrictPermission(DocumentModel newProxy, NuxeoPrincipal principal, CoreSession coreSession, ACL acl)
protected void createTask(DocumentModel document, CoreSession session, NuxeoPrincipal principal)
protected TaskService getTaskService()
protected void removeExistingProxiesOnPreviousVersions(DocumentModel newProxy)
public void validatorPublishDocument(PublishedDocument publishedDocument, String comment)
PublishedDocumentFactory
validatorPublishDocument
in interface PublishedDocumentFactory
validatorPublishDocument
in class AbstractBasePublishedDocumentFactory
publishedDocument
- the current published document that will be approvedprotected void removeACL(DocumentModel document, CoreSession coreSession)
protected void endTask(DocumentModel document, NuxeoPrincipal currentUser, CoreSession session, String comment, PublishingEvent event)
protected DocumentModel getLiveDocument(CoreSession session, DocumentModel proxy)
public void validatorRejectPublication(PublishedDocument publishedDocument, String comment)
PublishedDocumentFactory
validatorRejectPublication
in interface PublishedDocumentFactory
validatorRejectPublication
in class AbstractBasePublishedDocumentFactory
publishedDocument
- the currently published document that will be rejectedprotected void removeProxy(DocumentModel doc, CoreSession coreSession)
public PublishedDocument wrapDocumentModel(DocumentModel doc)
wrapDocumentModel
in interface PublishedDocumentFactory
wrapDocumentModel
in class CoreProxyFactory
protected boolean isPublished(PublishedDocument publishedDocument, CoreSession session)
public boolean canManagePublishing(PublishedDocument publishedDocument)
canManagePublishing
in interface PublishedDocumentFactory
canManagePublishing
in class AbstractBasePublishedDocumentFactory
protected boolean hasValidationTask(DocumentModel proxy, NuxeoPrincipal currentUser)
public boolean hasValidationTask(PublishedDocument publishedDocument)
hasValidationTask
in interface PublishedDocumentFactory
hasValidationTask
in class AbstractBasePublishedDocumentFactory
Copyright © 2018 Nuxeo. All rights reserved.