com.centrasite.control.registry.commands
Class AddClassificationCommand

java.lang.Object
  extended by com.softwareag.cis.plugin.command.AbstractCommand
      extended by com.centrasite.control.AbstractCommandExt
          extended by com.centrasite.control.registry.commands.AddClassificationCommand
All Implemented Interfaces:
AddClassificationListener, com.softwareag.cis.plugin.command.Command, com.softwareag.cis.plugin.interfaces.Component

public class AddClassificationCommand
extends AbstractCommandExt
implements AddClassificationListener

Command for creating a new internal or external classification


Field Summary
 
Fields inherited from class com.softwareag.cis.plugin.command.AbstractCommand
rcs_id
 
Fields inherited from interface com.softwareag.cis.plugin.command.Command
CATEGORY_APPLICATION_HIGH_PRIO, CATEGORY_APPLICATION_LOW_PRIO, CATEGORY_COPY, CATEGORY_DELETE, CATEGORY_DOCUMENT, CATEGORY_EDIT, CATEGORY_EXECUTE, CATEGORY_FAVORITES, CATEGORY_IMPORT_EXPORT, CATEGORY_LCM, CATEGORY_LINK, CATEGORY_MIN, CATEGORY_MISC, CATEGORY_NEW, CATEGORY_OBJECT, CATEGORY_OPEN, CATEGORY_PREFERENCES, CATEGORY_SAVE, CATEGORY_SEARCH, CATEGORY_SHOW, CATEGORY_UPDATE, CATEGORY_UPDATE_EXT, CATEGORY_VIEW, COMMAND_ACTIVATE_DEACTIVATE, COMMAND_ADD_CATEGORY, COMMAND_ADD_COPY, COMMAND_ADD_DOCUMENT, COMMAND_ADD_FOLDER, COMMAND_ADD_TO_FAVORITES, COMMAND_ADD_TO_LIST, COMMAND_ADD_TYPE, COMMAND_ADD_VERSION, COMMAND_ATTACH_WS_POLICY, COMMAND_ATTACH_WSDL, COMMAND_CHANGE_LIFEC_STATE, COMMAND_CHANGE_PROVIDING_ORG, COMMAND_CHECK_CONN, COMMAND_COMPARE, COMMAND_COPY_SHORTCUT, COMMAND_DELETE, COMMAND_DOCUMENTATION, COMMAND_DOWNLOAD, COMMAND_DOWNLOAD_BPEL, COMMAND_DOWNLOAD_WSDL, COMMAND_DOWNLOAD_XMLSCHEMA, COMMAND_EDIT_DETAILS, COMMAND_EXPORT, COMMAND_EXPORT_CONTENTS, COMMAND_EXPORT_FAVORITE, COMMAND_GENERATE_REPORT, COMMAND_IMPACT_ANALYSIS, COMMAND_IMPORT_ASSET, COMMAND_LC_CREATE_NEW_VERS, COMMAND_NOTIFY_ME, COMMAND_PERMISSIONS, COMMAND_REGISTER_AS_CONSUMER, COMMAND_REGISTER_CONS, COMMAND_REMOVE_FROM_FAVORITES, COMMAND_RENAME, COMMAND_RENAME_LIST, COMMAND_SHOW_DETAILS, COMMAND_VIRTUALIZE
 
