public abstract class ResourceHelper extends AbstractResource implements CreoleListener
name
features
Constructor and Description |
---|
ResourceHelper() |
Modifier and Type | Method and Description |
---|---|
protected abstract List<Action> |
buildActions(NameBearerHandle handle)
Build the
Action instances that should be used to
enhance the right-click menu of the specified
NameBearerHandle . |
Object |
call(String action,
Resource resource,
Object... params)
Allows for the calling of methods defined within ResourceHelper instances
which aren't part of the core API and so which can only be called via
reflection.
|
void |
cleanup()
releases the memory allocated to this resource
|
void |
datastoreClosed(CreoleEvent e)
Called when a
DataStore has been closed |
void |
datastoreCreated(CreoleEvent e)
Called when a
DataStore has been created |
void |
datastoreOpened(CreoleEvent e)
Called when a
DataStore has been opened |
List<Action> |
getActions(NameBearerHandle handle)
Get the right-click menu items that this tool will add to the specified
resource.
|
Resource |
init()
Initialise this resource, and return it.
|
void |
resourceLoaded(CreoleEvent e)
Called when a new
Resource has been loaded into the system |
void |
resourceRenamed(Resource resource,
String oldName,
String newName)
Called when the creole register has renamed a resource.1
|
void |
resourceUnloaded(CreoleEvent e)
Called when a
Resource has been removed from the system |
checkParameterValues, flushBeanInfoCache, forgetBeanInfo, getBeanInfo, getInitParameterValues, getInitParameterValues, getName, getParameterValue, getParameterValue, getParameterValues, removeResourceListeners, setName, setParameterValue, setParameterValue, setParameterValues, setParameterValues, setResourceListeners, toString
getFeatures, setFeatures
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getFeatures, setFeatures
public Resource init() throws ResourceInstantiationException
AbstractResource
init
in interface Resource
init
in class AbstractResource
ResourceInstantiationException
public List<Action> getActions(NameBearerHandle handle)
buildActions(NameBearerHandle)
.handle
- the NameBearerHandle
instance we are wanting to
add new menu items toAction
instances which will be added
to the right click menu of the specified handleprotected abstract List<Action> buildActions(NameBearerHandle handle)
Action
instances that should be used to
enhance the right-click menu of the specified
NameBearerHandle
.handle
- the NameBearerHandle
instance we are adding toAction
instances that will be added
to the right-click menu of the resource.public Object call(String action, Resource resource, Object... params) throws NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException
action
- the name of the method to call (method must take a Resource
instance as it's first parameter)resource
- the Resource instance that you want to helpparams
- parameters to the method you are trying to callNoSuchMethodException
IllegalArgumentException
IllegalAccessException
InvocationTargetException
public void cleanup()
AbstractResource
cleanup
in interface Resource
cleanup
in class AbstractResource
public void resourceUnloaded(CreoleEvent e)
CreoleListener
Resource
has been removed from the systemresourceUnloaded
in interface CreoleListener
public void resourceLoaded(CreoleEvent e)
CreoleListener
Resource
has been loaded into the systemresourceLoaded
in interface CreoleListener
public void datastoreOpened(CreoleEvent e)
CreoleListener
DataStore
has been openeddatastoreOpened
in interface CreoleListener
public void datastoreCreated(CreoleEvent e)
CreoleListener
DataStore
has been createddatastoreCreated
in interface CreoleListener
public void datastoreClosed(CreoleEvent e)
CreoleListener
DataStore
has been closeddatastoreClosed
in interface CreoleListener
public void resourceRenamed(Resource resource, String oldName, String newName)
CreoleListener
resourceRenamed
in interface CreoleListener
Copyright © 2024 GATE. All rights reserved.