|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--fipaos.parser.datamapping.script.AbstractScriptBinder
Abstract class to enable binding between a OS-specific scripting language & objects.
All properties (i.e. matching get/set pairs) in the object to be marshalled to/from
should be of type String
Property names are determined by capitalising the first letter of a variable name, and setting the rest of the characters to lowercase
If the objects populated have the following methods defined, they will be used:
public void setOriginalDocument( List document )public List getOriginalDocument()NOTE: The implementation of this class doesn't allow multiple lines which set the same variable to be edited.
| Constructor Summary | |
AbstractScriptBinder()
|
|
| Method Summary | |
protected abstract boolean |
canDealWith(java.lang.String filename)
Return true if an instance of this can deal with the contents of the given filename |
protected abstract java.lang.String |
convertFromScriptToName(java.lang.String line)
Returns the name of the varible being set on the given line - returns null if no variable is defined on this line |
protected abstract java.lang.String |
convertFromScriptToValue(java.lang.String line)
Returns the value of the varible being set on the given line - returns null if no variable is defined on this line |
protected abstract java.lang.String |
convertToScript(java.lang.String variable,
java.lang.String value)
Returns a line of script that will set the given variable to the given value |
protected abstract java.lang.String |
getTypeOf(java.lang.String filename)
Return the type of class to populate for the given filename |
protected static java.util.Map |
loadBindings(java.lang.String filename)
Loads binding from the given filename (relative to package this is in) |
protected static void |
registerWithDataMapperFactory(AbstractScriptBinder instance)
Registers with the DataMapperFactory |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AbstractScriptBinder()
| Method Detail |
protected abstract boolean canDealWith(java.lang.String filename)
protected abstract java.lang.String getTypeOf(java.lang.String filename)
protected abstract java.lang.String convertToScript(java.lang.String variable,
java.lang.String value)
protected abstract java.lang.String convertFromScriptToName(java.lang.String line)
protected abstract java.lang.String convertFromScriptToValue(java.lang.String line)
protected static java.util.Map loadBindings(java.lang.String filename)
protected static void registerWithDataMapperFactory(AbstractScriptBinder instance)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||