org.apache.jackrabbit.server.io
Class AbstractCommand

java.lang.Object
  extended byorg.apache.jackrabbit.server.io.AbstractCommand
All Implemented Interfaces:
org.apache.commons.chain.Command, org.apache.jackrabbit.JcrConstants
Direct Known Subclasses:
AbstractExportCommand, AbstractImportCommand, AddMixinCommand, AddNodeCommand, CheckinCommand, DirListingExportCommand, PrimaryItemExportCommand, SaveCommand, SetContentTypeCommand, XMLImportCommand, ZIPImportCommand

public abstract class AbstractCommand
extends Object
implements org.apache.commons.chain.Command, org.apache.jackrabbit.JcrConstants

This Class implements an abstract command


Field Summary
 
Fields inherited from interface org.apache.jackrabbit.JcrConstants
JCR_AUTOCREATED, JCR_BASEVERSION, JCR_CHILD, JCR_CHILDNODEDEFINITION, JCR_CONTENT, JCR_CREATED, JCR_DATA, JCR_DEFAULTPRIMARYTYPE, JCR_DEFAULTVALUES, JCR_ENCODING, JCR_FROZENMIXINTYPES, JCR_FROZENNODE, JCR_FROZENPRIMARYTYPE, JCR_FROZENUUID, JCR_HASORDERABLECHILDNODES, JCR_ISCHECKEDOUT, JCR_ISMIXIN, JCR_LANGUAGE, JCR_LASTMODIFIED, JCR_LOCKISDEEP, JCR_LOCKOWNER, JCR_MANDATORY, JCR_MERGEFAILED, JCR_MIMETYPE, JCR_MIXINTYPES, JCR_MULTIPLE, JCR_NAME, JCR_NODETYPENAME, JCR_ONPARENTVERSION, JCR_PATH, JCR_PREDECESSORS, JCR_PRIMARYITEMNAME, JCR_PRIMARYTYPE, JCR_PROPERTYDEFINITION, JCR_PROTECTED, JCR_REQUIREDPRIMARYTYPES, JCR_REQUIREDTYPE, JCR_ROOTVERSION, JCR_SAMENAMESIBLINGS, JCR_SCORE, JCR_STATEMENT, JCR_SUCCESSORS, JCR_SUPERTYPES, JCR_SYSTEM, JCR_UUID, JCR_VALUECONSTRAINTS, JCR_VERSIONABLEUUID, JCR_VERSIONHISTORY, JCR_VERSIONLABELS, JCR_VERSIONSTORAGE, MIX_LOCKABLE, MIX_REFERENCEABLE, MIX_VERSIONABLE, NT_BASE, NT_CHILDNODEDEFINITION, NT_FILE, NT_FOLDER, NT_FROZENNODE, NT_HIERARCHYNODE, NT_LINKEDFILE, NT_NODETYPE, NT_PROPERTYDEFINITION, NT_QUERY, NT_RESOURCE, NT_UNSTRUCTURED, NT_VERSION, NT_VERSIONEDCHILD, NT_VERSIONHISTORY, NT_VERSIONLABELS
 
Constructor Summary
AbstractCommand()
           
 
Method Summary
abstract  boolean execute(AbstractContext context)
          Executes this command
 boolean execute(org.apache.commons.chain.Context context)
          Executes this command by calling execute(AbstractContext) if this command is not disabled by the context properties.
 String getId()
          Gets the id of this command
 void setEnabled(boolean enabled)
          Sets the enabled flag.
 void setId(String id)
          Sets the id of this command
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCommand

public AbstractCommand()
Method Detail

execute

public final boolean execute(org.apache.commons.chain.Context context)
                      throws Exception
Executes this command by calling execute(AbstractContext) if this command is not disabled by the context properties.

Specified by:
execute in interface org.apache.commons.chain.Command
Parameters:
context - the (import) context.
Returns:
the return value of the delegated method or false;
Throws:
Exception - in an error occurrs

setEnabled

public void setEnabled(boolean enabled)
Sets the enabled flag.

Parameters:
enabled -

execute

public abstract boolean execute(AbstractContext context)
                         throws Exception
Executes this command

Parameters:
context -
Returns:
Throws:
Exception

getId

public String getId()
Gets the id of this command

Returns:

setId

public void setId(String id)
Sets the id of this command

Parameters:
id -


Copyright © 2005 . All Rights Reserved.