|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.softwareag.ino.sxs.ASXJBase
public class ASXJBase
Field Summary |
---|
Method Summary | |
---|---|
static SXSClassLoader |
changeClassLoader(java.lang.String classPath)
Creates a new instance of SXSClassLoader to load
extension classes. |
static ASXJBase |
createSxsObject(java.lang.String className,
java.lang.String extClassPath,
long pSink,
long pTrace,
long pCallerTrace)
Creates an extension object with particular class path extension. |
static SXSClassLoader |
currentClassLoader()
|
long |
getCallbackHandle()
Return callback handle. |
int |
pt_c(char[] var,
char val)
Callback method for server trace. |
int |
pt_decl(char[] pszName,
int errlev)
Callback method for server trace. |
int |
pt_i(char[] var,
int val)
Callback method for server trace. |
int |
pt_leave()
Callback method for server trace. |
int |
pt_s(char[] var,
char[] val)
Callback method for server trace. |
int |
pt_text(char[] text)
Callback method for server trace. |
int |
pt_ws(char[] var,
char[] val)
Callback method for server trace. |
void |
resetThreadClassLoader()
|
void |
setThreadClassLoader()
|
void |
SxsException(int errnr,
java.lang.String msg)
Tells the Tamino server that an exception happened in a Java extension. |
int |
SxsGetDocument(java.lang.String collection,
java.lang.String doctype,
int inoid,
Result result)
Get a XML/non-XML document from Tamino based on the ino:id. |
int |
SxsGetDocument(java.lang.String collection,
java.lang.String doctype,
java.lang.String documentId,
Result result)
Get a XML/non-XML document from Tamino based on the docname/ino:id. |
int |
SxsGetHttpHeaderField(java.lang.String attrName,
java.lang.StringBuffer value)
Get an attribute value of the HTTP header of the request |
int |
SxsGetInoMsgNo()
Gets the error number if an XML request via callback failed. |
int |
SxsGetMsgNo()
Gets the callback error number if a callback method failed. |
java.lang.String |
SxsGetMsgText()
Gets the error message if a callback method failed. |
int |
SxsGetNonXMLDocument(java.lang.String collection,
java.lang.String doctype,
int inoid,
java.io.ByteArrayOutputStream nonXmlDoc)
Get a NonXML document from Tamino based on the ino:id. |
int |
SxsGetNonXMLDocument(java.lang.String collection,
java.lang.String doctype,
java.lang.String documentId,
java.io.ByteArrayOutputStream nonXmlDoc)
Get a NonXML document from Tamino based on the ino:id. |
int |
SxsGetPasswordAuthentication(SxsPasswordAuthentication auth)
Get the UserId/Password for the current user as a Java PasswordAuthentication object |
int |
SxsGetProperty(int property,
java.lang.StringBuffer value)
Get a property via callback. |
int |
SxsGetSQLMsgNo()
Gets the error number an SQL query via ODBC callback failed. |
java.lang.String |
SxsGetStackTrace()
Gets the stack trace of a call. |
int |
SxsPutDocument(InputDocument document,
java.lang.StringBuffer response)
Inserts an XML/Non-XML document into the Tamino server via callback. |
int |
SxsRepairOperation(java.lang.String op,
java.lang.String[] data,
java.lang.StringBuffer response)
Perform specified operation for OnStartup repairs. |
int |
SxsSetProperty(int property,
java.lang.String value)
Set a property via callback. |
int |
SxsSQLAllocHandle(short HandleType,
int InputHandle,
IntRef OutputHandle)
Creates an ODBC statement handle. |
int |
SxsSQLBindCol(int StatementHandle,
short ColumnNumber,
short TargetType,
byte[] TargetValue,
int BufferLength,
IntRef StrLen_or_IndPtr)
Binds a buffer to a result column of an SQL query. |
int |
SxsSQLBindParameter(int StatementHandle,
short ParameterNumber,
short InputOutputType,
short ValueType,
short ParameterType,
int ColumnSize,
short DecimalDigits,
byte[] ParameterValuePtr,
int BufferLength,
IntRef StrLen_or_IndPtr)
Binds a buffer to an input parameter of an SQL statement. |
int |
SxsSQLCloseCursor(int StatementHandle)
Closes the cursor of an SQL query via ODBC callback. |
int |
SxsSQLExecute(int StatementHandle)
Executes an SQL statement via ODBC callback. |
int |
SxsSQLFetch(int StatementHandle)
Fetches the next result row of an SQL statement via ODBC callback. |
int |
SxsSQLFreeHandle(short HandleType,
int Handle)
Drops an ODBC statement handle via callback. |
int |
SxsSQLGetConnect(java.lang.String dbName,
java.lang.String userName,
java.lang.String password,
IntRef Handle)
Creates a connection to the OCDC interface of a Tamino server via callback. |
int |
SxsSQLGetData(int StatementHandle,
short ColumnNumber,
short TargetType,
byte[] TargetValue,
int BufferLength,
IntRef StrLen_or_IndPtr)
Writes the value of a result column into a buffer. |
int |
SxsSQLGetDiagField(short HandleType,
int Handle,
short RecNumber,
short DiagIdentifier,
byte[] DiagInfoPtr,
short BufferLength,
IntRef StringLengthPtr)
Returns the current value of a field of a record of the diagnostic data structure for a handle. |
int |
SxsSQLPrepare(int StatementHandle,
java.lang.String StatementText)
Prepares an SQL statement via ODBC callback. |
int |
SxsSystem(int callType,
java.lang.StringBuffer property)
Get a system property from the Tamino server via callback. |
int |
SxsTrace(java.lang.String packet)
Writes a message into the extension trace via callback. |
int |
SXSTrace(java.lang.String packet)
Writes a message into the extension trace via callback (spelling like in COM). |
void |
SxsWarning(int warnNum,
java.lang.String msg)
Informs the Tamino server that a warning has occurred. |
int |
SxsXMLAdmin(java.lang.String command,
java.lang.StringBuffer response)
Perform an admin command in the Tamino server via callback. |
int |
SxsXMLDefine(java.lang.String xmlSchema,
java.lang.StringBuffer response)
Defines an XML schema in the Tamino server via callback. |
int |
SxsXMLDefine(java.lang.String xmlSchema,
java.lang.String mode,
java.lang.StringBuffer response)
Defines an XML schema in the Tamino server via callback. |
int |
SxsXMLDelete(java.lang.String collection,
java.lang.String query,
java.lang.StringBuffer response)
Deletes an XML document from the Tamino server via callback. |
int |
SxsXMLGetMessage(java.lang.StringBuffer msgContent)
Gets the last message from the Tamino server via callback. |
int |
SxsXMLProcess(java.lang.String collection,
java.lang.String xmlDoc,
java.lang.StringBuffer response)
Inserts an XML document into the Tamino server via callback. |
int |
SxsXMLProcess(java.lang.String collection,
java.lang.String xmlDoc,
java.lang.StringBuffer response,
boolean hasResultElement)
Inserts an XML document into the Tamino server via callback. |
int |
SxsXMLUndefine(java.lang.String collection,
java.lang.String schema,
java.lang.String doctype,
java.lang.StringBuffer response)
Undefine a collection, schema or doctype in the Tamino server via callback. |
int |
SxsXMLXql(java.lang.String collection,
java.lang.String query,
java.lang.StringBuffer response)
Performs an XQL query in the Tamino server via a callback. |
int |
SxsXMLXQuery(java.lang.String collection,
java.lang.String query,
java.util.Map values,
Result result)
Performs an XQuery in the Tamino server via a callback. |
int |
SxsXMLXQuery(java.lang.String collection,
java.lang.String query,
java.util.Map values,
Result result,
boolean hasResultElement)
Performs an XQuery in the Tamino server via a callback. |
int |
SxsXMLXQuery(java.lang.String collection,
java.lang.String query,
Result result)
Performs an XQuery in the Tamino server via a callback. |
int |
SxsXMLXQuery(java.lang.String collection,
java.lang.String query,
Result result,
boolean hasResultElement)
Performs an XQuery in the Tamino server via a callback. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ASXJBase createSxsObject(java.lang.String className, java.lang.String extClassPath, long pSink, long pTrace, long pCallerTrace) throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException
If the corresponding extension class is not yet loaded,
this method first creates a new instance of SXSClassLoader
with extended class path, and then loads the extension class using this class loader.
Finally it creates and initializes an object of this class.
className
- the name of the extension classextClassPath
- the extension of the class path for this extension which
is appended to the system class pathpSink
- the address of the calling server object (required for callbacks)pTrace
- the address of the server trace objectpCallerTrace
- the address of the extension trace object used by
SxsTrace
java.lang.ClassNotFoundException
- if the extension class could not be found
in the extended class path
java.lang.IllegalAccessException
- if this method has no access to the constructor
of the extension class
java.lang.InstantiationException
- if the extension class could not be instantiatedpublic static SXSClassLoader changeClassLoader(java.lang.String classPath)
SXSClassLoader
to load
extension classes. This method is called by the Tamino server after every deinstallation of a Java extension to force class reloading when a new version of this extension will be reinstalled.
classPath
- the classpath for the new class loader
SXSClassLoader
objectpublic static SXSClassLoader currentClassLoader()
public void SxsException(int errnr, java.lang.String msg)
extensions should call this method instead of throwing Java exceptions to tell the Tamino server that something went wrong. The current transaction will be aborted by this method.
SxsException
in interface SXJBase
errnr
- an error number for this exceptionmsg
- the error messagepublic void SxsWarning(int warnNum, java.lang.String msg)
SxsWarning
in interface SXJBase
warnNum
- warning numbermsg
- warning textpublic int SxsXMLXql(java.lang.String collection, java.lang.String query, java.lang.StringBuffer response)
SxsXMLXql
in interface SXJBase
collection
- the collection for this queryquery
- the XQL query stringresponse
- the response buffer in which the query result is written
(should be initialized with the empty string)
public int SxsXMLXQuery(java.lang.String collection, java.lang.String query, Result result)
SxsXMLXQuery
in interface SXJBase
collection
- the collection for this queryquery
- the XQuery stringresult
- the result object in which the query result is written
public int SxsXMLXQuery(java.lang.String collection, java.lang.String query, Result result, boolean hasResultElement)
SxsXMLXQuery
in interface SXJBase
collection
- the collection for this queryquery
- the XQuery stringresult
- the result object in which the query result is writtenhasResultElement
- if true then wrap result with a result element
public int SxsXMLXQuery(java.lang.String collection, java.lang.String query, java.util.Map values, Result result)
SxsXMLXQuery
in interface SXJBase
collection
- the collection for this queryquery
- the XQuery stringvalues
- Map of values (name/value pairs).
The name should be of type String. The value should be of type String (parsed variable) or InputDocument (unparsed variable).result
- the result object in which the query result is written
public int SxsXMLXQuery(java.lang.String collection, java.lang.String query, java.util.Map values, Result result, boolean hasResultElement)
SxsXMLXQuery
in interface SXJBase
collection
- the collection for this queryquery
- the XQuery stringvalues
- Map of values (name/value pairs).
The name should be of type String. The value should be of type String (parsed variable) or InputDocument (unparsed variable).result
- the result object in which the query result is writtenhasResultElement
- if true then wrap result with a result element
public int SxsGetNonXMLDocument(java.lang.String collection, java.lang.String doctype, int inoid, java.io.ByteArrayOutputStream nonXmlDoc)
SxsGetNonXMLDocument
in interface SXJBase
collection
- the collection for this querydoctype
- the doctype where the document is ininoid
- the Tamino ino:id of the documentnonXmlDoc
- the result buffer in which the Non XML document is
written into
public int SxsGetNonXMLDocument(java.lang.String collection, java.lang.String doctype, java.lang.String documentId, java.io.ByteArrayOutputStream nonXmlDoc)
SxsGetNonXMLDocument
in interface SXJBase
collection
- the collection for this querydoctype
- the doctype where the document is indocumentId
- either "@nonXmlDoc
- the result buffer in which the Non XML document is
written into
public int SxsGetDocument(java.lang.String collection, java.lang.String doctype, int inoid, Result result)
SxsGetDocument
in interface SXJBase
collection
- the collection for this querydoctype
- the doctype where the document is ininoid
- the Tamino ino:id of the documentresult
- the result object in which the query result is written
public int SxsGetDocument(java.lang.String collection, java.lang.String doctype, java.lang.String documentId, Result result)
SxsGetDocument
in interface SXJBase
collection
- the collection for this querydoctype
- the doctype where the document is indocumentId
- either "@result
- the result object in which the query result is written
public int SxsPutDocument(InputDocument document, java.lang.StringBuffer response)
SxsPutDocument
in interface SXJBase
document
- document to be insertedresponse
- the result buffer in which the XML result document is written
(should be initialized with the empty string)
public int SxsXMLDefine(java.lang.String xmlSchema, java.lang.StringBuffer response)
SxsXMLDefine
in interface SXJBase
xmlSchema
- a string containing the schemaresponse
- the result buffer in which the XML result document is written (should be initialized with the empty string)
public int SxsXMLDefine(java.lang.String xmlSchema, java.lang.String mode, java.lang.StringBuffer response)
SxsXMLDefine
in interface SXJBase
xmlSchema
- a string containing the schemamode
- mode value to be used (for example "validate")response
- the result buffer in which the XML result document is written (should be initialized with the empty string)
public int SxsXMLUndefine(java.lang.String collection, java.lang.String schema, java.lang.String doctype, java.lang.StringBuffer response)
SxsXMLUndefine
in interface SXJBase
collection
- collection to undefine OR collection of schema/doctypeschema
- schema to undefine OR schema of doctype. May be empty string.doctype
- doctype to undefine. May be empty string.response
- the result buffer in which the XML result document is written
(should be initialized with the empty string)
public int SxsXMLProcess(java.lang.String collection, java.lang.String xmlDoc, java.lang.StringBuffer response)
SxsXMLProcess
in interface SXJBase
collection
- the collection into which the document will be insertedxmlDoc
- the XML document to insertresponse
- the result buffer in which the XML result document is written
(should be initialized with the empty string)
public int SxsXMLProcess(java.lang.String collection, java.lang.String xmlDoc, java.lang.StringBuffer response, boolean hasResultElement)
SxsXMLProcess
in interface SXJBase
collection
- the collection into which the document will be insertedxmlDoc
- the XML document to insertresponse
- the result buffer in which the XML result document is written
(should be initialized with the empty string)hasResultElement
- if true then wrap result with a result element
public int SxsXMLDelete(java.lang.String collection, java.lang.String query, java.lang.StringBuffer response)
SxsXMLDelete
in interface SXJBase
collection
- the collection from which the document will be removedquery
- X-Query identifying document to deleteresponse
- the result buffer in which the XML result document is written
(should be initialized with the empty string)
public int SxsXMLAdmin(java.lang.String command, java.lang.StringBuffer response)
SxsXMLAdmin
in interface SXJBase
command
- admin command to performresponse
- the result buffer in which the XML result document is written
(should be initialized with the empty string)
public int SxsXMLGetMessage(java.lang.StringBuffer msgContent)
SxsXMLGetMessage
in interface SXJBase
msgContent
- the buffer in which the message is written
(should be initialized with the empty string)
public int SxsGetPasswordAuthentication(SxsPasswordAuthentication auth)
SxsGetPasswordAuthentication
in interface SXJBase
auth
- the retrieved userid/password.
public int SxsRepairOperation(java.lang.String op, java.lang.String[] data, java.lang.StringBuffer response)
SxsRepairOperation
in interface SXJBase
op
- operation to be performeddata
- operation dataresponse
- response of operation (maybe empty)
public int SxsSystem(int callType, java.lang.StringBuffer property)
SxsSystem
in interface SXJBase
callType
- specifies the system property to be retrieved
(SERVERURL, USERID, PASSWORD, USERURL, SESSIONID
or
SCHEMA_NODE_INFO
)property
- the result buffer in which the XML result document is written
(should be initialized with the empty string)
public int SxsSetProperty(int property, java.lang.String value)
SxsSetProperty
in interface SXJBase
property
- specifies the property to be set
(SX_PROPERTY_RSP_MEDIATYPE
, ...)value
- the new value for the property
public int SxsGetProperty(int property, java.lang.StringBuffer value)
SxsGetProperty
in interface SXJBase
property
- specifies the property to get
(SX_PROPERTY_RSP_MEDIATYPE
, ...)value
- the returned value of the property
public int SxsGetHttpHeaderField(java.lang.String attrName, java.lang.StringBuffer value)
SxsGetHttpHeaderField
in interface SXJBase
attrName
- the name of the attribute to be retrievedvalue
- the result buffer in which the XML result document is written
(should be initialized with the empty string)
public int SxsSQLGetConnect(java.lang.String dbName, java.lang.String userName, java.lang.String password, IntRef Handle)
SxsSQLGetConnect
in interface SXJBase
dbName
- a data source name defined in the ODBC manageruserName
- a valid user accountpassword
- the password will not appear in the traceHandle
- the address of the connection handle will be entered here
(should be initialized with the default constructor)
public int SxsSQLAllocHandle(short HandleType, int InputHandle, IntRef OutputHandle)
In Tamino extensions this method can only create statement handles.
SxsSQLAllocHandle
in interface SXJBase
HandleType
- the type of the handle to be allocated
(must be SQL_HANDLE_STMT
)InputHandle
- a connection handle received from
SxsSQLGetConnect
OutputHandle
- the address of the statement handle will be entered here
(should be initialized with the default constructor)
public int SxsSQLFreeHandle(short HandleType, int Handle)
SxsSQLFreeHandle
in interface SXJBase
HandleType
- the type of the Handle
(must be SQL_HANDLE_STMT
)Handle
- the handle to be freed
public int SxsSQLPrepare(int StatementHandle, java.lang.String StatementText)
SxsSQLPrepare
in interface SXJBase
StatementHandle
- the handle received from
SxsSQLAllocHandle
StatementText
- the SQL statement to prepare
public int SxsSQLBindParameter(int StatementHandle, short ParameterNumber, short InputOutputType, short ValueType, short ParameterType, int ColumnSize, short DecimalDigits, byte[] ParameterValuePtr, int BufferLength, IntRef StrLen_or_IndPtr)
Before executing the statement the parameter values must be written into the
buffers bound with this method. The length of string parameters or the null
value indicator must be set in StrLen_or_IndPtr
.
SxsSQLBindParameter
in interface SXJBase
StatementHandle
- a handle received from
SxsSQLAllocHandle
ParameterNumber
- the number of the parameter within the statement
(counting starts with 1)InputOutputType
- one of the types defined in SXJBase
ValueType
- the C data type of the parameterParameterType
- the SQL data type of the parameterColumnSize
- the size of the column of the corresponding parameterDecimalDigits
- the decimal digits of the column of the corresponding parameterParameterValuePtr
- a buffer for the parameter value
(should be allocated with the length given in BufferLength
)BufferLength
- the length of the ParameterValuePtr
buffer in bytesStrLen_or_IndPtr
- null value indicator or value length for character or binary data
public int SxsSQLGetData(int StatementHandle, short ColumnNumber, short TargetType, byte[] TargetValue, int BufferLength, IntRef StrLen_or_IndPtr)
SxsSQLGetData
in interface SXJBase
StatementHandle
- a handle received from
SxsSQLAllocHandle
ColumnNumber
- the number of the column within the result table
(counting starts with 1)TargetType
- the C data type of the TargetValue
TargetValue
- a buffer in which to return the column value
(should be allocated with the length given in BufferLength
)BufferLength
- the length of the TargetValue
buffer in bytesStrLen_or_IndPtr
- null value indicator or value length for character or binary data
public int SxsSQLBindCol(int StatementHandle, short ColumnNumber, short TargetType, byte[] TargetValue, int BufferLength, IntRef StrLen_or_IndPtr)
When executing SxsSQLFetch
all buffers bound to columns are filled with the values of the corresponding
columns.
SxsSQLBindCol
in interface SXJBase
StatementHandle
- a handle received from
SxsSQLAllocHandle
ColumnNumber
- the number of the column within the result table
(counting starts with 1)TargetType
- the C data type of the TargetValue
TargetValue
- a buffer to bind to the column
(should be allocated with the length given in BufferLength
)BufferLength
- the length of the TargetValue
buffer in bytesStrLen_or_IndPtr
- null value indicator or value length for character or binary data
public int SxsSQLGetDiagField(short HandleType, int Handle, short RecNumber, short DiagIdentifier, byte[] DiagInfoPtr, short BufferLength, IntRef StringLengthPtr)
SxsSQLGetDiagField
in interface SXJBase
HandleType
- the type of the Handle
(must be SQL_HANDLE_STMT
Handle
- the handle for which diagnostics are requestedRecNumber
- indicates the status record from which diagnostics are requestedDiagIdentifier
- indicates the field of the diagnostic whose value is requestedDiagInfoPtr
- a buffer in which to return the diagnostic information
(should be allocated with the length given in BufferLength
)BufferLength
- the length of the DiagInfoPtr
buffer in bytesStringLengthPtr
- total number of bytes available in DiagInfoPtr
public int SxsSQLExecute(int StatementHandle)
SxsSQLExecute
in interface SXJBase
StatementHandle
- the handle received from
SxsSQLAllocHandle
public int SxsSQLFetch(int StatementHandle)
After fetching the row its values can be retrieved using
SxsSQLGetData
or can be read in the buffers bound with SxsSQLBindCol
.
SxsSQLFetch
in interface SXJBase
StatementHandle
- the handle received from
SxsSQLAllocHandle
public int SxsSQLCloseCursor(int StatementHandle)
SxsSQLCloseCursor
in interface SXJBase
StatementHandle
- the handle received from
SxsSQLAllocHandle
public int SxsTrace(java.lang.String packet)
SxsTrace
in interface SXJBase
packet
- the trace message
public int SXSTrace(java.lang.String packet)
SXSTrace
in interface SXJBase
packet
- the trace message
public int SxsGetMsgNo()
SxsGetMsgNo
in interface SXJBase
public int SxsGetInoMsgNo()
SxsGetInoMsgNo
in interface SXJBase
public int SxsGetSQLMsgNo()
SxsGetSQLMsgNo
in interface SXJBase
public java.lang.String SxsGetMsgText()
SxsGetMsgText
in interface SXJBase
public java.lang.String SxsGetStackTrace()
SxsGetStackTrace
in interface SXJBase
public int pt_decl(char[] pszName, int errlev)
pt_decl
in interface SXJBase
public int pt_s(char[] var, char[] val)
pt_s
in interface SXJBase
public int pt_ws(char[] var, char[] val)
pt_ws
in interface SXJBase
public int pt_i(char[] var, int val)
pt_i
in interface SXJBase
public int pt_c(char[] var, char val)
pt_c
in interface SXJBase
public int pt_text(char[] text)
pt_text
in interface SXJBase
public int pt_leave()
pt_leave
in interface SXJBase
public long getCallbackHandle()
public void setThreadClassLoader()
public void resetThreadClassLoader()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |