Remote Systems
v6.4.1

com.ibm.etools.systems.core.ui.uda
Class SystemUDActionManager

java.lang.Object
  extended bycom.ibm.etools.systems.core.ui.uda.SystemUDBaseManager
      extended bycom.ibm.etools.systems.core.ui.uda.SystemUDActionManager
All Implemented Interfaces:
ErrorHandler, ISystemUDAConstants, ISystemXMLElementWrapperFactory

public class SystemUDActionManager
extends SystemUDBaseManager

Instances of this class hold the UDA definitions unique to:

  1. The SystemProfile - according to the subsystem
  2. The SubSystem type - according to the subclassed SystemUDActionSubsystem
Instances of this class will be linked to a SubSystem instance Eventually, would hope to create a factory method for this class which will return existing instances common to the subsystems of different connections within the same profile.


Field Summary
static String copyright
           
 
Fields inherited from class com.ibm.etools.systems.core.ui.uda.SystemUDBaseManager
_udas, EMPTY_ARRAY, importCaseFolder
 
Fields inherited from interface com.ibm.etools.systems.core.ui.uda.ISystemXMLElementWrapperFactory
Copyright
 
Fields inherited from interface com.ibm.etools.systems.core.ui.uda.ISystemUDAConstants
NAME_ATTR, ORIGINAL_NAME_ATTR, RELEASE_ATTR, XE_DOMAIN, XE_DOMNAME, XE_DOMTYPE
 
Constructor Summary
SystemUDActionManager(SystemUDActionSubsystem udas)
          Constructor
 
Method Summary
 SystemUDActionElement addAction(SystemProfile profile, String name, int domain)
          Add a user-defined action
 SystemXMLElementWrapper createElementWrapper(Element xmlElementToWrap, SystemProfile profile, int domain)
          Given an xml element node, create an instance of the appropriate subclass of SystemXMLElementWrapper to represent it.
protected  boolean doMigration(SystemProfile profile, String oldRelease)
          Overridable method for child classes to do migration of their document.
 SystemUDActionElement[] getActions(Vector v, SystemProfile profile, int domain)
          Return xml element wrapper objects for all actions, for the given domain, or for the whole document if domain is -1 (iff domains not supported).
 SystemUDActionElement[] getAllActions(Vector v, SystemProfile profile)
          Return all the actions for the given profile, in all domains.
protected  IFolder getDocumentFolder(SubSystemFactory subsystemFactory, SystemProfile profile)
          Get the folder containing the xml file used to persist the actions, for the given profile
 String getDocumentRootTagName()
          Get the document root tag name.
 String getFileName()
          Get name of the xml file used to persist the actions.
 Image getNewImage()
          Get the icon to show in the tree views, for the "new" expandable item
protected  String getNewNodeLabel()
          Parent method override for returning the "New" icon label for the Work With dialog tree view.
 String getTagName()
          Return the tag name for our managed elements.
 boolean hasActions(SystemProfile profile, SubSystemFactory ssFactory)
          Return true if there are any actions, currently.
protected  boolean isUserActionsManager()
          Return true if this is user actions, false if this is named types.
 SystemXMLElementWrapper[] primeDocument(SystemProfile profile)
          Prime the given document with any default actions/types Should be overridden!
 void setFolder(String profileName, String factoryId)
          Intended for IMPORT actions only, where no Subsystem instance available:
 boolean supportsProfiles()
          Return true if the elements managed by this class are scoped by profile.
protected  boolean uppercaseName()
          Do we uppercase the value of the "Name" attribute?
 
Methods inherited from class com.ibm.etools.systems.core.ui.uda.SystemUDBaseManager
addElement, createAndPrimeDocument, createDomainElement, createDomainElementWrapper, createExistingDomainElementWrappers, dataChanged, delete, dispose, domainTypeEquals, enablePaste, error, fatalError, findByName, findChildByName, findDomainElement, findOrCreateDomainElement, findOrCreateDomainElement, getActionSubSystem, getAdapter, getChildren, getCurrentProfile, getDocument, getDocumentRelease, getDomainWrapper, getElements, getElements, getElements, getExistingNames, getFilePath, getParent, getSubSystem, getSubSystemFactory, getXMLWrappers, getXMLWrappers, hasChildren, inCurrentTree, initializeDocument, inputChanged, isDomainElement, isDomainElement, loadAndParseXMLFile, loadUserData, moveElementDown, moveElementUp, pasteClipboardCopy, prepareClipboardCopy, processResourceChangeHit, refreshLocal, resetUserData, resourceChanged, saveUserData, setChanged, setCurrentProfile, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values
Constructor Detail

