org.ow2.clif.scenario.isac.egui.wizards.plugin
Class XMLManipulator

java.lang.Object
  extended by org.ow2.clif.scenario.isac.egui.wizards.plugin.XMLManipulator

public class XMLManipulator
extends java.lang.Object

This class permits to manipulate XML model with the JDOM API in order to construct valid gui, plugin and build XML files.

Author:
Fabrice Rivart, Bruno Dillenseger

Constructor Summary
XMLManipulator()
          Constructor.
 
Method Summary
 void addAction(java.lang.String action, java.lang.String name, int number)
          This method adds action element in gui and plugin XML file.
 void addGroup(java.lang.String action, java.lang.String actionName, java.lang.String parentPath, java.lang.String groupName)
          This method adds group element in gui XML file.
 void addParameter(java.lang.String action, java.lang.String actionName, java.lang.String guiPath, java.lang.String pluginPath, java.lang.String paramName)
          This method adds parameter element in gui XML file.
 void addParameterElement(java.lang.String action, java.lang.String actionName, java.lang.String guiPath, java.lang.String type, java.lang.String elementName)
          This method adds parameter element in gui XML file.
 void deleteAction(java.lang.String action, java.lang.String name)
          This method deletes action element in gui and plugin XML file.
 void deleteElement(java.lang.String action, java.lang.String actionName, java.lang.String guiParentPath, java.lang.String pluginParentPath, java.lang.String guiElementPath, java.lang.String pluginElementPath)
          This method deletes group or parameter element in gui and plugin XML file.
 void deleteParameterElement(java.lang.String action, java.lang.String actionName, java.lang.String guiPath, java.lang.String type, java.lang.String elementName)
          This method deletes parameter element in gui XML file.
 int getActionNumber(java.lang.String action, java.lang.String name)
          Returns an int representing action number.
 java.util.ArrayList<java.lang.String> getActions(java.lang.String action)
          Returns a ArrayList representing string actions.
 java.io.InputStream getBuildContent()
          Returns a InputStream representing the build XML file.
 java.lang.String getClassName()
           
 java.io.InputStream getGuiContent()
          Returns a InputStream representing the gui XML file.
 java.lang.String getHelp(java.lang.String action, java.lang.String name)
          Returns a String representing action help.
 int getMaxNumber()
          Returns a int representing the maximum number attribute in plugin XML file.
 java.lang.String getPackageName()
           
 java.lang.String getParameterElementDefault(java.lang.String action, java.lang.String actionName, java.lang.String guiPath, java.lang.String type, java.lang.String elementName)
          Returns default parameter element value from gui XML file.
 java.util.ArrayList<java.lang.String> getParameterElements(java.lang.String action, java.lang.String actionName, java.lang.String guiPath, java.lang.String type)
          Returns parameter element list in gui XML file.
 java.lang.String getParameterFieldSize(java.lang.String action, java.lang.String actionName, java.lang.String guiElementPath)
          This method returns parameter field size from gui file.
 java.lang.String getParameterFieldText(java.lang.String action, java.lang.String actionName, java.lang.String guiElementPath)
          This method returns parameter field text from gui file.
 java.lang.String getParameterLabel(java.lang.String action, java.lang.String actionName, java.lang.String guiElementPath)
          This method returns parameter label from gui file.
 java.lang.String getParameterType(java.lang.String action, java.lang.String actionName, java.lang.String guiElementPath)
          This method returns parameter represention from gui file.
 org.jdom.Element getParams(java.lang.String action, java.lang.String name)
          Returns a Element representing action params element.
 java.io.InputStream getPluginContent()
          Returns a InputStream representing the plugin XML file.
 java.lang.String[] getStringParams(java.lang.String action, java.lang.String name)
          Returns String [] contening all parameter name
 boolean isParameterExist(java.lang.String action, java.lang.String name, java.lang.String elementPath)
          Returns true if element exists
 void loadBuild(java.io.InputStream arg0)
          This method loads build file in memory.
 void loadGui(java.io.InputStream arg0)
          This method loads gui file in memory.
 void loadPlugin(java.io.InputStream arg0)
          This method loads plugin file in memory.
 void moveDownAction(java.lang.String action, java.lang.String name)
          This method move down action element in gui and plugin XML file.
 void moveDownParameter(java.lang.String action, java.lang.String actionName, java.lang.String guiParentPath, java.lang.String guiElementPath)
          This method moves down parameter in gui XML file.
 void moveDownParameterElement(java.lang.String action, java.lang.String actionName, java.lang.String guiPath, java.lang.String type, java.lang.String elementName)
          This method moves down parameter element in gui XML file.
 void moveUpAction(java.lang.String action, java.lang.String name)
          This method move up action element in gui and plugin XML file.
 void moveUpParameter(java.lang.String action, java.lang.String actionName, java.lang.String guiParentPath, java.lang.String guiElementPath)
          This method moves up parameter in gui XML file.
 void moveUpParameterElement(java.lang.String action, java.lang.String actionName, java.lang.String guiPath, java.lang.String type, java.lang.String elementName)
          This method moves up parameter element in gui XML file.
 void reset()
          This method resets memory.
 void setGuiObjectName(java.lang.String name)
          This method sets object name in gui XML file.
 void setHelp(java.lang.String action, java.lang.String name, java.lang.String help)
          Set action help in plugin XML file
 void setParameterElementDefault(java.lang.String action, java.lang.String actionName, java.lang.String guiPath, java.lang.String type, java.lang.String elementName, java.lang.String value)
          This method sets default parameter element value to true or false in gui XML file.
 void setParameterFieldSize(java.lang.String action, java.lang.String actionName, java.lang.String guiElementPath, java.lang.String size)
          This method updates parameter field size in gui file.
 void setParameterFieldText(java.lang.String action, java.lang.String actionName, java.lang.String guiElementPath, java.lang.String text)
          This method updates parameter field text in gui file.
 void setParameterLabel(java.lang.String action, java.lang.String actionName, java.lang.String guiElementPath, java.lang.String label)
          This method updates parameter label in gui file.
 void setParameterType(java.lang.String action, java.lang.String actionName, java.lang.String guiElementPath, java.lang.String type)
          This method updates parameter represention in gui file.
 void setPluginClassName(java.lang.String name)
          This method sets class name in plugin XML file.
 void setPluginName(java.lang.String name)
          This method sets plugin name in plugin and build XML files.
 void setSourceDir(java.lang.String dirname)
          This method sets the source directory in the build XML file.
 void setXMLFiles(java.lang.String pluginFile, java.lang.String guiFile)
          Sets the names of plugin and gui XML files associated to the plug-in
 void updateAction(java.lang.String action, java.lang.String oldName, java.lang.String newName)
          This method update action element in gui and plugin XML file.
 void updateElementName(java.lang.String action, java.lang.String actionName, java.lang.String guiElementPath, java.lang.String pluginElementPath, java.lang.String newName)
          This method updates group or parameter element name in gui and plugin XML file.
 void updateParameterElement(java.lang.String action, java.lang.String actionName, java.lang.String guiPath, java.lang.String type, java.lang.String oldElementName, java.lang.String newElementName)
          This method updates parameter element in gui XML file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLManipulator

