public class PublisherServiceImpl extends DefaultComponent implements PublisherService
Modifier and Type | Field and 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 |
lastModified
DOMAIN_NAME_KEY
Constructor and Description |
---|
PublisherServiceImpl() |
deactivate, getAdapter, getLastModified, registerExtension, setLastModified, setModifiedNow, stop, unregisterExtension
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applicationStarted, getApplicationStartedOrder
protected Map<String,PublicationTreeDescriptor> treeDescriptors
protected Map<String,PublishedDocumentFactoryDescriptor> factoryDescriptors
protected Map<String,PublicationTreeConfigDescriptor> treeConfigDescriptors
protected Map<String,ValidatorsRuleDescriptor> validatorsRuleDescriptors
protected Map<String,PublicationTreeConfigDescriptor> pendingDescriptors
protected RootSectionFinderFactory rootSectionFinderFactory
public static final String TREE_EP
public static final String TREE_CONFIG_EP
public static final String VALIDATORS_RULE_EP
public static final String FACTORY_EP
public static final String ROOT_SECTION_FINDER_FACTORY_EP
protected static final String ROOT_PATH_KEY
protected static final String RELATIVE_ROOT_PATH_KEY
public PublisherServiceImpl()
public void start(ComponentContext context)
Component
start
in interface Component
start
in class DefaultComponent
protected void doApplicationStarted()
public void activate(ComponentContext context)
Component
This method is called by the runtime when a component is activated.
activate
in interface Component
activate
in class DefaultComponent
context
- the runtime contextpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution
in class DefaultComponent
protected void registerTreeConfig(PublicationTreeConfigDescriptor desc)
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution
in class DefaultComponent
public List<String> getAvailablePublicationTree()
getAvailablePublicationTree
in interface PublisherService
public Map<String,String> getAvailablePublicationTrees()
PublisherService
Map
with tree name as key and tree title as value.getAvailablePublicationTrees
in interface PublisherService
public PublicationTree getPublicationTree(String treeName, CoreSession coreSession, Map<String,String> params)
getPublicationTree
in interface PublisherService
public PublicationTree getPublicationTree(String treeName, CoreSession coreSession, Map<String,String> params, DocumentModel currentDocument)
getPublicationTree
in interface PublisherService
protected PublicationTree buildTree(String treeConfigName, CoreSession coreSession, Map<String,String> params)
protected Map<String,String> computeAllParameters(PublicationTreeConfigDescriptor config, Map<String,String> params)
protected PublishedDocumentFactory getPublishedDocumentFactory(PublicationTreeConfigDescriptor config, PublicationTreeDescriptor treeDescriptor, CoreSession coreSession, Map<String,String> params)
protected ValidatorsRule getValidatorsRule(PublishedDocumentFactoryDescriptor factoryDesc)
protected PublishedDocumentFactoryDescriptor getPublishedDocumentFactoryDescriptor(PublicationTreeConfigDescriptor config, PublicationTreeDescriptor treeDescriptor)
protected PublicationTreeConfigDescriptor getPublicationTreeConfigDescriptor(String treeConfigName)
protected PublicationTreeDescriptor getPublicationTreeDescriptor(PublicationTreeConfigDescriptor config)
protected PublicationTree getPublicationTree(PublicationTreeDescriptor treeDescriptor, CoreSession coreSession, Map<String,String> parameters, PublishedDocumentFactory factory, String configName, String treeTitle)
public PublishedDocument publish(DocumentModel doc, PublicationNode targetNode)
publish
in interface PublisherService
public PublishedDocument publish(DocumentModel doc, PublicationNode targetNode, Map<String,String> params)
publish
in interface PublisherService
public void unpublish(DocumentModel doc, PublicationNode targetNode)
unpublish
in interface PublisherService
public boolean isPublishedDocument(DocumentModel documentModel)
isPublishedDocument
in interface PublisherService
public PublicationTree getPublicationTreeFor(DocumentModel doc, CoreSession coreSession)
getPublicationTreeFor
in interface PublisherService
public PublicationNode wrapToPublicationNode(DocumentModel documentModel, CoreSession coreSession)
wrapToPublicationNode
in interface PublisherService
protected void registerPendingDescriptors()
public void registerTreeConfigFor(DocumentModel domain)
public void unRegisterTreeConfigFor(DocumentModel domain)
public void unRegisterTreeConfigFor(String domainName)
public Map<String,String> getParametersFor(String treeConfigName)
getParametersFor
in interface PublisherService
public RootSectionFinder getRootSectionFinder(CoreSession session)
getRootSectionFinder
in interface PublisherService
Copyright © 2018 Nuxeo. All rights reserved.