Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.publisher.api
Interface PublishedDocumentFactory

All Known Implementing Classes:
AbstractBasePublishedDocumentFactory, ClientProxyFactory, CoreProxyFactory, CoreProxyWithWorkflowFactory, FSPublishedDocumentFactory, SimpleExternalDocumentModelFactory

public interface PublishedDocumentFactory

Interface of the pluggable factory used to create a PublishedDocument in a give PublicationTree.

Author:
tiry

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)
           
 PublishedDocument publishDocument(DocumentModel doc, PublicationNode targetNode, Map<String,String> params)
           
 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.
 PublishedDocument wrapDocumentModel(DocumentModel doc)
           
 

Method Detail

getName

String getName()

publishDocument

PublishedDocument publishDocument(DocumentModel doc,
                                  PublicationNode targetNode)
                                  throws ClientException
Throws:
ClientException

publishDocument

PublishedDocument publishDocument(DocumentModel doc,
                                  PublicationNode targetNode,
                                  Map<String,String> params)
                                  throws ClientException
Throws:
ClientException

init

void init(CoreSession coreSession,
          ValidatorsRule validatorsRule,
          Map<String,String> parameters)
          throws ClientException
Throws:
ClientException

init

void init(CoreSession coreSession,
          Map<String,String> parameters)
          throws ClientException
Throws:
ClientException

snapshotDocumentBeforePublish

DocumentModel snapshotDocumentBeforePublish(DocumentModel doc)
                                            throws ClientException
Throws:
ClientException

wrapDocumentModel

PublishedDocument wrapDocumentModel(DocumentModel doc)
                                    throws ClientException
Throws:
ClientException

getValidatorsFor

String[] getValidatorsFor(DocumentModel dm)
                          throws PublishingValidatorException
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.

Parameters:
dm - a Nuxeo Core document model. (the document that just has been published)
Returns:
a list of principal names.
Throws:
PublishingValidatorException

getValidatorsRule

ValidatorsRule getValidatorsRule()
                                 throws PublishingValidatorException
Returns the registered section validators rule.

Returns:
a validators rule
Throws:
PublishingValidatorException

validatorPublishDocument

void validatorPublishDocument(PublishedDocument publishedDocument,
                              String comment)
                              throws ClientException
A validator (the current user) approves the publication.

Parameters:
publishedDocument - the current published document that will be approved
comment -
Throws:
PublishingException
ClientException

validatorRejectPublication

void validatorRejectPublication(PublishedDocument publishedDocument,
                                String comment)
                                throws ClientException
A validator (the current user) rejects the publication.

Parameters:
publishedDocument - the currently published document that will be rejected
comment -
Throws:
PublishingException
ClientException

hasValidationTask

boolean hasValidationTask(PublishedDocument publishedDocument)
                          throws ClientException
Throws:
ClientException

canManagePublishing

boolean canManagePublishing(PublishedDocument publishedDocument)
                            throws ClientException
Throws:
ClientException

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.