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
Modifier and TypeFieldDescriptionstatic final String
protected Map<String,
PublishedDocumentFactoryDescriptor> protected Map<String,
PublicationTreeConfigDescriptor> protected static final String
protected static final String
static final String
protected RootSectionFinderFactory
static final String
static final String
protected Map<String,
PublicationTreeConfigDescriptor> protected Map<String,
PublicationTreeDescriptor> static final String
protected Map<String,
ValidatorsRuleDescriptor> Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
Fields inherited from interface org.nuxeo.ecm.platform.publisher.api.PublisherService
DOMAIN_NAME_KEY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
activate
(ComponentContext context) Activates the component.protected PublicationTree
computeAllParameters
(PublicationTreeConfigDescriptor config, Map<String, String> params) protected void
Returns aMap
with 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 PublicationTree
getPublicationTree
(PublicationTreeDescriptor treeDescriptor, CoreSession coreSession, Map<String, String> parameters, PublishedDocumentFactory factory, String configName, String treeTitle) protected PublicationTreeConfigDescriptor
getPublicationTreeConfigDescriptor
(String treeConfigName) protected PublicationTreeDescriptor
getPublicationTreeFor
(DocumentModel doc, CoreSession coreSession) protected PublishedDocumentFactory
getPublishedDocumentFactory
(PublicationTreeConfigDescriptor config, PublicationTreeDescriptor treeDescriptor, CoreSession coreSession, Map<String, String> params) protected PublishedDocumentFactoryDescriptor
getPublishedDocumentFactoryDescriptor
(PublicationTreeConfigDescriptor config, PublicationTreeDescriptor treeDescriptor) getRootSectionFinder
(CoreSession session) protected ValidatorsRule
getValidatorsRule
(PublishedDocumentFactoryDescriptor factoryDesc) boolean
isPublishedDocument
(DocumentModel documentModel) publish
(DocumentModel doc, PublicationNode targetNode) publish
(DocumentModel doc, PublicationNode targetNode, Map<String, String> params) void
registerContribution
(Object contribution, String extensionPoint, ComponentInstance contributor) protected void
protected void
void
registerTreeConfigFor
(DocumentModel domain) void
start
(ComponentContext context) Start the component.void
unpublish
(DocumentModel doc, PublicationNode targetNode) void
unregisterContribution
(Object contribution, String extensionPoint, ComponentInstance contributor) void
unRegisterTreeConfigFor
(String domainName) void
unRegisterTreeConfigFor
(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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.nuxeo.runtime.model.Component
getApplicationStartedOrder
-
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
-
start
Description copied from interface:Component
Start the component. This method is called after all the components were resolved and activated- Specified by:
start
in interfaceComponent
- Overrides:
start
in classDefaultComponent
-
doApplicationStarted
protected void doApplicationStarted() -
activate
Description copied from interface:Component
Activates the component.This method is called by the runtime when a component is activated.
- Specified by:
activate
in interfaceComponent
- Overrides:
activate
in classDefaultComponent
- Parameters:
context
- the runtime context
-
registerContribution
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) - Overrides:
registerContribution
in classDefaultComponent
-
registerTreeConfig
-
unregisterContribution
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) - Overrides:
unregisterContribution
in classDefaultComponent
-
getAvailablePublicationTree
- Specified by:
getAvailablePublicationTree
in interfacePublisherService
-
getAvailablePublicationTrees
Description copied from interface:PublisherService
Returns aMap
with tree name as key and tree title as value.- Specified by:
getAvailablePublicationTrees
in interfacePublisherService
-
getPublicationTree
public PublicationTree getPublicationTree(String treeName, CoreSession coreSession, Map<String, String> params) - Specified by:
getPublicationTree
in interfacePublisherService
-
getPublicationTree
public PublicationTree getPublicationTree(String treeName, CoreSession coreSession, Map<String, String> params, DocumentModel currentDocument) - Specified by:
getPublicationTree
in 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:
publish
in interfacePublisherService
-
publish
public PublishedDocument publish(DocumentModel doc, PublicationNode targetNode, Map<String, String> params) - Specified by:
publish
in interfacePublisherService
-
unpublish
- Specified by:
unpublish
in interfacePublisherService
-
isPublishedDocument
- Specified by:
isPublishedDocument
in interfacePublisherService
-
getPublicationTreeFor
- Specified by:
getPublicationTreeFor
in interfacePublisherService
-
wrapToPublicationNode
- Specified by:
wrapToPublicationNode
in interfacePublisherService
-
registerPendingDescriptors
protected void registerPendingDescriptors() -
registerTreeConfigFor
-
unRegisterTreeConfigFor
-
unRegisterTreeConfigFor
- Since:
- 7.3
-
getParametersFor
- Specified by:
getParametersFor
in interfacePublisherService
-
getRootSectionFinder
- Specified by:
getRootSectionFinder
in interfacePublisherService
-