public abstract class ResourceHelper extends AbstractResource implements CreoleListener
namefeatures| 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, toStringgetFeatures, setFeaturesclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFeatures, setFeaturespublic Resource init() throws ResourceInstantiationException
AbstractResourceinit in interface Resourceinit in class AbstractResourceResourceInstantiationExceptionpublic 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 callNoSuchMethodExceptionIllegalArgumentExceptionIllegalAccessExceptionInvocationTargetExceptionpublic void cleanup()
AbstractResourcecleanup in interface Resourcecleanup in class AbstractResourcepublic void resourceUnloaded(CreoleEvent e)
CreoleListenerResource has been removed from the systemresourceUnloaded in interface CreoleListenerpublic void resourceLoaded(CreoleEvent e)
CreoleListenerResource has been loaded into the systemresourceLoaded in interface CreoleListenerpublic void datastoreOpened(CreoleEvent e)
CreoleListenerDataStore has been openeddatastoreOpened in interface CreoleListenerpublic void datastoreCreated(CreoleEvent e)
CreoleListenerDataStore has been createddatastoreCreated in interface CreoleListenerpublic void datastoreClosed(CreoleEvent e)
CreoleListenerDataStore has been closeddatastoreClosed in interface CreoleListenerpublic void resourceRenamed(Resource resource, String oldName, String newName)
CreoleListenerresourceRenamed in interface CreoleListenerCopyright © 2024 GATE. All rights reserved.