Class AbstractBasePublishedDocumentFactory
java.lang.Object
org.nuxeo.ecm.platform.publisher.api.AbstractBasePublishedDocumentFactory
- All Implemented Interfaces:
PublishedDocumentFactory
- Direct Known Subclasses:
CoreProxyFactory
public abstract class AbstractBasePublishedDocumentFactory
extends Object
implements PublishedDocumentFactory
-
Field Summary
Modifier and TypeFieldDescriptionprotected CoreSession
static final String
protected EventProducer
protected PublicationTree
static final String
protected ValidatorsRule
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canManagePublishing
(PublishedDocument publishedDocument) protected EventProducer
getName()
protected String
getParameter
(String name) protected String
String[]
Computes the list of publishing validators given the document model of the document just published.Returns the registered section validators rule.boolean
hasValidationTask
(PublishedDocument publishedDocument) void
init
(CoreSession coreSession, Map<String, String> parameters) void
init
(CoreSession coreSession, ValidatorsRule validatorsRule, Map<String, String> parameters) protected boolean
protected boolean
protected void
notifyEvent
(String eventId, Map<String, Serializable> properties, String comment, String category, DocumentModel dm, CoreSession coreSession) protected void
notifyEvent
(PublishingEvent event, DocumentModel doc, CoreSession coreSession) publishDocument
(DocumentModel doc, PublicationNode targetNode) 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 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
publishDocument, wrapDocumentModel
-
Field Details
-
ENABLE_SNAPSHOT
- See Also:
-
TARGET_PUBLISHED_DOCUMENT_STATE
- See Also:
-
coreSession
-
parameters
-
publicationTree
-
validatorsRule
-
eventProducer
-
-
Constructor Details
-
AbstractBasePublishedDocumentFactory
public AbstractBasePublishedDocumentFactory()
-
-
Method Details
-
init
public void init(CoreSession coreSession, ValidatorsRule validatorsRule, Map<String, String> parameters) - Specified by:
init
in interfacePublishedDocumentFactory
-
init
- Specified by:
init
in interfacePublishedDocumentFactory
-
getName
- Specified by:
getName
in interfacePublishedDocumentFactory
-
getParameter
-
isSnapshotingEnabled
protected boolean isSnapshotingEnabled() -
getTargetPublishedDocumentState
-
publishDocument
- Specified by:
publishDocument
in interfacePublishedDocumentFactory
-
needToVersionDocument
-
snapshotDocumentBeforePublish
- Specified by:
snapshotDocumentBeforePublish
in interfacePublishedDocumentFactory
-
getValidatorsFor
Description copied from interface:PublishedDocumentFactory
Computes the list of publishing validators given the document model of the document just published. The string can be prefixed with 'group:' or 'user:'. If there is no prefix (no : in the string) it is assumed to be a user.- Specified by:
getValidatorsFor
in interfacePublishedDocumentFactory
- Parameters:
dm
- a Nuxeo Core document model. (the document that just has been published)- Returns:
- a list of principal names.
-
getValidatorsRule
Description copied from interface:PublishedDocumentFactory
Returns the registered section validators rule.- Specified by:
getValidatorsRule
in interfacePublishedDocumentFactory
- Returns:
- a validators rule
-
validatorPublishDocument
Description copied from interface:PublishedDocumentFactory
A validator (the current user) approves the publication.- Specified by:
validatorPublishDocument
in interfacePublishedDocumentFactory
- Parameters:
publishedDocument
- the current published document that will be approved
-
validatorRejectPublication
Description copied from interface:PublishedDocumentFactory
A validator (the current user) rejects the publication.- Specified by:
validatorRejectPublication
in interfacePublishedDocumentFactory
- Parameters:
publishedDocument
- the currently published document that will be rejected
-
canManagePublishing
- Specified by:
canManagePublishing
in interfacePublishedDocumentFactory
-
hasValidationTask
- Specified by:
hasValidationTask
in interfacePublishedDocumentFactory
-
notifyEvent
-
notifyEvent
protected void notifyEvent(String eventId, Map<String, Serializable> properties, String comment, String category, DocumentModel dm, CoreSession coreSession) -
getEventProducer
-