public XMLManipulator()
Constructor.

Method Detail

loadGui

public void loadGui(java.io.InputStream arg0)
             throws java.lang.Exception
This method loads gui file in memory.

Parameters:
arg0 - InputStream representing the gui file
Throws:
java.lang.Exception

loadPlugin

public void loadPlugin(java.io.InputStream arg0)
                throws java.lang.Exception
This method loads plugin file in memory.

Parameters:
arg0 - InputStream representing the plugin file
Throws:
java.lang.Exception

loadBuild

public void loadBuild(java.io.InputStream arg0)
               throws java.lang.Exception
This method loads build file in memory.

Parameters:
arg0 - InputStream representing the build file
Throws:
java.lang.Exception

reset

public void reset()
This method resets memory.


getGuiContent

public java.io.InputStream getGuiContent()
Returns a InputStream representing the gui XML file.

Returns:
InputStream representing the gui XML file.

getPluginContent

public java.io.InputStream getPluginContent()
Returns a InputStream representing the plugin XML file.

Returns:
InputStream representing the plugin XML file.

getBuildContent

public java.io.InputStream getBuildContent()
Returns a InputStream representing the build XML file.

Returns:
input stream for the build XML file contents

setPluginName

public void setPluginName(java.lang.String name)
                   throws java.lang.Exception
This method sets plugin name in plugin and build XML files.

