info.magnolia.module.data.commands
Class BaseDataAllCommand

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.data.commands.BaseDataAllCommand
All Implemented Interfaces:
org.apache.commons.chain.Command
Direct Known Subclasses:
DataActivateAllCommand, DataDeactivateAllCommand, DataDeleteAllCommand

public abstract class BaseDataAllCommand
extends info.magnolia.module.admininterface.commands.BaseActivationCommand

Abstract base for commands executing operations on all the nodes in data workspace.

Version:
$Id$

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
BaseDataAllCommand()
           
 
Method Summary
protected  Collection<info.magnolia.cms.core.Content> collectNodes()
          Will collect all nodes to be processed.
 boolean execute(info.magnolia.context.Context ctx)
           
protected abstract  void executeNode(info.magnolia.cms.core.Content node)
           
 String getItemType()
           
 Collection<info.magnolia.cms.core.Content> getNodes()
           
 Collection<String> getNodeUUIDs()
           
 void release()
           
 void setItemType(String itemType)
           
 void setNodes(Collection<info.magnolia.cms.core.Content> nodes)
           
 void setNodeUUIDs(Collection<String> nodeUUIDs)
           
 
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

BaseDataAllCommand

public BaseDataAllCommand()
Method Detail

execute

public boolean execute(info.magnolia.context.Context ctx)
Specified by:
execute in class info.magnolia.commands.MgnlCommand

executeNode

protected abstract void executeNode(info.magnolia.cms.core.Content node)
                             throws info.magnolia.cms.exchange.ExchangeException,
                                    javax.jcr.RepositoryException
Throws:
info.magnolia.cms.exchange.ExchangeException
javax.jcr.RepositoryException

collectNodes

protected Collection<info.magnolia.cms.core.Content> collectNodes()
Will collect all nodes to be processed. Use with care as this method might cause quite a lot of memory to be used (if many nodes are to be processed).

Returns:

getNodes

public Collection<info.magnolia.cms.core.Content> getNodes()

setNodes

public void setNodes(Collection<info.magnolia.cms.core.Content> nodes)

getItemType

public String getItemType()

setItemType

public void setItemType(String itemType)

getNodeUUIDs

public Collection<String> getNodeUUIDs()

setNodeUUIDs

public void setNodeUUIDs(Collection<String> nodeUUIDs)

release

public void release()
Overrides:
release in class info.magnolia.module.admininterface.commands.BaseActivationCommand


Copyright © 2012 Magnolia International Ltd.. All Rights Reserved.