SystemUDActionManager

public SystemUDActionManager(SystemUDActionSubsystem udas)
Constructor

Method Detail

isUserActionsManager

protected boolean isUserActionsManager()
Return true if this is user actions, false if this is named types.

Specified by:
isUserActionsManager in class SystemUDBaseManager

getNewImage

public Image getNewImage()
Get the icon to show in the tree views, for the "new" expandable item

Overrides:
getNewImage in class SystemUDBaseManager

getNewNodeLabel

protected String getNewNodeLabel()
Parent method override for returning the "New" icon label for the Work With dialog tree view. For us, we defer to the getActionSubSystem().getNewNodeActionLabel(). Do not override this.

Overrides:
getNewNodeLabel in class SystemUDBaseManager
Returns:
translated value for "New" in new icon for WW action and type dialogs. Default is "New"

doMigration

protected boolean doMigration(SystemProfile profile,
                              String oldRelease)
Overridable method for child classes to do migration of their document. This is called on first load of a document, which has a release stamp other than the current release

Specified by:
doMigration in class SystemUDBaseManager
Returns:
true if any migration was done

getFileName

public String getFileName()
Get name of the xml file used to persist the actions.

Specified by:
getFileName in class SystemUDBaseManager

getDocumentRootTagName

public String getDocumentRootTagName()
Get the document root tag name. We return "Actions"

Specified by:
getDocumentRootTagName in class SystemUDBaseManager

uppercaseName

protected boolean uppercaseName()
Do we uppercase the value of the "Name" attribute? No, we don't for actions.

Specified by:
uppercaseName in class SystemUDBaseManager

supportsProfiles

public boolean supportsProfiles()
Return true if the elements managed by this class are scoped by profile. Usually true for actions, false for types

Overrides:
supportsProfiles in class SystemUDBaseManager

primeDocument

public SystemXMLElementWrapper[] primeDocument(SystemProfile profile)
Prime the given document with any default actions/types Should be overridden!

Overrides:
primeDocument in class SystemUDBaseManager

getDocumentFolder

protected IFolder getDocumentFolder(SubSystemFactory subsystemFactory,
                                    SystemProfile profile)
Get the folder containing the xml file used to persist the actions, for the given profile

Specified by:
getDocumentFolder in class SystemUDBaseManager

setFolder

public void setFolder(String profileName,
                      String factoryId)
Intended for IMPORT actions only, where no Subsystem instance available:

Specified by:
setFolder in class SystemUDBaseManager

addAction

public SystemUDActionElement addAction(SystemProfile profile,
                                       String name,
                                       int domain)
Add a user-defined action


hasActions

public boolean hasActions(SystemProfile profile,
                          SubSystemFactory ssFactory)
Return true if there are any actions, currently.


getActions

public SystemUDActionElement[] getActions(Vector v,
                                          SystemProfile profile,
                                          int domain)
Return xml element wrapper objects for all actions, for the given domain, or for the whole document if domain is -1 (iff domains not supported).

Parameters:
v - - existing vector to populate. If null passed, it is not populated.
profile - - the profile to limit the search to
domain - - the integer representation of the given domain, or -1 iff supportsDomains() is false
Returns:
array of action objects

getAllActions

public SystemUDActionElement[] getAllActions(Vector v,
                                             SystemProfile profile)
Return all the actions for the given profile, in all domains.

Parameters:
v - - existing vector to populate. If null passed, it is not populated.
profile - - the profile to limit the search to
Returns:
array of action objects

getTagName

public String getTagName()
Return the tag name for our managed elements. Eg: will be "Action" for user actions, and "Type" for file types.

Specified by:
getTagName in interface ISystemXMLElementWrapperFactory
Specified by:
getTagName in class SystemUDBaseManager

createElementWrapper

public SystemXMLElementWrapper createElementWrapper(Element xmlElementToWrap,
                                                    SystemProfile profile,
                                                    int domain)
Given an xml element node, create an instance of the appropriate subclass of SystemXMLElementWrapper to represent it.

Specified by:
createElementWrapper in interface ISystemXMLElementWrapperFactory
Specified by:
createElementWrapper in class SystemUDBaseManager

Remote Systems
v6.4.1

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.