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, wait
publishDocument, wrapDocumentModel
public 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 PublishedDocumentFactory
public void init(CoreSession coreSession, Map<String,String> parameters)
init
in interface PublishedDocumentFactory
public String getName()
getName
in interface PublishedDocumentFactory
protected String getParameter(String name)
protected boolean isSnapshotingEnabled()
protected String getTargetPublishedDocumentState()
public PublishedDocument publishDocument(DocumentModel doc, PublicationNode targetNode)
publishDocument
in interface PublishedDocumentFactory
protected boolean needToVersionDocument(DocumentModel doc)
public DocumentModel snapshotDocumentBeforePublish(DocumentModel doc)
snapshotDocumentBeforePublish
in interface PublishedDocumentFactory
public String[] getValidatorsFor(DocumentModel dm)
PublishedDocumentFactory
getValidatorsFor
in interface PublishedDocumentFactory
dm
- a Nuxeo Core document model. (the document that just has been published)public ValidatorsRule getValidatorsRule()
PublishedDocumentFactory
getValidatorsRule
in interface PublishedDocumentFactory
public void validatorPublishDocument(PublishedDocument publishedDocument, String comment)
PublishedDocumentFactory
validatorPublishDocument
in interface PublishedDocumentFactory
publishedDocument
- the current published document that will be approvedpublic void validatorRejectPublication(PublishedDocument publishedDocument, String comment)
PublishedDocumentFactory
validatorRejectPublication
in interface PublishedDocumentFactory
publishedDocument
- the currently published document that will be rejectedpublic boolean canManagePublishing(PublishedDocument publishedDocument)
canManagePublishing
in interface PublishedDocumentFactory
public boolean hasValidationTask(PublishedDocument publishedDocument)
hasValidationTask
in interface PublishedDocumentFactory
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)
protected EventProducer getEventProducer()
Copyright © 2016 Nuxeo SA. All rights reserved.