|
||||||||||
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()
|
|
BaseSyndicatorImpl(ActivationMonitor activationMonitor)
|
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,
Content content)
This will activate specifies page (sub pages) to all configured subscribers. |
void |
activate(String parent,
Content content,
List<String> orderBefore)
This will activate specified node to all configured subscribers. |
String |
activate(Subscriber subscriber,
ActivationContent activationContent,
String nodePath)
Send request of activation of activationContent to the subscriber. |
void |
activate(Subscriber subscriber,
String parent,
Content content)
This will activate specifies page (sub pages) to the specified subscriber. |
void |
activate(Subscriber subscriber,
String parent,
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(Content node)
|
void |
deactivate(String path)
|
void |
deactivate(Subscriber subscriber,
Content node)
|
abstract void |
doDeactivate(String nodeUUID,
String nodePath)
|
abstract String |
doDeactivate(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(Subscriber subscriberInfo)
Retrieves URL subscriber is listening on for (de)activation requests. |
protected String |
getDeactivationURL(Subscriber subscriberInfo)
Return URI set for deactivation. |
protected String |
getMappedPath(String path,
Subscription subscription)
Gets target path to which the current path is mapped in given subscription. |
void |
init(User user,
String repositoryName,
String workspaceName,
Rule rule)
Sets up the syndicator. |
protected URLConnection |
prepareConnection(Subscriber subscriber,
String urlString)
|
protected void |
releaseConnection(URLConnection urlConnection)
|
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(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
protected ActivationMonitor activationMonitor
@Deprecated protected String repositoryName
protected String workspaceName
protected String parent
protected Rule contentFilterRule
protected User user
Constructor Detail |
---|
public BaseSyndicatorImpl()
@Inject public BaseSyndicatorImpl(ActivationMonitor activationMonitor)
Method Detail |
---|
protected static void executeInPool(Runnable job) throws ExchangeException
job
- the job to run
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(User user, String repositoryName, String workspaceName, Rule rule)
Syndicator
init
in interface 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, Content content) throws ExchangeException, javax.jcr.RepositoryException
activate
in interface Syndicator
parent
- parent under which this page will be activatedcontent
- to be activated
javax.jcr.RepositoryException
ExchangeException
public void activate(String parent, Content content, List<String> orderBefore) throws ExchangeException, javax.jcr.RepositoryException
activate
in interface 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
ExchangeException
public void activate(Subscriber subscriber, String parent, Content content) throws ExchangeException, javax.jcr.RepositoryException
activate
in interface Syndicator
subscriber
- parent
- parent under which this page will be activatedcontent
- to be activated
javax.jcr.RepositoryException
ExchangeException
public void activate(Subscriber subscriber, String parent, Content content, List<String> orderBefore) throws ExchangeException, javax.jcr.RepositoryException
activate
in interface 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
ExchangeException
public abstract void activate(ActivationContent activationContent, String nodePath) throws ExchangeException
ExchangeException
public String activate(Subscriber subscriber, ActivationContent activationContent, String nodePath) throws ExchangeException
ExchangeException
protected void releaseConnection(URLConnection urlConnection)
protected void cleanTemporaryStore(ActivationContent activationContent)
public void deactivate(String path) throws ExchangeException, javax.jcr.RepositoryException
ExchangeException
javax.jcr.RepositoryException
public void deactivate(Content node) throws ExchangeException, javax.jcr.RepositoryException
deactivate
in interface Syndicator
node
- to deactivate
javax.jcr.RepositoryException
ExchangeException
public void deactivate(Subscriber subscriber, Content node) throws ExchangeException, javax.jcr.RepositoryException
deactivate
in interface Syndicator
node
- , to deactivatesubscriber
-
javax.jcr.RepositoryException
ExchangeException
public abstract void doDeactivate(String nodeUUID, String nodePath) throws ExchangeException
ExchangeException
public abstract String doDeactivate(Subscriber subscriber, String nodeUUID, String nodePath) throws ExchangeException
subscriber
-
ExchangeException
protected String getDeactivationURL(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(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(Content node, String type) throws AccessDeniedException
node
- type
- (activate / deactivate)
AccessDeniedException
protected String getMappedPath(String path, Subscription subscription)
protected URLConnection prepareConnection(Subscriber subscriber, String urlString) throws ExchangeException
ExchangeException
@Inject public void setResouceCollector(ResourceCollector resourceCollector)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |