public abstract class AbstractBasePublishedDocumentFactory extends Object implements PublishedDocumentFactory
| Modifier and Type | Field and Description |
|---|---|
protected CoreSession |
coreSession |
static String |
ENABLE_SNAPSHOT |
protected EventProducer |
eventProducer |
protected Map<String,String> |
parameters |
protected PublicationTree |
publicationTree |
static String |
TARGET_PUBLISHED_DOCUMENT_STATE |
protected ValidatorsRule |
validatorsRule |
| Constructor and Description |
|---|
AbstractBasePublishedDocumentFactory() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canManagePublishing(PublishedDocument publishedDocument) |
protected EventProducer |
getEventProducer() |
String |
getName() |
protected String |
getParameter(String name) |
protected String |
getTargetPublishedDocumentState() |
String[] |
getValidatorsFor(DocumentModel dm)
Computes the list of publishing validators given the document model of the document just published.
|
ValidatorsRule |
getValidatorsRule()
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 |
isSnapshotingEnabled() |
protected boolean |
needToVersionDocument(DocumentModel doc) |
protected void |
notifyEvent(PublishingEvent event,
DocumentModel doc,
CoreSession coreSession) |
protected void |
notifyEvent(String eventId,
Map<String,Serializable> properties,
String comment,
String category,
DocumentModel dm,
CoreSession coreSession) |
PublishedDocument |
publishDocument(DocumentModel doc,
PublicationNode targetNode) |
DocumentModel |
snapshotDocumentBeforePublish(DocumentModel doc) |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublishDocument, wrapDocumentModelpublic static final String ENABLE_SNAPSHOT
public static final String TARGET_PUBLISHED_DOCUMENT_STATE
protected CoreSession coreSession
protected Map<String,String> parameters
protected PublicationTree publicationTree
protected ValidatorsRule validatorsRule
protected EventProducer eventProducer
public AbstractBasePublishedDocumentFactory()
public void init(CoreSession coreSession, ValidatorsRule validatorsRule, Map<String,String> parameters)
init in interface PublishedDocumentFactorypublic void init(CoreSession coreSession, Map<String,String> parameters)
init in interface PublishedDocumentFactorypublic String getName()
getName in interface PublishedDocumentFactoryprotected String getParameter(String name)
protected boolean isSnapshotingEnabled()
protected String getTargetPublishedDocumentState()
public PublishedDocument publishDocument(DocumentModel doc, PublicationNode targetNode)
publishDocument in interface PublishedDocumentFactoryprotected boolean needToVersionDocument(DocumentModel doc)
public DocumentModel snapshotDocumentBeforePublish(DocumentModel doc)
snapshotDocumentBeforePublish in interface PublishedDocumentFactorypublic String[] getValidatorsFor(DocumentModel dm)
PublishedDocumentFactorygetValidatorsFor in interface PublishedDocumentFactorydm - a Nuxeo Core document model. (the document that just has been published)public ValidatorsRule getValidatorsRule()
PublishedDocumentFactorygetValidatorsRule in interface PublishedDocumentFactorypublic void validatorPublishDocument(PublishedDocument publishedDocument, String comment)
PublishedDocumentFactoryvalidatorPublishDocument in interface PublishedDocumentFactorypublishedDocument - the current published document that will be approvedpublic void validatorRejectPublication(PublishedDocument publishedDocument, String comment)
PublishedDocumentFactoryvalidatorRejectPublication in interface PublishedDocumentFactorypublishedDocument - the currently published document that will be rejectedpublic boolean canManagePublishing(PublishedDocument publishedDocument)
canManagePublishing in interface PublishedDocumentFactorypublic boolean hasValidationTask(PublishedDocument publishedDocument)
hasValidationTask in interface PublishedDocumentFactoryprotected void notifyEvent(PublishingEvent event, DocumentModel doc, CoreSession coreSession)
protected void notifyEvent(String eventId, Map<String,Serializable> properties, String comment, String category, DocumentModel dm, CoreSession coreSession)
protected EventProducer getEventProducer()
Copyright © 2015 Nuxeo SA. All rights reserved.