|
|
com.architech.connector
|
Field Summary | |
static java.lang.String |
PROPERTY_MESSAGE
|
static java.lang.String |
PROPERTY_READER
|
static java.lang.String |
PROPERTY_WRITER
|
Fields inherited from interface com.architech.connector.rscConnectorInterface |
RCS_ADD, RCS_ALL, RCS_DELETE, RCS_HIERARCHICALSEARCH, RCS_MODIFY, RCS_NONE, RCS_SEARCH |
Constructor Summary | |
rscConnector()
Default constructor. |
Method Summary | |
void |
abort(java.lang.String errmsg)
|
void |
addFindEntry(java.lang.Object entry)
Adds an entry to the list of duplicate entries found. |
void |
clearFindEntries()
Removes all entries from the duplicate entry list. |
void |
debug(java.lang.String msg)
Log a message to the connector's log if the debug flag is set. |
boolean |
debugMode()
Returns whether debug mode is set or not. |
void |
deleteEntry(Entry entry,
rscSearchCriteria search)
Deletes an existing entry. |
Entry |
findEntry(java.lang.Object key,
java.lang.Object value)
Locates an entry based on a key/value pair. |
Entry |
findEntry(rscSearchCriteria search)
Finds an existing entry. |
java.lang.Boolean |
getBoolean(java.lang.Object p1)
Get boolean returns the value of a config parameter as boolean |
int |
getCapabilities()
Returns the connector's capabilities flag. |
static java.lang.Object |
getClassInstance(java.lang.String className)
Returns a class instance of the specified classname |
java.util.TreeMap |
getConfiguration()
Returns the current configuration for this connector as a TreeMap. |
int |
getFindEntryCount()
Returns the number of duplicate entries in the list. |
com.architech.rsLog |
getLog()
Returns the current log object. |
int |
getMaxDuplicateEntries()
Returns the current number of duplicate entries buffered up by the connector. |
com.architech.config.rsConfiguration |
getMyConfiguration()
Returns the current configuration for this connector |
java.lang.String |
getName()
Returns the name for this connector. |
Entry |
getNextFindEntry()
Returns the next entry from the list of duplicate entries found. |
java.lang.String |
getParam(java.lang.String param)
Returns the value of param as a java.lang.String object. |
java.lang.String[][] |
getParameters()
Returns an array of parameter names and descriptions for the connector's set of parameters. |
com.architech.parser.rspParserInterface |
getParser()
Returns the parser interface used by this connector. |
java.lang.Object |
getProperty(java.lang.Object p1)
Return a connector property. |
Entry |
getPushbackEntry()
Returns the pushed back entry for the connector. |
com.architech.RSInterface |
getRSInterface()
Returns the current RSInterface object in use by this connector. |
boolean |
hasCapabability(int capability)
Checks if the connector is capable of a specific operation |
boolean |
hasConfigValue(java.lang.Object p1)
Return true if we have a configuration value for configName. |
void |
initialize(java.lang.Object o)
Initialize the connector. |
void |
initParser(java.lang.Object is,
java.lang.Object os)
Initialize the connector's parser with input and output streams. |
boolean |
isExceptionFatal(java.lang.Exception e)
Returns true if the exception is considered to be fatal. |
void |
loadParser(java.lang.String className)
Loads the parser this connector will use. |
void |
logmsg(java.lang.String msg)
Log a message to the connector's log. |
void |
modEntry(Entry entry,
rscSearchCriteria search)
Modifies an existing entry. |
void |
pushback(Entry e)
Make an entry the next entry to be iterated from the connector. |
void |
putEntry(Entry entry)
Adds a new entry. |
java.lang.Object |
querySchema(java.lang.Object source)
This function translates to whatever means a connector has to discover schema for a connection. |
java.util.Vector |
queryTables()
This function translates to whatever means a connector have to discover "tables" for a connection. |
void |
registerScriptBeans(com.architech.script.scriptEngine se)
This method is called to register specific objects in the script context. |
void |
setCapabilities(int capabilities)
Sets the connectors capabilities to capabilities |
void |
setConfiguration(java.lang.Object config)
Sets the configuration for use by this connector. |
void |
setLog(com.architech.rsLog logger)
Sets the log object to use for logging messages |
void |
setMaxDuplicateEntries(int mde)
Sets the maximum number of duplicate entries to buffer up. |
void |
setName(java.lang.String name)
Set the name for the connector. |
void |
setParam(java.lang.String param,
java.lang.String value)
Adds or replaces a connnector configuration parameter. |
void |
setParentConfiguration(com.architech.config.rsConfiguration parentConfig)
Sets the parent configuration from which this connector inherits configuration data. |
void |
setParser(com.architech.parser.rspParserInterface parser)
Sets the connector's parser. |
void |
setProperty(java.lang.Object p1,
java.lang.Object p2)
Set connector property. |
void |
setRSInterface(com.architech.RSInterface rsi)
Sets the RSInterface for this connector to use. |
void |
terminate()
Terminate the connector. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.architech.connector.rscConnectorInterface |
getNextEntry, selectEntries |
Field Detail |
public static final java.lang.String PROPERTY_MESSAGE
public static final java.lang.String PROPERTY_READER
public static final java.lang.String PROPERTY_WRITER
Constructor Detail |
public rscConnector()
Method Detail |
public java.lang.String[][] getParameters()
getParameters
in interface com.architech.connector.rscConnectorInterface
public void setLog(com.architech.rsLog logger)
setLog
in interface com.architech.connector.rscConnectorInterface
logger
- The log objectrscConnector.logmsg
public com.architech.rsLog getLog()
rsLog
public java.lang.Boolean getBoolean(java.lang.Object p1)
public boolean hasConfigValue(java.lang.Object p1)
public void setMaxDuplicateEntries(int mde)
setMaxDuplicateEntries
in interface com.architech.connector.rscConnectorInterface
maxDupEntries
- The maximum number of entries to buffer uppublic int getMaxDuplicateEntries()
getMaxDuplicateEntries
in interface com.architech.connector.rscConnectorInterface
public Entry getPushbackEntry()
getPushbackEntry
in interface com.architech.connector.rscConnectorInterface
public void pushback(Entry e)
pushback
in interface com.architech.connector.rscConnectorInterface
entry
- The entry to be returned at the next getnext callpublic void logmsg(java.lang.String msg)
msg
- The message to write to the logpublic void debug(java.lang.String msg)
msg
- The message to write to the logpublic void setName(java.lang.String name)
setName
in interface com.architech.connector.rscConnectorInterface
name
- The name for the connectorpublic java.lang.String getName()
getName
in interface com.architech.connector.rscConnectorInterface
public int getCapabilities()
getCapabilities
in interface com.architech.connector.rscConnectorInterface
public void setCapabilities(int capabilities)
setCapabilities
in interface com.architech.connector.rscConnectorInterface
capabilities
- The capabilities bitspublic boolean hasCapabability(int capability)
hasCapabability
in interface com.architech.connector.rscConnectorInterface
capability
- The capability to checkpublic void setParam(java.lang.String param, java.lang.String value)
setParam
in interface com.architech.connector.rscConnectorInterface
param
- The parameter namevalue
- The parameter valuepublic java.lang.String getParam(java.lang.String param)
getParam
in interface com.architech.connector.rscConnectorInterface
param
- The connector configuration parameter namepublic void setParentConfiguration(com.architech.config.rsConfiguration parentConfig)
setParentConfiguration
in interface com.architech.connector.rscConnectorInterface
parentConfig
- The configuration object to inherit from.public void setConfiguration(java.lang.Object config)
setConfiguration
in interface com.architech.connector.rscConnectorInterface
config
- The configuration object (rsConfiguration or TreeMap)public com.architech.config.rsConfiguration getMyConfiguration()
public java.util.TreeMap getConfiguration()
getConfiguration
in interface com.architech.connector.rscConnectorInterface
public void setRSInterface(com.architech.RSInterface rsi)
setRSInterface
in interface com.architech.connector.rscConnectorInterface
rsi
- The RSInterface objectpublic com.architech.RSInterface getRSInterface()
public boolean debugMode()
public boolean isExceptionFatal(java.lang.Exception e)
isExceptionFatal
in interface com.architech.connector.rscConnectorInterface
e
- The exception objectpublic static java.lang.Object getClassInstance(java.lang.String className) throws java.lang.Exception
className
- The fully qualified Java class nameAny
- exception thrown by the class loaderpublic void abort(java.lang.String errmsg)
abort
in interface com.architech.connector.rscConnectorInterface
public void loadParser(java.lang.String className) throws java.lang.Exception
className
- The java class name for the parser to useAny
- exception thrown by the class loaderpublic void initialize(java.lang.Object o) throws java.lang.Exception
initialize
in interface com.architech.connector.rscConnectorInterface
o
- User provided parameterpublic void initParser(java.lang.Object is, java.lang.Object os) throws java.lang.Exception
is
- The input object.os
- the output object.Any
- exception thrown by the parserrscConnector.loadParser
public void setParser(com.architech.parser.rspParserInterface parser) throws java.io.IOException
parser
- The parser interface to usepublic com.architech.parser.rspParserInterface getParser()
public void terminate()
terminate
in interface com.architech.connector.rscConnectorInterface
public void modEntry(Entry entry, rscSearchCriteria search) throws java.lang.Exception
modEntry
in interface com.architech.connector.rscConnectorInterface
entry
- The entry datasearch
- The search criteria used to locate the entry to be modifiedAny
- exceptions thrown by the connector's underlying classespublic void deleteEntry(Entry entry, rscSearchCriteria search) throws java.lang.Exception
deleteEntry
in interface com.architech.connector.rscConnectorInterface
entry
- The entry datasearch
- The search criteria used to locate the entry to be modifiedAny
- exceptions thrown by the connector's underlying classespublic Entry findEntry(rscSearchCriteria search) throws java.lang.Exception
findEntry
in interface com.architech.connector.rscConnectorInterface
search
- The search criteria used to locate the entry to be modifiedAny
- exceptions thrown by the connector's underlying classespublic void putEntry(Entry entry) throws java.lang.Exception
putEntry
in interface com.architech.connector.rscConnectorInterface
entry
- The entry dataAny
- exceptions thrown by the connector's underlying classespublic Entry getNextFindEntry() throws java.lang.Exception
getNextFindEntry
in interface com.architech.connector.rscConnectorInterface
Any
- exceptions thrown by the connector's underlying classespublic Entry findEntry(java.lang.Object key, java.lang.Object value)
key
- The attribute namevalue
- The attribute value matchpublic int getFindEntryCount()
getFindEntryCount
in interface com.architech.connector.rscConnectorInterface
public void clearFindEntries()
public void addFindEntry(java.lang.Object entry)
entry
- The entry object to addpublic java.lang.Object querySchema(java.lang.Object source) throws java.lang.Exception
Each Entry in the Vector returned should contain the following attributes:
Name | Value |
---|---|
name | The name of the column/attribute/field .... |
syntax | The syntax or expected value type |
size | If specified this will give the user a hint as to how long the field may be |
querySchema
in interface com.architech.connector.rscConnectorInterface
source
- The object on which to discover schema. This may be an Entry or a string valueEntry
,
Vector
public java.util.Vector queryTables() throws java.lang.Exception
Vector
public java.lang.Object getProperty(java.lang.Object p1)
p1
- The property namepublic void setProperty(java.lang.Object p1, java.lang.Object p2)
p1
- The property namep2
- The property valuepublic void registerScriptBeans(com.architech.script.scriptEngine se) throws java.lang.Exception
registerScriptBeans
in interface com.architech.connector.rscConnectorInterface
se
- The script engine context
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
![]() |
|