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
public class PublisherServiceImpl extends DefaultComponent implements PublisherService
POJO implementation of the publisher service.- Author:
- tiry
-
-
Field Summary
Fields Modifier and Type Field Description static StringFACTORY_EPprotected Map<String,PublishedDocumentFactoryDescriptor>factoryDescriptorsprotected Map<String,PublicationTreeConfigDescriptor>pendingDescriptorsprotected static StringRELATIVE_ROOT_PATH_KEYprotected static StringROOT_PATH_KEYstatic StringROOT_SECTION_FINDER_FACTORY_EPprotected RootSectionFinderFactoryrootSectionFinderFactorystatic StringTREE_CONFIG_EPstatic StringTREE_EPprotected Map<String,PublicationTreeConfigDescriptor>treeConfigDescriptorsprotected Map<String,PublicationTreeDescriptor>treeDescriptorsstatic StringVALIDATORS_RULE_EPprotected Map<String,ValidatorsRuleDescriptor>validatorsRuleDescriptors-
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
Constructors Constructor Description PublisherServiceImpl()
-
Method Summary
-
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
applicationStarted, getApplicationStartedOrder
-
-
-
-
Field Detail
-
treeDescriptors
protected Map<String,PublicationTreeDescriptor> treeDescriptors
-
factoryDescriptors
protected Map<String,PublishedDocumentFactoryDescriptor> factoryDescriptors
-
treeConfigDescriptors
protected Map<String,PublicationTreeConfigDescriptor> treeConfigDescriptors
-
validatorsRuleDescriptors
protected Map<String,ValidatorsRuleDescriptor> validatorsRuleDescriptors
-
pendingDescriptors
protected Map<String,PublicationTreeConfigDescriptor> pendingDescriptors
-
rootSectionFinderFactory
protected RootSectionFinderFactory rootSectionFinderFactory
-
TREE_EP
public static final String TREE_EP
- See Also:
- Constant Field Values
-
TREE_CONFIG_EP
public static final String TREE_CONFIG_EP
- See Also:
- Constant Field Values
-
VALIDATORS_RULE_EP
public static final String VALIDATORS_RULE_EP
- See Also:
- Constant Field Values
-
FACTORY_EP
public static final String FACTORY_EP
- See Also:
- Constant Field Values
-
ROOT_SECTION_FINDER_FACTORY_EP
public static final String ROOT_SECTION_FINDER_FACTORY_EP
- See Also:
- Constant Field Values
-
ROOT_PATH_KEY
protected static final String ROOT_PATH_KEY
- See Also:
- Constant Field Values
-
RELATIVE_ROOT_PATH_KEY
protected static final String RELATIVE_ROOT_PATH_KEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PublisherServiceImpl
public PublisherServiceImpl()
-
-
Method Detail
-
start
public void start(ComponentContext context)
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
public void activate(ComponentContext context)
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
protected void registerTreeConfig(PublicationTreeConfigDescriptor desc)
-
unregisterContribution
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
- Overrides:
unregisterContributionin classDefaultComponent
-
getAvailablePublicationTree
public List<String> getAvailablePublicationTree()
- Specified by:
getAvailablePublicationTreein interfacePublisherService
-
getAvailablePublicationTrees
public Map<String,String> 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
protected Map<String,String> computeAllParameters(PublicationTreeConfigDescriptor config, Map<String,String> params)
-
getPublishedDocumentFactory
protected PublishedDocumentFactory getPublishedDocumentFactory(PublicationTreeConfigDescriptor config, PublicationTreeDescriptor treeDescriptor, CoreSession coreSession, Map<String,String> params)
-
getValidatorsRule
protected ValidatorsRule getValidatorsRule(PublishedDocumentFactoryDescriptor factoryDesc)
-
getPublishedDocumentFactoryDescriptor
protected PublishedDocumentFactoryDescriptor getPublishedDocumentFactoryDescriptor(PublicationTreeConfigDescriptor config, PublicationTreeDescriptor treeDescriptor)
-
getPublicationTreeConfigDescriptor
protected PublicationTreeConfigDescriptor getPublicationTreeConfigDescriptor(String treeConfigName)
-
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
public PublishedDocument publish(DocumentModel doc, PublicationNode targetNode)
- Specified by:
publishin interfacePublisherService
-
publish
public PublishedDocument publish(DocumentModel doc, PublicationNode targetNode, Map<String,String> params)
- Specified by:
publishin interfacePublisherService
-
unpublish
public void unpublish(DocumentModel doc, PublicationNode targetNode)
- Specified by:
unpublishin interfacePublisherService
-
isPublishedDocument
public boolean isPublishedDocument(DocumentModel documentModel)
- Specified by:
isPublishedDocumentin interfacePublisherService
-
getPublicationTreeFor
public PublicationTree getPublicationTreeFor(DocumentModel doc, CoreSession coreSession)
- Specified by:
getPublicationTreeForin interfacePublisherService
-
wrapToPublicationNode
public PublicationNode wrapToPublicationNode(DocumentModel documentModel, CoreSession coreSession)
- Specified by:
wrapToPublicationNodein interfacePublisherService
-
registerPendingDescriptors
protected void registerPendingDescriptors()
-
registerTreeConfigFor
public void registerTreeConfigFor(DocumentModel domain)
-
unRegisterTreeConfigFor
public void unRegisterTreeConfigFor(DocumentModel domain)
-
unRegisterTreeConfigFor
public void unRegisterTreeConfigFor(String domainName)
- Since:
- 7.3
-
getParametersFor
public Map<String,String> getParametersFor(String treeConfigName)
- Specified by:
getParametersForin interfacePublisherService
-
getRootSectionFinder
public RootSectionFinder getRootSectionFinder(CoreSession session)
- Specified by:
getRootSectionFinderin interfacePublisherService
-
-