org.nuxeo.ecm.platform.publisher.api
Class AbstractBasePublishedDocumentFactory
java.lang.Object
org.nuxeo.ecm.platform.publisher.api.AbstractBasePublishedDocumentFactory
- All Implemented Interfaces:
- PublishedDocumentFactory
- Direct Known Subclasses:
- ClientProxyFactory, CoreProxyFactory, FSPublishedDocumentFactory, SimpleExternalDocumentModelFactory
public abstract class AbstractBasePublishedDocumentFactory
- extends Object
- implements PublishedDocumentFactory
ENABLE_SNAPSHOT
public static final String ENABLE_SNAPSHOT
- See Also:
- Constant Field Values
TARGET_PUBLISHED_DOCUMENT_STATE
public static final String TARGET_PUBLISHED_DOCUMENT_STATE
- See Also:
- Constant Field Values
AbstractBasePublishedDocumentFactory
public AbstractBasePublishedDocumentFactory()
init
public void init(CoreSession coreSession,
ValidatorsRule validatorsRule,
Map<String,String> parameters)
throws ClientException
- Specified by:
init
in interface PublishedDocumentFactory
- Throws:
ClientException
init
public void init(CoreSession coreSession,
Map<String,String> parameters)
throws ClientException
- Specified by:
init
in interface PublishedDocumentFactory
- Throws:
ClientException
getName
public String getName()
- Specified by:
getName
in interface PublishedDocumentFactory
publishDocument
public PublishedDocument publishDocument(DocumentModel doc,
PublicationNode targetNode)
throws ClientException
- Specified by:
publishDocument
in interface PublishedDocumentFactory
- Throws:
ClientException
snapshotDocumentBeforePublish
public DocumentModel snapshotDocumentBeforePublish(DocumentModel doc)
throws ClientException
- Specified by:
snapshotDocumentBeforePublish
in interface PublishedDocumentFactory
- Throws:
ClientException
getValidatorsFor
public String[] getValidatorsFor(DocumentModel dm)
throws PublishingValidatorException
- 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 interface PublishedDocumentFactory
- Parameters:
dm
- a Nuxeo Core document model. (the document that just has been
published)
- Returns:
- a list of principal names.
- Throws:
PublishingValidatorException
getValidatorsRule
public ValidatorsRule getValidatorsRule()
throws PublishingValidatorException
- Description copied from interface:
PublishedDocumentFactory
- Returns the registered section validators rule.
- Specified by:
getValidatorsRule
in interface PublishedDocumentFactory
- Returns:
- a validators rule
- Throws:
PublishingValidatorException
validatorPublishDocument
public void validatorPublishDocument(PublishedDocument publishedDocument,
String comment)
throws ClientException
- Description copied from interface:
PublishedDocumentFactory
- A validator (the current user) approves the publication.
- Specified by:
validatorPublishDocument
in interface PublishedDocumentFactory
- Parameters:
publishedDocument
- the current published document that will be
approved
- Throws:
PublishingException
ClientException
validatorRejectPublication
public void validatorRejectPublication(PublishedDocument publishedDocument,
String comment)
throws ClientException
- Description copied from interface:
PublishedDocumentFactory
- A validator (the current user) rejects the publication.
- Specified by:
validatorRejectPublication
in interface PublishedDocumentFactory
- Parameters:
publishedDocument
- the currently published document that will be
rejected
- Throws:
PublishingException
ClientException
canManagePublishing
public boolean canManagePublishing(PublishedDocument publishedDocument)
throws ClientException
- Specified by:
canManagePublishing
in interface PublishedDocumentFactory
- Throws:
ClientException
hasValidationTask
public boolean hasValidationTask(PublishedDocument publishedDocument)
throws ClientException
- Specified by:
hasValidationTask
in interface PublishedDocumentFactory
- Throws:
ClientException
Copyright © 2011 Nuxeo SAS. All Rights Reserved.