Package com.ebasetech.ufs.mapping
Interface CustomResourceInterface
- All Superinterfaces:
java.io.Serializable
public interface CustomResourceInterface
extends java.io.Serializable
This interface must be implemented by all custom functions. It's main method
- execute - is executed each time a command is issued against the resource.
It provides two other methods, fetchTable and updateTable, which are called
when the FETCHTABLE and UPDATETABLE commands are issued against a UFS table.
- Version:
- 2.4
- Author:
- Jon Rickard 19 Oct 2002
-
Method Summary
Modifier and Type Method Description java.lang.String
execute(ResourceRequestInterface resourceRequest, java.lang.String command)
This method is invoked each time a command is issued against the custom resource.void
fetchTable(ResourceRequestInterface resourceRequest, java.lang.String tableId)
This method notifies the resource that table data has been requested from this resource.java.util.Collection
getCommandNames()
Returns a collection of names of commands supported by the execute method of this resource.java.util.Collection
getParameterNames()
Returns a collection of names of parameters which this resource implementation needs to be supplied by the user.void
updateTable(ResourceRequestInterface resourceRequest, java.lang.String tableId)
This method notifies the resource that table data is being updated to this resource.
-
Method Details
-
execute
java.lang.String execute(ResourceRequestInterface resourceRequest, java.lang.String command) throws com.ebasetech.ufs.kernel.FormExceptionThis method is invoked each time a command is issued against the custom resource.- Parameters:
resourceRequest
- the call back interface that is used for accessing fields and attributes of the custom resourcecommand
- the command issued. These can be checked against constants in the ResourceRequestInterface- Returns:
- String return status The return status can be checked by an FPL script by examining the $COMMAND_STATUS variable. A number of return statuses are available as constants in class com.ebasetech.ufs.validation.CommandStatus e.g. CommandStatus.STATUS_OK, CommandStatus.STATUS_ERROR. However, any character value can be returned.
- Throws:
com.ebasetech.ufs.kernel.FormException
-
fetchTable
void fetchTable(ResourceRequestInterface resourceRequest, java.lang.String tableId) throws com.ebasetech.ufs.kernel.FormExceptionThis method notifies the resource that table data has been requested from this resource. Implementations of this method should use the supplied resource request object to create a new TableData object, populate it and return it to the resourceRequest.- Parameters:
resourceRequest
- the call back interface that is used for accessing fields and attributes of the custom resourcetableId
- is the name of the resource field which is mapped to the form table against which a fetchtable command has been issued.- Throws:
com.ebasetech.ufs.kernel.FormException
-
updateTable
void updateTable(ResourceRequestInterface resourceRequest, java.lang.String tableId) throws com.ebasetech.ufs.kernel.FormExceptionThis method notifies the resource that table data is being updated to this resource. Implementations of this method should use the supplied resource request to request the updated table data and update the resource accordingly.- Parameters:
resourceRequest
- the call back interface that is used for accessing fields and attributes of the custom resourcetableId
- is the name of the resource field which is mapped to the form table against which an updatetable command has been issued.- Throws:
com.ebasetech.ufs.kernel.FormException
-
getParameterNames
java.util.Collection getParameterNames()Returns a collection of names of parameters which this resource implementation needs to be supplied by the user. Parameters defined here will appear as input fields on the Custom Resource frame in the designer. The corresponding parameter valued can then be retreived from the resourceRequest interface using getParameterValue().- Returns:
- Collection of Strings. If null is returned, it will be assumed that this is an old implementation which still relies on the four old, predeclared parameters which are accessed using the deprecated methods getResourceParm1(), getResourceParm2(), getResourceParm3(), getResourceParm4(). This will still be supported for the current release but it is recommended that implementations migrate to using explicit declaration of parameters as soon as possible.
-
getCommandNames
java.util.Collection getCommandNames()Returns a collection of names of commands supported by the execute method of this resource. Commands can be either those pre-defined in the ResourceRequestInterface or user defined commands. Note: user defined commands will not be verifyable in the script editor since they will not be present in the FPL language.- Returns:
- Collection of Strings.
-