|
||||||||||
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,
String handshakeKey)
Adds headers fields describing activation request. |
protected void |
addDeactivationHeaders(URLConnection connection,
String nodeUUID,
String handshakeKey)
Adds header fields describing deactivation request. |
protected void |
addHandshakeInfo(URLConnection connection,
String handshakeKey)
|
protected void |
cleanTemporaryStore(ActivationContent activationContent)
Cleans up temporary file store after activation. |
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 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)
|
void |
setResouceCollector(ResourceCollector resourceCollector)
|
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
@Deprecated 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_MD_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 CONTENT_FILTER_RULE
public static final String ACTIVATION_SUCCESSFUL
public static final String ACTIVATION_HANDSHAKE
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
public static final String ACTIVATION_AUTH
public static final String ACTIVATION_AUTH_KEY
@Deprecated protected String repositoryName
protected String workspaceName
protected String parent
protected info.magnolia.cms.util.Rule contentFilterRule
protected info.magnolia.cms.security.User user
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, String handshakeKey)
connection
- handshakeKey
- optional key to encrypt public key before sending it overprotected void addHandshakeInfo(URLConnection connection, String handshakeKey)
protected String getActivationURL(info.magnolia.cms.exchange.Subscriber subscriberInfo)
protected void addActivationHeaders(URLConnection connection, ActivationContent activationContent, String handshakeKey)
handshakeKey
- Optional key previously received from subscriber, used to encrypt activation public key for delivery to said subscriber. Or null when such key is not known or present.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 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
@Inject public void setResouceCollector(ResourceCollector resourceCollector)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |