Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.publisher.api
Class AbstractBasePublishedDocumentFactory

java.lang.Object
  extended by 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


Field Summary
static String ENABLE_SNAPSHOT
           
static String TARGET_PUBLISHED_DOCUMENT_STATE
           
 
Constructor Summary
AbstractBasePublishedDocumentFactory()
           
 
Method Summary
 boolean canManagePublishing(PublishedDocument publishedDocument)
           
 String getName()
           
 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)
           
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.nuxeo.ecm.platform.publisher.api.PublishedDocumentFactory
publishDocument, wrapDocumentModel
 

Field Detail

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
Constructor Detail

AbstractBasePublishedDocumentFactory

public AbstractBasePublishedDocumentFactory()
Method Detail

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

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.