Class PublisherServiceImpl
java.lang.Object
org.nuxeo.runtime.model.DefaultComponent
org.nuxeo.ecm.platform.publisher.impl.service.PublisherServiceImpl
- All Implemented Interfaces:
PublisherService,Adaptable,Component,Extensible,TimestampedService
POJO implementation of the publisher service.
- Author:
- tiry
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected Map<String, PublishedDocumentFactoryDescriptor> protected Map<String, PublicationTreeConfigDescriptor> protected static final Stringprotected static final Stringstatic final Stringprotected RootSectionFinderFactorystatic final Stringstatic final Stringprotected Map<String, PublicationTreeConfigDescriptor> protected Map<String, PublicationTreeDescriptor> static final Stringprotected Map<String, ValidatorsRuleDescriptor> Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, nameFields inherited from interface org.nuxeo.ecm.platform.publisher.api.PublisherService
DOMAIN_NAME_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(ComponentContext context) Activates the component.protected PublicationTreecomputeAllParameters(PublicationTreeConfigDescriptor config, Map<String, String> params) protected voidintThe component notification order forComponent.start(ComponentContext).Returns aMapwith tree name as key and tree title as value.getParametersFor(String treeConfigName) getPublicationTree(String treeName, CoreSession coreSession, Map<String, String> params) getPublicationTree(String treeName, CoreSession coreSession, Map<String, String> params, DocumentModel currentDocument) protected PublicationTreegetPublicationTree(PublicationTreeDescriptor treeDescriptor, CoreSession coreSession, Map<String, String> parameters, PublishedDocumentFactory factory, String configName, String treeTitle) protected PublicationTreeConfigDescriptorgetPublicationTreeConfigDescriptor(String treeConfigName) protected PublicationTreeDescriptorgetPublicationTreeFor(DocumentModel doc, CoreSession coreSession) protected PublishedDocumentFactorygetPublishedDocumentFactory(PublicationTreeConfigDescriptor config, PublicationTreeDescriptor treeDescriptor, CoreSession coreSession, Map<String, String> params) protected PublishedDocumentFactoryDescriptorgetPublishedDocumentFactoryDescriptor(PublicationTreeConfigDescriptor config, PublicationTreeDescriptor treeDescriptor) getRootSectionFinder(CoreSession session) protected ValidatorsRulegetValidatorsRule(PublishedDocumentFactoryDescriptor factoryDesc) booleanisPublishedDocument(DocumentModel documentModel) publish(DocumentModel doc, PublicationNode targetNode) publish(DocumentModel doc, PublicationNode targetNode, Map<String, String> params) voidregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) protected voidprotected voidvoidregisterTreeConfigFor(DocumentModel domain) voidstart(ComponentContext context) Start the component.voidunpublish(DocumentModel doc, PublicationNode targetNode) voidunregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) voidunRegisterTreeConfigFor(String domainName) voidunRegisterTreeConfigFor(DocumentModel domain) wrapToPublicationNode(DocumentModel documentModel, CoreSession coreSession) Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
addRuntimeMessage, addRuntimeMessage, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, stop, unregister, unregisterExtension
-
Field Details
-
treeDescriptors
-
factoryDescriptors
-
treeConfigDescriptors
-
validatorsRuleDescriptors
-
pendingDescriptors
-
rootSectionFinderFactory
-
TREE_EP
- See Also:
-
TREE_CONFIG_EP
- See Also:
-
VALIDATORS_RULE_EP
- See Also:
-
FACTORY_EP
- See Also:
-
ROOT_SECTION_FINDER_FACTORY_EP
- See Also:
-
ROOT_PATH_KEY
- See Also:
-
RELATIVE_ROOT_PATH_KEY
- See Also:
-
-
Constructor Details
-
PublisherServiceImpl
public PublisherServiceImpl()
-
-
Method Details
-
getApplicationStartedOrder
public int getApplicationStartedOrder()Description copied from interface:ComponentThe component notification order forComponent.start(ComponentContext).Components are notified in increasing order. Order 1000 is the default order for components that don't care. Order 100 is the repository initialization.
- Specified by:
getApplicationStartedOrderin interfaceComponent- Returns:
- the order, 1000 by default
-
start
Description copied from interface:ComponentStart the component. This method is called after all the components were resolved and activated- Specified by:
startin interfaceComponent- Overrides:
startin classDefaultComponent
-
doApplicationStarted
protected void doApplicationStarted() -
activate
Description copied from interface:ComponentActivates the component.This method is called by the runtime when a component is activated.
- Specified by:
activatein interfaceComponent- Overrides:
activatein classDefaultComponent- Parameters:
context- the runtime context
-
registerContribution
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) - Overrides:
registerContributionin classDefaultComponent
-
registerTreeConfig
-
unregisterContribution
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) - Overrides:
unregisterContributionin classDefaultComponent
-
getAvailablePublicationTree
- Specified by:
getAvailablePublicationTreein interfacePublisherService
-
getAvailablePublicationTrees
Description copied from interface:PublisherServiceReturns aMapwith tree name as key and tree title as value.- Specified by:
getAvailablePublicationTreesin interfacePublisherService
-
getPublicationTree
public PublicationTree getPublicationTree(String treeName, CoreSession coreSession, Map<String, String> params) - Specified by:
getPublicationTreein interfacePublisherService
-
getPublicationTree
public PublicationTree getPublicationTree(String treeName, CoreSession coreSession, Map<String, String> params, DocumentModel currentDocument) - Specified by:
getPublicationTreein interfacePublisherService
-
buildTree
protected PublicationTree buildTree(String treeConfigName, CoreSession coreSession, Map<String, String> params) -
computeAllParameters
-
getPublishedDocumentFactory
protected PublishedDocumentFactory getPublishedDocumentFactory(PublicationTreeConfigDescriptor config, PublicationTreeDescriptor treeDescriptor, CoreSession coreSession, Map<String, String> params) -
getValidatorsRule
-
getPublishedDocumentFactoryDescriptor
protected PublishedDocumentFactoryDescriptor getPublishedDocumentFactoryDescriptor(PublicationTreeConfigDescriptor config, PublicationTreeDescriptor treeDescriptor) -
getPublicationTreeConfigDescriptor
-
getPublicationTreeDescriptor
protected PublicationTreeDescriptor getPublicationTreeDescriptor(PublicationTreeConfigDescriptor config) -
getPublicationTree
protected PublicationTree getPublicationTree(PublicationTreeDescriptor treeDescriptor, CoreSession coreSession, Map<String, String> parameters, PublishedDocumentFactory factory, String configName, String treeTitle) -
publish
- Specified by:
publishin interfacePublisherService
-
publish
public PublishedDocument publish(DocumentModel doc, PublicationNode targetNode, Map<String, String> params) - Specified by:
publishin interfacePublisherService
-
unpublish
- Specified by:
unpublishin interfacePublisherService
-
isPublishedDocument
- Specified by:
isPublishedDocumentin interfacePublisherService
-
getPublicationTreeFor
- Specified by:
getPublicationTreeForin interfacePublisherService
-
wrapToPublicationNode
- Specified by:
wrapToPublicationNodein interfacePublisherService
-
registerPendingDescriptors
protected void registerPendingDescriptors() -
registerTreeConfigFor
-
unRegisterTreeConfigFor
-
unRegisterTreeConfigFor
- Since:
- 7.3
-
getParametersFor
- Specified by:
getParametersForin interfacePublisherService
-
getRootSectionFinder
- Specified by:
getRootSectionFinderin interfacePublisherService
-