Constructor Summary
AddClassificationCommand(java.util.Locale loc)
           
 
Method Summary
 boolean accepts(Item item)
           
 void execute(ActionContext actionContext)
          Opens the "Add Classification" Dialog
 void executeCommand(RegistryObjectItem selectedClassificationScheme, java.lang.String category, ActionContext actionContext)
          Creates new Internal/External Classification
 int getCategory()
          The value returned by this command may be used for command ordering and grouping (for example in a context menu)
 javax.xml.registry.infomodel.Classification getCreatedClassification()
          Retrieves the classification object created as a result of command execution.
 java.lang.String getImageURL()
          Obtain the image url for this command
 AddClassificationListener getListerner()
           
 java.lang.String getName()
          Obtain the name for this command
 javax.xml.registry.infomodel.ClassificationScheme getPreselectedScheme()
           
 void onClickCancel()
           
 boolean onClickOk(RegistryObjectItem selectedClassificationScheme, java.lang.String category, ActionContext actionContext)
          Invoked when clicked on OK button of the Add Classification dialog.
 void setListerner(AddClassificationListener listerner)
           
 void setPreselectedScheme(javax.xml.registry.infomodel.ClassificationScheme preselectedScheme)
           
 
Methods inherited from class com.centrasite.control.AbstractCommandExt
execute, executeWrapped, getId, getLocale, getSubCommands, isEnabled, isEnabled, isImplemented, isSameGroup, isToBeVisualized, setLocale
 
Methods inherited from class com.softwareag.cis.plugin.command.AbstractCommand
execute, executeWrapped, getComparator, getSelectable, isEnabled, isSameGroup, isVisible, setEnabled, setSelectable, setVisible, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AddClassificationCommand

public AddClassificationCommand(java.util.Locale loc)
Method Detail

getPreselectedScheme

public javax.xml.registry.infomodel.ClassificationScheme getPreselectedScheme()
Returns:
the preselectedScheme

setPreselectedScheme

public void setPreselectedScheme(javax.xml.registry.infomodel.ClassificationScheme preselectedScheme)
Parameters:
preselectedScheme - the preselectedScheme to set

getListerner

public AddClassificationListener getListerner()
Returns:
the listerner

setListerner

public void setListerner(AddClassificationListener listerner)
Parameters:
listerner - the listerner to set

getName

public java.lang.String getName()
Description copied from class: AbstractCommandExt
Obtain the name for this command

Specified by:
getName in interface com.softwareag.cis.plugin.command.Command
Specified by:
getName in class AbstractCommandExt

getImageURL

public java.lang.String getImageURL()
Description copied from class: AbstractCommandExt
Obtain the image url for this command

Specified by:
getImageURL in interface com.softwareag.cis.plugin.command.Command
Specified by:
getImageURL in class AbstractCommandExt

execute

public void execute(ActionContext actionContext)
Opens the "Add Classification" Dialog

Specified by:
execute in class AbstractCommandExt
Parameters:
actionContext - the ActionContext

executeCommand

public void executeCommand(RegistryObjectItem selectedClassificationScheme,
                           java.lang.String category,
                           ActionContext actionContext)
Creates new Internal/External Classification

Parameters:
selectedClassificationScheme - - the Classification which is selected from the Tree
category - - category which filled by user only if he has select an External Classification
actionContext - - actionContext

getCategory

public int getCategory()
Description copied from class: AbstractCommandExt
The value returned by this command may be used for command ordering and grouping (for example in a context menu)

Specified by:
getCategory in interface com.softwareag.cis.plugin.command.Command
Specified by:
getCategory in class AbstractCommandExt
Returns:
one of the CATEGORY_* values

accepts

public boolean accepts(Item item)

onClickCancel

public void onClickCancel()
Specified by:
onClickCancel in interface AddClassificationListener

onClickOk

public boolean onClickOk(RegistryObjectItem selectedClassificationScheme,
                         java.lang.String category,
                         ActionContext actionContext)
Description copied from interface: AddClassificationListener
Invoked when clicked on OK button of the Add Classification dialog.

Specified by:
onClickOk in interface AddClassificationListener
Parameters:
selectedClassificationScheme - - the selected ClassificationScheme from the Tree.
category - - category which is filled by user only for External Classifications.
Returns:
boolean success of the operation.

getCreatedClassification

public javax.xml.registry.infomodel.Classification getCreatedClassification()
Retrieves the classification object created as a result of command execution.

Returns:
The newly created Classifcation object or null if one was not created.