com.metamatrix.common.actions
Class AbstractObjectEditor

java.lang.Object
  extended by com.metamatrix.common.actions.AbstractObjectEditor
All Implemented Interfaces:
ObjectEditor, java.io.Serializable
Direct Known Subclasses:
AbstractAuthorizationObjectEditor, BasicConfigurationObjectEditor

public class AbstractObjectEditor
extends java.lang.Object
implements ObjectEditor, java.io.Serializable

See Also:
Serialized Form

Field Summary
protected static java.lang.String ADD_LBL
           
protected static int FIRST_COMMAND
           
protected static int LAST_COMMAND
           
protected static java.lang.String REMOVE_LBL
           
protected static java.lang.String SET_LBL
           
 
Fields inherited from interface com.metamatrix.common.actions.ObjectEditor
ADD, REMOVE, SET
 
Constructor Summary
AbstractObjectEditor()
          Create an instance of this editor.
AbstractObjectEditor(boolean createActions)
           
 
Method Summary
protected  void createAddAction(java.lang.Object targetId, AttributeDefinition attrDefn, java.lang.Object value)
           
protected  void createAddNamedAction(java.lang.Object targetId, AttributeDefinition attrDefn, java.lang.String name, java.lang.Object value)
           
protected  void createCreationAction(java.lang.Object targetId, java.lang.Object value)
           
protected  void createDestroyAction(java.lang.Object targetId, java.lang.Object targetObject)
           
protected  void createExchangeAction(java.lang.Object targetId, AttributeDefinition attrDefn, java.lang.Object oldValue, java.lang.Object newValue)
           
protected  void createExchangeBoolean(java.lang.Object targetId, AttributeDefinition attrDefn, boolean oldValue, boolean newValue)
           
protected  void createExchangeDouble(java.lang.Object targetId, AttributeDefinition attrDefn, double oldValue, double newValue)
           
protected  void createExchangeFloat(java.lang.Object targetId, AttributeDefinition attrDefn, float oldValue, float newValue)
           
protected  void createExchangeInt(java.lang.Object targetId, AttributeDefinition attrDefn, int oldValue, int newValue)
           
protected  void createExchangeLong(java.lang.Object targetId, AttributeDefinition attrDefn, long oldValue, long newValue)
           
protected  void createExchangeNamedAction(java.lang.Object targetId, AttributeDefinition attrDefn, java.lang.String name, java.lang.Object oldValue, java.lang.Object newValue)
           
protected  void createExchangeShort(java.lang.Object targetId, AttributeDefinition attrDefn, short oldValue, short newValue)
           
protected  void createRemoveAction(java.lang.Object targetId, AttributeDefinition attriDefn, java.lang.Object oldValue)
           
protected  void createRemoveNamedAction(java.lang.Object targetId, AttributeDefinition attrDefn, java.lang.String name, java.lang.Object oldValue)
           
 boolean doCreateActions()
           
 ModificationActionQueue getDestination()
          Get the action destination for this object.
protected  java.lang.String getLabel(int command)
           
 void setCreateActions(boolean doCreateActions)
           
 void setDestination(ModificationActionQueue destination)
          Set the destination for this object.
protected  void verifyCommand(int command)
           
protected  java.lang.Object verifyTargetClass(java.lang.Object target, java.lang.Class requiredClass)
          Subclass helper method that simply verifies that the specified target is either an instance of the specified class (or interface).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FIRST_COMMAND

protected static final int FIRST_COMMAND
See Also:
Constant Field Values

LAST_COMMAND

protected static final int LAST_COMMAND
See Also:
Constant Field Values

SET_LBL

protected static final java.lang.String SET_LBL
See Also:
Constant Field Values

ADD_LBL

protected static final java.lang.String ADD_LBL
See Also:
Constant Field Values

REMOVE_LBL

protected static final java.lang.String REMOVE_LBL
See Also:
Constant Field Values
Constructor Detail