Parameters:
name - String representing plugin name.
Throws:
java.lang.Exception

setPluginClassName

public void setPluginClassName(java.lang.String name)
                        throws java.lang.Exception
This method sets class name in plugin XML file.

Parameters:
name - String representing class name.
Throws:
java.lang.Exception

setGuiObjectName

public void setGuiObjectName(java.lang.String name)
                      throws java.lang.Exception
This method sets object name in gui XML file.

Parameters:
name - String representing object name.
Throws:
java.lang.Exception

setSourceDir

public void setSourceDir(java.lang.String dirname)
                  throws org.jdom.JDOMException
This method sets the source directory in the build XML file.

Parameters:
dirname - the directory name
Throws:
org.jdom.JDOMException

setXMLFiles

public void setXMLFiles(java.lang.String pluginFile,
                        java.lang.String guiFile)
                 throws org.jdom.JDOMException
Sets the names of plugin and gui XML files associated to the plug-in

Parameters:
pluginFile - name of the plugin XML file
guiFile - name of the GUI XML file
Throws:
org.jdom.JDOMException

addAction

public void addAction(java.lang.String action,
                      java.lang.String name,
                      int number)
               throws java.lang.Exception
This method adds action element in gui and plugin XML file.

Parameters:
action - String representing the action to add (sample, timer, test, control)
name - String representing action name
number - int representing action number (generated)
Throws:
java.lang.Exception - if there is an error

deleteAction

public void deleteAction(java.lang.String action,
                         java.lang.String name)
                  throws java.lang.Exception
This method deletes action element in gui and plugin XML file.

Parameters:
action - String representing the action to delete (sample, timer, test, control)
name - String representing action name
Throws:
java.lang.Exception - if there is an error

updateAction

public void updateAction(java.lang.String action,
                         java.lang.String oldName,
                         java.lang.String newName)
                  throws java.lang.Exception
This method update action element in gui and plugin XML file.

Parameters:
action - String representing the action to update (sample, timer, test, control)
oldName - String representing old action name
newName - String representing new action name
Throws:
java.lang.Exception - if there is an error

moveUpAction

public void moveUpAction(java.lang.String action,
                         java.lang.String name)
                  throws java.lang.Exception
This method move up action element in gui and plugin XML file.

Parameters:
action - String representing the action to move (sample, timer, test, control)
name - String representing action name
Throws:
java.lang.Exception - if there is an error

moveDownAction

public void moveDownAction(java.lang.String action,
                           java.lang.String name)
                    throws java.lang.Exception
This method move down action element in gui and plugin XML file.

Parameters:
action - String representing the action to move (sample, timer, test, control)
name - String representing action name
Throws:
java.lang.Exception - if there is an error

getActions

public java.util.ArrayList<java.lang.String> getActions(java.lang.String action)
                                                 throws java.lang.Exception
Returns a ArrayList representing string actions.

Parameters:
action - String representing the action to get (sample, timer, test, control)
Returns:
ArrayList representing string actions
Throws:
java.lang.Exception - if there is an error

getHelp

public java.lang.String getHelp(java.lang.String action,
                                java.lang.String name)
                         throws java.lang.Exception
Returns a String representing action help.

Parameters:
action - String representing an action (sample, timer, test, control, object)
name - String representing action name
Returns:
String representing action help
Throws:
java.lang.Exception - if there is an error

setHelp

public void setHelp(java.lang.String action,
                    java.lang.String name,
                    java.lang.String help)
             throws java.lang.Exception
Set action help in plugin XML file

Parameters:
action - String representing an action (sample, timer, test, control, object)
name - String representing action name
help - String representing action help
Throws:
java.lang.Exception - if there is an error

addGroup

public void addGroup(java.lang.String action,
                     java.lang.String actionName,
                     java.lang.String parentPath,
                     java.lang.String groupName)
              throws java.lang.Exception
This method adds group element in gui XML file.

Parameters:
action - String representing an action (sample, timer, test, control, object)
actionName - String representing action name
parentPath - String representing XPath parent expression
groupName - String representing group name
Throws:
java.lang.Exception - if there is an error

addParameter

public void addParameter(java.lang.String action,
                         java.lang.String actionName,
                         java.lang.String guiPath,
                         java.lang.String pluginPath,
                         java.lang.String paramName)
                  throws java.lang.Exception
