info.magnolia.commands.impl
Class BaseRepositoryCommand

java.lang.Object
  extended by info.magnolia.commands.MgnlCommand
      extended by info.magnolia.commands.impl.BaseRepositoryCommand
All Implemented Interfaces:
Command
Direct Known Subclasses:
DeleteCommand, ExportCommand, MarkNodeAsDeletedCommand, RuleBasedCommand

public abstract class BaseRepositoryCommand
extends MgnlCommand

Base class for the commands that work with the repository.


Field Summary
 
Fields inherited from class info.magnolia.commands.MgnlCommand
log
 
Fields inherited from interface info.magnolia.commands.chain.Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE
 
Constructor Summary
BaseRepositoryCommand()
           
 
Method Summary
 BaseRepositoryCommand copy(Command command)
          This method allows to create new copy of a command, so the instances in the CommandManager's catalogs are masters, and the execution always uses new instance created by this method.
NOTE: If your command uses default parameters (set from a JCR property), you MUST override this method to copy the values from the master command to the actually used copy.
protected  javax.jcr.Node getJCRNode(Context ctx)
          Retrieve the Node.
protected  Content getNode(Context ctx)
          Deprecated. since 4.5.7 use getJCRNode(Context) instead
 String getPath()
           
 String getRepository()
           
 String getUuid()
           
 void release()
          If a clone is passivated we call this method.
 void setPath(String path)
           
 void setRepository(String repository)
           
 void setUuid(String uuid)
           
 
Methods inherited from class info.magnolia.commands.MgnlCommand
execute, execute, isEnabled, setEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseRepositoryCommand

public BaseRepositoryCommand()
Method Detail

getNode

@Deprecated
protected Content getNode(Context ctx)
                   throws javax.jcr.RepositoryException
Deprecated. since 4.5.7 use getJCRNode(Context) instead

Throws:
javax.jcr.RepositoryException

getJCRNode

protected javax.jcr.Node getJCRNode(Context ctx)
                             throws javax.jcr.RepositoryException
Retrieve the Node.

Throws:
javax.jcr.RepositoryException

getRepository

public String getRepository()
Returns:
the repository

setRepository

public void setRepository(String repository)
Parameters:
repository - the repository to set

getPath

public String getPath()
Returns:
the path

setPath

public void setPath(String path)
Parameters:
path - the path to set

getUuid

public String getUuid()
Returns:
the uuid

setUuid

public void setUuid(String uuid)
Parameters:
uuid - the uuid to set

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 MgnlCommand

copy

public BaseRepositoryCommand copy(Command command)
Description copied from interface: Command
This method allows to create new copy of a command, so the instances in the CommandManager's catalogs are masters, and the execution always uses new instance created by this method.
NOTE: If your command uses default parameters (set from a JCR property), you MUST override this method to copy the values from the master command to the actually used copy.

Specified by:
copy in interface Command
Overrides:
copy in class MgnlCommand


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