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
FieldsModifier and TypeFieldDescriptionprotected CoreSessionstatic final Stringprotected EventProducerprotected PublicationTreestatic final Stringprotected ValidatorsRule -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanManagePublishing(PublishedDocument publishedDocument) protected EventProducergetName()protected StringgetParameter(String name) protected StringString[]Computes the list of publishing validators given the document model of the document just published.Returns the registered section validators rule.booleanhasValidationTask(PublishedDocument publishedDocument) voidinit(CoreSession coreSession, Map<String, String> parameters) voidinit(CoreSession coreSession, ValidatorsRule validatorsRule, Map<String, String> parameters) protected booleanprotected booleanprotected voidnotifyEvent(String eventId, Map<String, Serializable> properties, String comment, String category, DocumentModel dm, CoreSession coreSession) protected voidnotifyEvent(PublishingEvent event, DocumentModel doc, CoreSession coreSession) publishDocument(DocumentModel doc, PublicationNode targetNode) voidvalidatorPublishDocument(PublishedDocument publishedDocument, String comment) A validator (the current user) approves the publication.voidvalidatorRejectPublication(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, waitMethods 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:
initin interfacePublishedDocumentFactory
-
init
- Specified by:
initin interfacePublishedDocumentFactory
-
getName
- Specified by:
getNamein interfacePublishedDocumentFactory
-
getParameter
-
isSnapshotingEnabled
protected boolean isSnapshotingEnabled() -
getTargetPublishedDocumentState
-
publishDocument
- Specified by:
publishDocumentin interfacePublishedDocumentFactory
-
needToVersionDocument
-
snapshotDocumentBeforePublish
- Specified by:
snapshotDocumentBeforePublishin interfacePublishedDocumentFactory
-
getValidatorsFor
Description copied from interface:PublishedDocumentFactoryComputes 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:
getValidatorsForin 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:PublishedDocumentFactoryReturns the registered section validators rule.- Specified by:
getValidatorsRulein interfacePublishedDocumentFactory- Returns:
- a validators rule
-
validatorPublishDocument
Description copied from interface:PublishedDocumentFactoryA validator (the current user) approves the publication.- Specified by:
validatorPublishDocumentin interfacePublishedDocumentFactory- Parameters:
publishedDocument- the current published document that will be approved
-
validatorRejectPublication
Description copied from interface:PublishedDocumentFactoryA validator (the current user) rejects the publication.- Specified by:
validatorRejectPublicationin interfacePublishedDocumentFactory- Parameters:
publishedDocument- the currently published document that will be rejected
-
canManagePublishing
- Specified by:
canManagePublishingin interfacePublishedDocumentFactory
-
hasValidationTask
- Specified by:
hasValidationTaskin interfacePublishedDocumentFactory
-
notifyEvent
-
notifyEvent
protected void notifyEvent(String eventId, Map<String, Serializable> properties, String comment, String category, DocumentModel dm, CoreSession coreSession) -
getEventProducer
-