uk.ac.essex.common.action.impl
Class ActionServiceImpl

java.lang.Object
  extended by uk.ac.essex.common.action.impl.ActionServiceImpl
All Implemented Interfaces:
ActionService, Service

public class ActionServiceImpl
extends java.lang.Object
implements ActionService


Created Date: 01-Nov-2003

You should have received a copy of Lesser GNU public license with this code. If not please visit this site


Constructor Summary
ActionServiceImpl()
           
 
Method Summary
 void add(java.io.File actionXMLFile, KeyMap keyMap)
          Adds all the XML files from the given directory
 void add(java.lang.String actionXMLFile, KeyMap keyMap)
          Adds all the XML files from the given directory
 void addAll(java.io.File actionXMLDir, KeyMap keyMap)
          Adds all the XML files from the given directory
 void destroy()
          Destroy the service
 javax.swing.Action get(java.lang.String actionId, java.util.Locale currentLocale)
           
 javax.swing.Action getAction(java.lang.String actionId)
           
 javax.swing.Action getAction(java.lang.String actionId, java.util.Locale currentLocale)
           
 ActionDescriptor getAction(java.lang.String appId, java.lang.String actionId)
           
 ActionDescriptor getActionDescriptor(java.lang.String actionId)
           
 ActionGroupDescriptor getActionGroup(java.lang.String actionGroupId)
           
 ActionGroupDescriptor[] getActionGroups(java.lang.String appId)
           
 ActionDescriptor[] getToolbarActions(java.lang.String appId)
          Getts all the actions for the given application and toolbar
 void initialise()
          Initialise the service
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionServiceImpl

public ActionServiceImpl()
Method Detail

add

public void add(java.io.File actionXMLFile,
                KeyMap keyMap)
         throws XMLParseException,
                java.io.FileNotFoundException
Adds all the XML files from the given directory

Specified by:
add in interface ActionService
Parameters:
actionXMLFile - - Must be a file
keyMap -
Throws:
XMLParseException - - If actionXMLFile is not a file or it cannot parse the file
java.io.FileNotFoundException

add

public void add(java.lang.String actionXMLFile,
                KeyMap keyMap)
         throws XMLParseException
Adds all the XML files from the given directory

Specified by:
add in interface ActionService
Parameters:
actionXMLFile - - Must be a file
keyMap -
Throws:
XMLParseException - - If actionXMLFile is not a file or it cannot parse the file

addAll

public void addAll(java.io.File actionXMLDir,
                   KeyMap keyMap)
            throws XMLParseException,
                   java.io.FileNotFoundException
Adds all the XML files from the given directory

Specified by:
addAll in interface ActionService
Parameters:
actionXMLDir - - Must be a directory
keyMap -
Throws:
XMLParseException - - If actionXMLDir is not a directory or it cannot parse any of the files in that directory
java.io.FileNotFoundException

get

public javax.swing.Action get(java.lang.String actionId,
                              java.util.Locale currentLocale)
                       throws ActionCreationException
Specified by:
get in interface ActionService
Parameters:
actionId -
currentLocale -
Returns:
Throws:
ActionCreationException

getActionDescriptor

public ActionDescriptor getActionDescriptor(java.lang.String actionId)
Specified by:
getActionDescriptor in interface ActionService
Parameters:
actionId -
Returns:

getAction

public javax.swing.Action getAction(java.lang.String actionId)
Specified by:
getAction in interface ActionService
Parameters:
actionId -
Returns:

getAction

public javax.swing.Action getAction(java.lang.String actionId,
                                    java.util.Locale currentLocale)
Specified by:
getAction in interface ActionService
Parameters:
actionId -
currentLocale -
Returns:

getActionGroup

public ActionGroupDescriptor getActionGroup(java.lang.String actionGroupId)
Specified by:
getActionGroup in interface ActionService
Parameters:
actionGroupId -
Returns:

getAction

public ActionDescriptor getAction(java.lang.String appId,
                                  java.lang.String actionId)
Specified by:
getAction in interface ActionService
Parameters:
appId -
actionId -
Returns:

getToolbarActions

public ActionDescriptor[] getToolbarActions(java.lang.String appId)
Getts all the actions for the given application and toolbar

Specified by:
getToolbarActions in interface ActionService
Parameters:
appId -
Returns:

getActionGroups

public ActionGroupDescriptor[] getActionGroups(java.lang.String appId)
Specified by:
getActionGroups in interface ActionService

initialise

public void initialise()
                throws InitialisationException
Initialise the service

Specified by:
initialise in interface Service
Throws:
InitialisationException

destroy

public void destroy()
             throws DestructionException,
                    ShutdownCancelledException
Destroy the service

Specified by:
destroy in interface Service
Throws:
DestructionException
ShutdownCancelledException