This method adds parameter element in gui XML file.

Parameters:
action - String representing an action (sample, timer, test, control, object)
actionName - String representing action name
guiPath - String representing XPath parent expression in gui file
pluginPath - String representing XPath parent expression in plugin file
paramName - String representing parameter name
Throws:
java.lang.Exception - if there is an error

deleteElement

public void deleteElement(java.lang.String action,
                          java.lang.String actionName,
                          java.lang.String guiParentPath,
                          java.lang.String pluginParentPath,
                          java.lang.String guiElementPath,
                          java.lang.String pluginElementPath)
                   throws java.lang.Exception
This method deletes group or parameter element in gui and plugin XML file.

Parameters:
action - String representing an action (sample, timer, test, control, object)
actionName - String representing action name
guiParentPath - String representing XPath parent expression in gui file
pluginParentPath - String representing XPath parent expression in plugin file
guiElementPath - String representing XPath element expression in gui file
pluginElementPath - String representing XPath element expression in plugin file
Throws:
java.lang.Exception - if there is an error

updateElementName

public void updateElementName(java.lang.String action,
                              java.lang.String actionName,
                              java.lang.String guiElementPath,
                              java.lang.String pluginElementPath,
                              java.lang.String newName)
                       throws java.lang.Exception
This method updates group or parameter element name in gui and plugin XML file.

Parameters:
action - String representing an action (sample, timer, test, control, object)
actionName - String representing action name
guiElementPath - String representing XPath element expression in gui file
pluginElementPath - String representing XPath element expression in plugin file
newName - String representing the new element name
Throws:
java.lang.Exception - if there is an error

moveUpParameter

public void moveUpParameter(java.lang.String action,
                            java.lang.String actionName,
                            java.lang.String guiParentPath,
                            java.lang.String guiElementPath)
                     throws java.lang.Exception
This method moves up parameter in gui XML file.

Parameters:
action - String representing an action (sample, timer, test, control, object)
actionName - String representing action name
guiParentPath - String representing XPath parent element expression in gui file
guiElementPath - String representing XPath element expression in gui file
Throws:
java.lang.Exception - if there is an error

moveDownParameter

public void moveDownParameter(java.lang.String action,
                              java.lang.String actionName,
                              java.lang.String guiParentPath,
                              java.lang.String guiElementPath)
                       throws java.lang.Exception
This method moves down parameter in gui XML file.

Parameters:
action - String representing an action (sample, timer, test, control, object)
actionName - String representing action name
guiParentPath - String representing XPath parent element expression in gui file
guiElementPath - String representing XPath element expression in gui file
Throws:
java.lang.Exception - if there is an error

setParameterLabel

public void setParameterLabel(java.lang.String action,
                              java.lang.String actionName,
                              java.lang.String guiElementPath,
                              java.lang.String label)
                       throws java.lang.Exception
This method updates parameter label in gui file.

Parameters:
action - String representing an action (sample, timer, test, control, object)
actionName - String representing action name
guiElementPath - String representing XPath element expression in gui file
label - String representing the new parameter label
Throws:
java.lang.Exception - if there is an error

getParameterLabel

public java.lang.String getParameterLabel(java.lang.String action,
                                          java.lang.String actionName,
                                          java.lang.String guiElementPath)
                                   throws java.lang.Exception
This method returns parameter label from gui file.

Parameters:
action - String representing an action (sample, timer, test, control, object)
actionName - String representing action name
guiElementPath - String representing XPath element expression in gui file
Returns:
parameter label from gui file.
Throws:
java.lang.Exception - if there is an error

setParameterType

public void setParameterType(java.lang.String action,
                             java.lang.String actionName,
                             java.lang.String guiElementPath,
                             java.lang.String type)
                      throws java.lang.Exception
This method updates parameter represention in gui file.

Parameters:
action - String representing an action (sample, timer, test, control, object)
actionName - String representing action name
guiElementPath - String representing XPath element expression in gui file
type - String representing the new parameter representation
Throws:
java.lang.Exception - if there is an error

getParameterType

public java.lang.String getParameterType(java.lang.String action,
                                         java.lang.String actionName,
                                         java.lang.String guiElementPath)
                                  throws java.lang.Exception
This method returns parameter represention from gui file.

Parameters:
action - String representing an action (sample, timer, test, control, object)
actionName - String representing action name
guiElementPath - String representing XPath element expression in gui file
Returns:
parameter represention from gui file
Throws:
java.lang.Exception - if there is an error

setParameterFieldText

public void setParameterFieldText(java.lang.String action,
                                  java.lang.String actionName,
                                  java.lang.String guiElementPath,
                                  java.lang.String text)
                           throws java.lang.Exception
This method updates parameter field text in gui file.

Parameters:
action - String representing an action (sample, timer, test, control, object)
actionName - String representing action name
guiElementPath - String representing XPath element expression in gui file
text - String representing the new parameter field text
Throws:
java.lang.Exception - if there is an error

getParameterFieldText

public java.lang.String getParameterFieldText(java.lang.String action,
                                              java.lang.String actionName,
                                              java.lang.String guiElementPath)
                                       throws java.lang.Exception
This method returns parameter field text from gui file.

Parameters:
action - String representing an action (sample, timer, test, control, object)
actionName - String representing action name
guiElementPath - String representing XPath element expression in gui file
Returns:
parameter represention from gui file
Throws:
java.lang.Exception - if there is an error

setParameterFieldSize

public void setParameterFieldSize(java.lang.String action,
                                  java.lang.String actionName,
                                  java.lang.String guiElementPath,
                                  java.lang.String size)
                           throws java.lang.Exception
This method updates parameter field size in gui file.

Parameters:
action - String representing an action (sample, timer, test, control, object)
actionName - String representing action name
guiElementPath - String representing XPath element expression in gui file
size - String representing the new parameter field size
Throws:
java.lang.Exception - if there is an error

getParameterFieldSize

public java.lang.String getParameterFieldSize(java.lang.String action,
                                              java.lang.String actionName,
                                              java.lang.String guiElementPath)
                                       throws java.lang.Exception
This method returns parameter field size from gui file.

Parameters:
action - String representing an action (sample, timer, test, control, object)
actionName - String representing action name
guiElementPath - String representing XPath element expression in gui file
Returns:
parameter represention from gui file
Throws:
java.lang.Exception - if there is an error

addParameterElement

public void addParameterElement(java.lang.String action,
                                java.lang.String actionName,
                                java.lang.String guiPath,
                                java.lang.String type,
                                java.lang.String elementName)
                         throws java.lang.Exception
This method adds parameter element in gui XML file.

Parameters:
action - String representing an action (sample, timer, test, control, object)
actionName - String representing action name
guiPath - String representing XPath parent expression in gui file
type - String representing representation of element
elementName - String representing parameter element name
Throws:
java.lang.Exception - if there is an error

deleteParameterElement

public void deleteParameterElement(java.lang.String action,
                                   java.lang.String actionName,
                                   java.lang.String guiPath,
                                   java.lang.String type,
                                   java.lang.String elementName)
                            throws java.lang.Exception
This method deletes parameter element in gui XML file.

Parameters:
action - String representing an action (sample, timer, test, control, object)
actionName - String representing action name
guiPath - String representing XPath parent expression in gui file
type - String representing representation of element
elementName - String representing parameter element name
Throws:
java.lang.Exception - if there is an error

updateParameterElement

public void updateParameterElement(java.lang.String action,
                                   java.lang.String actionName,
                                   java.lang.String guiPath,
                                   java.lang.String type,
                                   java.lang.String oldElementName,
                                   java.lang.String newElementName)
                            throws java.lang.Exception
This method updates parameter element in gui XML file.

Parameters:
action - String representing an action (sample, timer, test, control, object)
actionName - String representing action name
guiPath - String representing XPath parent expression in gui file
type - String representing representation of element
oldElementName - String representing old parameter element name
newElementName - String representing new parameter element name
Throws:
java.lang.Exception - if there is an error

moveUpParameterElement

public void moveUpParameterElement(java.lang.String action,
                                   java.lang.String actionName,
                                   java.lang.String guiPath,
                                   java.lang.String type,
                                   java.lang.String elementName)
                            throws java.lang.Exception
This method moves up parameter element in gui XML file.

Parameters:
action - String representing an action (sample, timer, test, control, object)
actionName - String representing action name
guiPath - String representing XPath parent expression in gui file
type - String representing representation of element
elementName - String representing parameter element name
Throws:
java.lang.Exception - if there is an error

