|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.module.exchangesimple.BaseSyndicatorImpl
public abstract class BaseSyndicatorImpl
Default implementation of Syndicator
. Activates all the content to a subscriber configured on the server.
Constructor Summary | |
---|---|
BaseSyndicatorImpl()
|
Method Summary | |
---|---|
protected static void |
acquireIgnoringInterruption(EDU.oswego.cs.dl.util.concurrent.Sync latch)
Acquires a Sync ignoring any interruptions. |
abstract void |
activate(ActivationContent activationContent,
String nodePath)
|
void |
activate(String parent,
info.magnolia.cms.core.Content content)
This will activate specifies page (sub pages) to all configured subscribers. |
void |
activate(String parent,
info.magnolia.cms.core.Content content,
List<String> orderBefore)
This will activate specified node to all configured subscribers. |
String |
activate(info.magnolia.cms.exchange.Subscriber subscriber,
ActivationContent activationContent,
String nodePath)
Send request of activation of activationContent to the subscriber. |
void |
activate(info.magnolia.cms.exchange.Subscriber subscriber,
String parent,
info.magnolia.cms.core.Content content)
This will activate specifies page (sub pages) to the specified subscriber. |
void |
activate(info.magnolia.cms.exchange.Subscriber subscriber,
String parent,
info.magnolia.cms.core.Content content,
List<String> orderBefore)
This will activate specifies node to the specified subscriber. |
protected void |
addActivationHeaders(URLConnection connection,
ActivationContent activationContent)
Adds headers fields describing activation request. |
protected void |
addDeactivationHeaders(URLConnection connection,
String nodeUUID)
Adds header fields describing deactivation request. |
protected void |
addOrderingInfo(org.jdom.Element root,
List<String> orderBefore)
Adds ordering information to the resource mapping file. |
protected void |
addResources(org.jdom.Element resourceElement,
javax.jcr.Session session,
info.magnolia.cms.core.Content content,
info.magnolia.cms.core.Content.ContentFilter filter,
ActivationContent activationContent)
|
protected void |
cleanTemporaryStore(ActivationContent activationContent)
Cleans up temporary file store after activation. |
protected ActivationContent |
collect(info.magnolia.cms.core.Content node,
List<String> orderBefore)
Collects all information about activated content and its children (those that are set to be activated with the parent by filter rules). |
void |
deactivate(info.magnolia.cms.core.Content node)
|
void |
deactivate(String path)
|
void |
deactivate(info.magnolia.cms.exchange.Subscriber subscriber,
info.magnolia.cms.core.Content node)
|
abstract void |
doDeactivate(String nodeUUID,
String nodePath)
|
abstract String |
doDeactivate(info.magnolia.cms.exchange.Subscriber subscriber,
String nodeUUID,
String nodePath)
Deactivate content from specified subscriber. |
protected static void |
executeInPool(Runnable job)
Runs a given job in the thread pool. |
protected void |
exportAndParse(javax.jcr.Session session,
info.magnolia.cms.core.Content content,
XMLReader elementfilter,
OutputStream os,
boolean noRecurse)
|
protected String |
getActivationURL(info.magnolia.cms.exchange.Subscriber subscriberInfo)
Retrieves URL subscriber is listening on for (de)activation requests. |
protected String |
getDeactivationURL(info.magnolia.cms.exchange.Subscriber subscriberInfo)
Return URI set for deactivation. |
protected String |
getMappedPath(String path,
info.magnolia.cms.exchange.Subscription subscription)
Gets target path to which the current path is mapped in given subscription. |
void |
init(info.magnolia.cms.security.User user,
String repositoryName,
String workspaceName,
info.magnolia.cms.util.Rule rule)
|
protected URLConnection |
prepareConnection(info.magnolia.cms.exchange.Subscriber subscriber,
String urlString)
|
protected void |
updateActivationDetails(String path)
Updates current content activation meta data with the time stamp and user details of the activation. |
protected void |
updateDeactivationDetails(String nodeUUID)
Updates current content activation meta data with the timestamp and user details of the deactivation. |
protected void |
updateMetaData(info.magnolia.cms.core.Content node,
String type)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_HANDLER
public static final String PARENT_PATH
public static final String MAPPED_PARENT_PATH
public static final String PATH
public static final String NODE_UUID
public static final String REPOSITORY_NAME
public static final String WORKSPACE_NAME
public static final String VERSION_NAME
public static final String RESOURCE_MAPPING_FILE
public static final String UTF8_STATUS
public static final String SIBLINGS_ROOT_ELEMENT
public static final String SIBLINGS_ELEMENT
public static final String SIBLING_UUID
public static final String RESOURCE_MAPPING_FILE_ELEMENT
public static final String RESOURCE_MAPPING_NAME_ATTRIBUTE
public static final String RESOURCE_MAPPING_UUID_ATTRIBUTE
public static final String RESOURCE_MAPPING_ID_ATTRIBUTE
public static final String RESOURCE_MAPPING_ROOT_ELEMENT
public static final String ACTION
public static final String ACTIVATE
public static final String DEACTIVATE
public static final String COMMIT
public static final String ROLLBACK
public static final String AUTHORIZATION
public static final String AUTH_CREDENTIALS
public static final String AUTH_USER
public static final String CONTENT_FILTER_RULE
public static final String ACTIVATION_SUCCESSFUL
public static final String ACTIVATION_FAILED
public static final String ACTIVATION_ATTRIBUTE_STATUS
public static final String ACTIVATION_ATTRIBUTE_MESSAGE
public static final String ACTIVATION_ATTRIBUTE_VERSION
protected String repositoryName
protected String workspaceName
protected String parent
protected info.magnolia.cms.core.Content.ContentFilter contentFilter
protected info.magnolia.cms.util.Rule contentFilterRule
protected info.magnolia.cms.security.User user
protected String basicCredentials
Constructor Detail |
---|
public BaseSyndicatorImpl()
Method Detail |
---|
protected static void executeInPool(Runnable job) throws info.magnolia.cms.exchange.ExchangeException
job
- the job to run
info.magnolia.cms.exchange.ExchangeException
- if the job could not be put in the poolprotected static void acquireIgnoringInterruption(EDU.oswego.cs.dl.util.concurrent.Sync latch)
Sync
ignoring any interruptions. Should any
interruption occur the interruption status will be set. Might
potentially block/wait forever.
latch
- the latch on which to waitSync.acquire()
public void init(info.magnolia.cms.security.User user, String repositoryName, String workspaceName, info.magnolia.cms.util.Rule rule)
init
in interface info.magnolia.cms.exchange.Syndicator
user
- repositoryName
- repository IDworkspaceName
- workspace IDrule
- content filter ruleSyndicator.init(info.magnolia.cms.security.User, String, String,
info.magnolia.cms.util.Rule)
public void activate(String parent, info.magnolia.cms.core.Content content) throws info.magnolia.cms.exchange.ExchangeException, javax.jcr.RepositoryException
activate
in interface info.magnolia.cms.exchange.Syndicator
parent
- parent under which this page will be activatedcontent
- to be activated
javax.jcr.RepositoryException
info.magnolia.cms.exchange.ExchangeException
public void activate(String parent, info.magnolia.cms.core.Content content, List<String> orderBefore) throws info.magnolia.cms.exchange.ExchangeException, javax.jcr.RepositoryException
activate
in interface info.magnolia.cms.exchange.Syndicator
parent
- parent under which this page will be activatedcontent
- to be activatedorderBefore
- List of UUID to be used by the implementation to order this node after activation
javax.jcr.RepositoryException
info.magnolia.cms.exchange.ExchangeException
public void activate(info.magnolia.cms.exchange.Subscriber subscriber, String parent, info.magnolia.cms.core.Content content) throws info.magnolia.cms.exchange.ExchangeException, javax.jcr.RepositoryException
activate
in interface info.magnolia.cms.exchange.Syndicator
subscriber
- parent
- parent under which this page will be activatedcontent
- to be activated
javax.jcr.RepositoryException
info.magnolia.cms.exchange.ExchangeException
public void activate(info.magnolia.cms.exchange.Subscriber subscriber, String parent, info.magnolia.cms.core.Content content, List<String> orderBefore) throws info.magnolia.cms.exchange.ExchangeException, javax.jcr.RepositoryException
activate
in interface info.magnolia.cms.exchange.Syndicator
subscriber
- parent
- parent under which this page will be activatedcontent
- to be activatedorderBefore
- List of UUID to be used by the subscriber to order this node after activation
javax.jcr.RepositoryException
info.magnolia.cms.exchange.ExchangeException
public abstract void activate(ActivationContent activationContent, String nodePath) throws info.magnolia.cms.exchange.ExchangeException
info.magnolia.cms.exchange.ExchangeException
public String activate(info.magnolia.cms.exchange.Subscriber subscriber, ActivationContent activationContent, String nodePath) throws info.magnolia.cms.exchange.ExchangeException
info.magnolia.cms.exchange.ExchangeException
protected void cleanTemporaryStore(ActivationContent activationContent)
public void deactivate(String path) throws info.magnolia.cms.exchange.ExchangeException, javax.jcr.RepositoryException
info.magnolia.cms.exchange.ExchangeException
javax.jcr.RepositoryException
public void deactivate(info.magnolia.cms.core.Content node) throws info.magnolia.cms.exchange.ExchangeException, javax.jcr.RepositoryException
deactivate
in interface info.magnolia.cms.exchange.Syndicator
node
- to deactivate
javax.jcr.RepositoryException
info.magnolia.cms.exchange.ExchangeException
public void deactivate(info.magnolia.cms.exchange.Subscriber subscriber, info.magnolia.cms.core.Content node) throws info.magnolia.cms.exchange.ExchangeException, javax.jcr.RepositoryException
deactivate
in interface info.magnolia.cms.exchange.Syndicator
node
- , to deactivatesubscriber
-
javax.jcr.RepositoryException
info.magnolia.cms.exchange.ExchangeException
public abstract void doDeactivate(String nodeUUID, String nodePath) throws info.magnolia.cms.exchange.ExchangeException
info.magnolia.cms.exchange.ExchangeException
public abstract String doDeactivate(info.magnolia.cms.exchange.Subscriber subscriber, String nodeUUID, String nodePath) throws info.magnolia.cms.exchange.ExchangeException
subscriber
-
info.magnolia.cms.exchange.ExchangeException
protected String getDeactivationURL(info.magnolia.cms.exchange.Subscriber subscriberInfo)
subscriberInfo
- protected void addDeactivationHeaders(URLConnection connection, String nodeUUID)
connection
- protected String getActivationURL(info.magnolia.cms.exchange.Subscriber subscriberInfo)
protected void addActivationHeaders(URLConnection connection, ActivationContent activationContent)
protected void updateActivationDetails(String path) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected void updateDeactivationDetails(String nodeUUID) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected void updateMetaData(info.magnolia.cms.core.Content node, String type) throws info.magnolia.cms.security.AccessDeniedException
node
- type
- (activate / deactivate)
info.magnolia.cms.security.AccessDeniedException
protected ActivationContent collect(info.magnolia.cms.core.Content node, List<String> orderBefore) throws Exception
Exception
protected void addOrderingInfo(org.jdom.Element root, List<String> orderBefore)
root
- element of the resource file under which ordering info must be addedorderBefore
- protected void addResources(org.jdom.Element resourceElement, javax.jcr.Session session, info.magnolia.cms.core.Content content, info.magnolia.cms.core.Content.ContentFilter filter, ActivationContent activationContent) throws IOException, javax.jcr.RepositoryException, SAXException, Exception
IOException
javax.jcr.RepositoryException
SAXException
Exception
protected void exportAndParse(javax.jcr.Session session, info.magnolia.cms.core.Content content, XMLReader elementfilter, OutputStream os, boolean noRecurse) throws Exception
Exception
protected String getMappedPath(String path, info.magnolia.cms.exchange.Subscription subscription)
protected URLConnection prepareConnection(info.magnolia.cms.exchange.Subscriber subscriber, String urlString) throws info.magnolia.cms.exchange.ExchangeException
info.magnolia.cms.exchange.ExchangeException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |