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 String
FACTORY_EP
protected Map<String,PublishedDocumentFactoryDescriptor>
factoryDescriptors
protected Map<String,PublicationTreeConfigDescriptor>
pendingDescriptors
protected static String
RELATIVE_ROOT_PATH_KEY
protected static String
ROOT_PATH_KEY
static String
ROOT_SECTION_FINDER_FACTORY_EP
protected RootSectionFinderFactory
rootSectionFinderFactory
static String
TREE_CONFIG_EP
static String
TREE_EP
protected Map<String,PublicationTreeConfigDescriptor>
treeConfigDescriptors
protected Map<String,PublicationTreeDescriptor>
treeDescriptors
static String
VALIDATORS_RULE_EP
protected 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: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
public void activate(ComponentContext context)
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
protected void registerTreeConfig(PublicationTreeConfigDescriptor desc)
-
unregisterContribution
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
- Overrides:
unregisterContribution
in classDefaultComponent
-
getAvailablePublicationTree
public List<String> getAvailablePublicationTree()
- Specified by:
getAvailablePublicationTree
in interfacePublisherService
-
getAvailablePublicationTrees
public Map<String,String> 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
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:
publish
in interfacePublisherService
-
publish
public PublishedDocument publish(DocumentModel doc, PublicationNode targetNode, Map<String,String> params)
- Specified by:
publish
in interfacePublisherService
-
unpublish
public void unpublish(DocumentModel doc, PublicationNode targetNode)
- Specified by:
unpublish
in interfacePublisherService
-
isPublishedDocument
public boolean isPublishedDocument(DocumentModel documentModel)
- Specified by:
isPublishedDocument
in interfacePublisherService
-
getPublicationTreeFor
public PublicationTree getPublicationTreeFor(DocumentModel doc, CoreSession coreSession)
- Specified by:
getPublicationTreeFor
in interfacePublisherService
-
wrapToPublicationNode
public PublicationNode wrapToPublicationNode(DocumentModel documentModel, CoreSession coreSession)
- Specified by:
wrapToPublicationNode
in 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:
getParametersFor
in interfacePublisherService
-
getRootSectionFinder
public RootSectionFinder getRootSectionFinder(CoreSession session)
- Specified by:
getRootSectionFinder
in interfacePublisherService
-
-