moveDownParameterElement

public void moveDownParameterElement(java.lang.String action,
                                     java.lang.String actionName,
                                     java.lang.String guiPath,
                                     java.lang.String type,
                                     java.lang.String elementName)
                              throws java.lang.Exception
This method moves down parameter element in gui XML file.

Parameters:
action - String representing an action (sample, timer, test, control, object)
actionName - String representing action name
guiPath - String representing XPath parent expression in gui file
type - String representing representation of element
elementName - String representing parameter element name
Throws:
java.lang.Exception - if there is an error

getParameterElements

public java.util.ArrayList<java.lang.String> getParameterElements(java.lang.String action,
                                                                  java.lang.String actionName,
                                                                  java.lang.String guiPath,
                                                                  java.lang.String type)
                                                           throws java.lang.Exception
Returns parameter element list in gui XML file.

Parameters:
action - String representing an action (sample, timer, test, control, object)
actionName - String representing action name
guiPath - String representing XPath parent expression in gui file
type - String representing representation of element
Returns:
ArrayList of all elements
Throws:
java.lang.Exception - if there is an error

setParameterElementDefault

public void setParameterElementDefault(java.lang.String action,
                                       java.lang.String actionName,
                                       java.lang.String guiPath,
                                       java.lang.String type,
                                       java.lang.String elementName,
                                       java.lang.String value)
                                throws java.lang.Exception
This method sets default parameter element value to true or false in gui XML file.

Parameters:
action - String representing an action (sample, timer, test, control, object)
actionName - String representing action name
guiPath - String representing XPath parent expression in gui file
type - String representing representation of element
elementName - String representing parameter element name
value - String representing the value to set
Throws:
java.lang.Exception - if there is an error

getParameterElementDefault

public java.lang.String getParameterElementDefault(java.lang.String action,
                                                   java.lang.String actionName,
                                                   java.lang.String guiPath,
                                                   java.lang.String type,
                                                   java.lang.String elementName)
                                            throws java.lang.Exception
Returns default parameter element value from gui XML file.

Parameters:
action - String representing an action (sample, timer, test, control, object)
actionName - String representing action name
guiPath - String representing XPath parent expression in gui file
type - String representing representation of element
elementName - String representing parameter element name
Returns:
String representing default parameter element value
Throws:
java.lang.Exception - if there is an error

getParams

public org.jdom.Element getParams(java.lang.String action,
                                  java.lang.String name)
                           throws java.lang.Exception
Returns a Element representing action params element.

Parameters:
action - String representing an action (sample, timer, test, control, object)
name - String representing action name
Returns:
Element representing action params element
Throws:
java.lang.Exception - if there is an error

getStringParams

public java.lang.String[] getStringParams(java.lang.String action,
                                          java.lang.String name)
                                   throws java.lang.Exception
Returns String [] contening all parameter name

Parameters:
action - String representing an action (sample, timer, test, control, object)
name - String representing action name
Returns:
String [] contening all parameter name
Throws:
java.lang.Exception - if there is an error

getMaxNumber

public int getMaxNumber()
                 throws java.lang.Exception
Returns a int representing the maximum number attribute in plugin XML file.

Returns:
int representing the maximum number attribute in plugin XML file
Throws:
java.lang.Exception - if there is an error.

isParameterExist

public boolean isParameterExist(java.lang.String action,
                                java.lang.String name,
                                java.lang.String elementPath)
                         throws java.lang.Exception
Returns true if element exists

Parameters:
action - String representing the action (sample, timer, test, control, object)
name - String representing action name
elementPath - String representing XPath expression of element
Returns:
true if element exists
Throws:
java.lang.Exception - if there is an error.

getClassName

public java.lang.String getClassName()
                              throws java.lang.Exception
Returns:
String representing class name
Throws:
java.lang.Exception - if there is an error.

getActionNumber

public int getActionNumber(java.lang.String action,
                           java.lang.String name)
                    throws java.lang.Exception
Returns an int representing action number.

Parameters:
action - String representing the action (sample, timer, test, control)
name - String representing action name
Returns:
int representing action number
Throws:
java.lang.Exception - if there is an error.

getPackageName

public java.lang.String getPackageName()
                                throws java.lang.Exception
Returns:
String representing package name
Throws:
java.lang.Exception - if there is an error.