AbstractObjectEditor

public AbstractObjectEditor()
Create an instance of this editor.


AbstractObjectEditor

public AbstractObjectEditor(boolean createActions)
Method Detail

getDestination

public ModificationActionQueue getDestination()
Get the action destination for this object. The modification actions, if used, are created by the modifyObject method.

Specified by:
getDestination in interface ObjectEditor
Returns:
the action queue into which the modification actions are placed.

setDestination

public void setDestination(ModificationActionQueue destination)
Set the destination for this object.

Specified by:
setDestination in interface ObjectEditor
Parameters:
destination - the new destination queue for any modification actions created by this editor.

doCreateActions

public boolean doCreateActions()

setCreateActions

public void setCreateActions(boolean doCreateActions)

getLabel

protected java.lang.String getLabel(int command)

verifyCommand

protected void verifyCommand(int command)

verifyTargetClass

protected java.lang.Object verifyTargetClass(java.lang.Object target,
                                             java.lang.Class requiredClass)
                                      throws java.lang.IllegalArgumentException
Subclass helper method that simply verifies that the specified target is either an instance of the specified class (or interface).

Parameters:
target - the target or target identifier.
requiredClass - the class/interface that the target must be an instance of.
Returns:
the target object (for convenience)
Throws:
java.lang.IllegalArgumentException - if either the target is not an instance of the specified class.

createCreationAction

protected void createCreationAction(java.lang.Object targetId,
                                    java.lang.Object value)

createAddNamedAction

protected void createAddNamedAction(java.lang.Object targetId,
                                    AttributeDefinition attrDefn,
                                    java.lang.String name,
                                    java.lang.Object value)

createAddAction

protected void createAddAction(java.lang.Object targetId,
                               AttributeDefinition attrDefn,
                               java.lang.Object value)

createExchangeNamedAction

protected void createExchangeNamedAction(java.lang.Object targetId,
                                         AttributeDefinition attrDefn,
                                         java.lang.String name,
                                         java.lang.Object oldValue,
                                         java.lang.Object newValue)

createExchangeAction

protected void createExchangeAction(java.lang.Object targetId,
                                    AttributeDefinition attrDefn,
                                    java.lang.Object oldValue,
                                    java.lang.Object newValue)

createRemoveNamedAction

protected void createRemoveNamedAction(java.lang.Object targetId,
                                       AttributeDefinition attrDefn,
                                       java.lang.String name,
                                       java.lang.Object oldValue)

createRemoveAction

protected void createRemoveAction(java.lang.Object targetId,
                                  AttributeDefinition attriDefn,
                                  java.lang.Object oldValue)

createExchangeBoolean

protected void createExchangeBoolean(java.lang.Object targetId,
                                     AttributeDefinition attrDefn,
                                     boolean oldValue,
                                     boolean newValue)

createExchangeInt

protected void createExchangeInt(java.lang.Object targetId,
                                 AttributeDefinition attrDefn,
                                 int oldValue,
                                 int newValue)

createExchangeLong

protected void createExchangeLong(java.lang.Object targetId,
                                  AttributeDefinition attrDefn,
                                  long oldValue,
                                  long newValue)

createExchangeDouble

protected void createExchangeDouble(java.lang.Object targetId,
                                    AttributeDefinition attrDefn,
                                    double oldValue,
                                    double newValue)

createExchangeFloat

protected void createExchangeFloat(java.lang.Object targetId,
                                   AttributeDefinition attrDefn,
                                   float oldValue,
                                   float newValue)

createExchangeShort

protected void createExchangeShort(java.lang.Object targetId,
                                   AttributeDefinition attrDefn,
                                   short oldValue,
                                   short newValue)

createDestroyAction

protected void createDestroyAction(java.lang.Object targetId,
                                   java.lang.Object targetObject)


Copyright © 2009. All Rights Reserved.