info.magnolia.module.admininterface.commands
Class ActivationCommand

java.lang.Object
  extended by info.magnolia.commands.MgnlCommand
      extended by info.magnolia.module.admininterface.commands.BaseRepositoryCommand
          extended by info.magnolia.module.admininterface.commands.RuleBasedCommand
              extended by info.magnolia.module.admininterface.commands.BaseActivationCommand
                  extended by info.magnolia.module.admininterface.commands.ActivationCommand
All Implemented Interfaces:
org.apache.commons.chain.Command

public class ActivationCommand
extends BaseActivationCommand

the activation command which do real activation

Author:
jackie $Id: ActivationCommand.java 41137 2011-01-06 18:19:25Z gjoseph $

Field Summary
 
Fields inherited from class info.magnolia.module.admininterface.commands.BaseActivationCommand
ATTRIBUTE_SYNDICATOR
 
Fields inherited from class info.magnolia.module.admininterface.commands.RuleBasedCommand
ATTRIBUTE_RULE
 
Fields inherited from interface org.apache.commons.chain.Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE
 
Constructor Summary
ActivationCommand()
           
 
Method Summary
protected  void activateRecursive(Context ctx, java.util.List versionMap)
           
protected  void activateRecursive(java.lang.String parentPath, Content node, Context ctx)
          Activate recursively.
 boolean execute(Context ctx)
          Execute activation
protected  java.util.List getOrderingInfo(Content node)
          collect node UUID of the siblings in the exact order as it should be written on subscribers
 java.lang.String getVersion()
           
 java.util.List getVersionMap()
           
 boolean isRecursive()
           
 void release()
          If a clone is passivated we call this method.
 void setRecursive(boolean recursive)
           
 void setVersion(java.lang.String number)
           
 void setVersionMap(java.util.List versionMap)
           
 
Methods inherited from class info.magnolia.module.admininterface.commands.BaseActivationCommand
getSyndicator, setSyndicator
 
Methods inherited from class info.magnolia.module.admininterface.commands.RuleBasedCommand
getItemTypes, getRule, setItemTypes, setRule
 
Methods inherited from class info.magnolia.module.admininterface.commands.BaseRepositoryCommand
getNode, getPath, getRepository, getUuid, setPath, setRepository, setUuid
 
Methods inherited from class info.magnolia.commands.MgnlCommand
execute, isClone, isEnabled, setClone, setEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActivationCommand

public ActivationCommand()
Method Detail

execute

public boolean execute(Context ctx)
Execute activation

Specified by:
execute in class MgnlCommand

activateRecursive

protected void activateRecursive(java.lang.String parentPath,
                                 Content node,
                                 Context ctx)
                          throws ExchangeException,
                                 javax.jcr.RepositoryException
Activate recursively. This is done one by one to send only small peaces (memory friendly).

Parameters:
parentPath -
node -
Throws:
ExchangeException
javax.jcr.RepositoryException

activateRecursive

protected void activateRecursive(Context ctx,
                                 java.util.List versionMap)
                          throws ExchangeException,
                                 javax.jcr.RepositoryException
Parameters:
ctx -
versionMap -
Throws:
ExchangeException
javax.jcr.RepositoryException

getOrderingInfo

protected java.util.List getOrderingInfo(Content node)
collect node UUID of the siblings in the exact order as it should be written on subscribers

Parameters:
node -

isRecursive

public boolean isRecursive()
Returns:
the recursive

setRecursive

public void setRecursive(boolean recursive)
Parameters:
recursive - the recursive to set

setVersion

public void setVersion(java.lang.String number)
Parameters:
number - version number to be set for activation

getVersion

public java.lang.String getVersion()
Returns:
version number

setVersionMap

public void setVersionMap(java.util.List versionMap)
Parameters:
versionMap - version map to be set for activation

getVersionMap

public java.util.List getVersionMap()
Returns:
version map

release

public void release()
Description copied from class: MgnlCommand
If a clone is passivated we call this method. Please clean up private properties.

Overrides:
release in class BaseActivationCommand


Copyright © 2003-2011 Magnolia International Ltd.. All Rights Reserved.