|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.omnipilot.lassopro.LassoCall
The core of the Lasso Java API v8.0.
All the interaction between an LJAPI module and Lasso Professional is achieved
by a means of invoking various methods implemented in this class.
These functions can be used to perform the following tasks:
Most methods return the result code - either NOERR
if the function succeeds, or an error code indicating there was a problem during this method execution.
LassoDSModule
,
LassoTagModule
,
LassoErrors
Field Summary | |
protected int |
NOERR
|
Constructor Summary | |
protected |
LassoCall()
|
Method Summary | |
int |
acquireSem(java.lang.String named)
Acquires a previously created semaphore. |
int |
addColumnInfo(java.lang.String name,
int nullOK,
int type,
int protection)
Adds information about a particular column. Column information should be added in the order in which the columns occur in the database. |
int |
addColumnInfo2(java.lang.String name,
int nullOK,
int type,
int protection,
java.lang.String[] valueList)
Adds information, including valuelists, about a particular column. Column information should be added in the order in which the columns occur in the database. |
int |
addDataSourceResult(java.lang.String data)
Adds a datasource result value. |
int |
addResultHeader(java.lang.String header)
Appends the supplied data to the header. |
int |
addResultRow(byte[][] columns)
Another way to add the column binary data for the next result row. |
int |
addResultRow(java.lang.String[] columns)
Adds all the column data for the next result row. |
int |
arrayGetElement(LassoTypeRef array,
int index,
LassoTypeRef outElement)
Retrieves the specified element of the provided array instance. |
int |
arrayGetSize(LassoTypeRef array,
IntValue outLen)
Retrieves the size of the provided array instance. |
int |
arrayRemoveElement(LassoTypeRef array,
int index)
Removes the specified element from the provided array instance. |
int |
arraySetElement(LassoTypeRef array,
int index,
LassoTypeRef element)
Sets the specified element of the provided array instance. |
int |
childrenRun(LassoTypeRef outResult)
Execute the contents of a container tag. |
int |
createSem(java.lang.String named)
Creates a named semaphore object. |
int |
destroySem(java.lang.String named)
Destroys existing semaphore. |
int |
findInputColumn(java.lang.String named,
LassoValue outColumn)
Gets an individual input column by name. |
int |
findTag(java.lang.String named,
LassoTypeRef outTag,
boolean disableOnDemand)
Searches for a tag. |
int |
findTagParam(java.lang.String paramName,
LassoValue outParam)
Finds and fetches a tag param by name. |
int |
findTagParam2(java.lang.String paramName,
LassoTypeRef outType)
Retrieves a parameter that was passed to the LJAPI tag call. |
int |
formatBuffer(java.lang.String buffer,
LassoValue outResult)
Formats the supplied buffer and puts the resulting data in the data field of the LassoValue . |
java.lang.String |
fullyQualifyPath(java.lang.String relativePath)
Converts a relative path into a from-the-server-root path. |
boolean |
getAutoResolveFullPaths()
Retreives Lasso's current file resolution mode. |
java.lang.String |
getCookieValue(java.lang.String named)
Retrieves a cookie value set by the client. |
int |
getCookieValue(java.lang.String named,
LassoValue outValue)
Retrieves a cookie value set by the client. |
int |
getDataHost(LassoValue outHost,
LassoValue outUsernamePassword)
Returns the host that maintains the current database. |
int |
getDataHost(LassoValue outHost,
LassoValue outDefaultSchema,
LassoValue outUsernamePassword)
Returns the host that maintains the current database. |
int |
getDataHostID(IntValue outID)
Returns the host id (for internal use only). |
int |
getDataSourceModuleName(LassoValue outName)
Returns the name the current datasource module was registered with. |
int |
getDataSourceName(LassoValue outName,
IntValue outUseHostDefault,
LassoValue outUsernamePassword)
Gets the currently specified database name and associated data. |
java.lang.Object |
getDSConnection()
Returns the current datasource connection object, or null if no connection has been set yet. |
int |
getInputColumn(int index,
LassoValue outColumn)
Gets an individual input column by index. |
int |
getInputColumnCount(IntValue outCount)
Gets the number of input columns for this database action. |
static java.lang.String |
getInternalPath(java.lang.String platformPath)
Converts a platform-specific pathname into an internal pathname. |
int |
getIsStatementOnly()
Used to check for the -statementonly LDML inline param. |
int |
getLassoParam(int key,
LassoValue outParam)
Fetches an internal server-specific variable. |
int |
getLogicalOp(IntValue outOp)
Gets the logical operator for this database action. |
int |
getMaxRows(IntValue outRows)
The maximum number of rows in the found set to return. |
static java.lang.String |
getPlatformSpecificPath(java.lang.String internalPath)
Converts an internal pathname into a platform-specific pathname. |
int |
getPrimaryKeyColumn(LassoValue outColumn)
Gets the name and the value of the currently specified primary key column. |
int |
getPrimaryKeyColumn2(int index,
LassoValue outColumn)
Gets the name and the value of the indexed primary key column. |
int |
getRequestParam(int key,
LassoValue outParam)
Fetches a request-specific variable. |
int |
getResultHeader(LassoValue outHeader)
Allows access to the result (HTTP) header. |
int |
getReturnColumn(int index,
LassoValue outColumn)
Gets an individual return column by index. |
int |
getReturnColumnCount(IntValue outCount)
Gets the number of return columns for this action. |
int |
getRowID(IntValue outId)
Gets the currently specified record id (FileMaker-specific). |
int |
getSchemaName(LassoValue outName)
Gets the currently specified schema name. |
int |
getSiteID()
|
java.lang.String |
getSiteName()
|
int |
getSkipRows(IntValue outRows)
The number of rows that should be skipped in the found set. |
int |
getSortColumn(int index,
LassoValue outColumn)
Gets an individual sort column by index. |
int |
getSortColumnCount(IntValue outCount)
Gets the number of sort columns for this database action. |
int |
getTableName(LassoValue outName)
Gets the currently specified table name. |
int |
getTagEncoding(IntValue outMethod)
Deprecated. |
int |
getTagName(LassoValue outName)
Fetches the name of the tag that triggered this call. |
int |
getTagParam(int paramIndex,
LassoValue outParam)
Fetches the indicated parameter that was sent to the tag. |
int |
getTagParam2(int paramIndex,
LassoTypeRef outType)
Retrieves a parameter that was passed to the LJAPI tag call. |
int |
getTagParamCount(IntValue outCount)
Fetches the number of parameters that were passed to the tag. |
int |
getTagReturnValue(LassoTypeRef outValue)
Provides direct access to the LJAPI tag's return value. |
int |
getTagSelf(LassoTypeRef outSelf)
Returns the type instance that the current tag call was a member of. |
int |
getVariable(java.lang.String named,
int index,
LassoValue outValue)
Deprecated. |
int |
getVariable2(java.lang.String named,
LassoTypeRef outValue)
Provides access to a defined variable. |
int |
getVariableCount(java.lang.String named,
IntValue outCount)
Deprecated. |
static java.lang.String |
getVersion()
Returns LJAPI version string |
byte[] |
handleExternalConversion(LassoTypeRef inInstance,
java.lang.String inEncoding)
The basis of table-level automatic encoding and translation. |
int |
handleInternalConversion(byte[] inData,
java.lang.String inEncoding,
int inClosestLassoType,
LassoTypeRef outType)
Converts a single-byte or binary representation of a Lasso type BACK INTO an instance of that type |
int |
includeRaw(java.lang.String filePath,
LassoValue out)
Works just like the include tag. |
int |
isAdministrator()
Checks the current request for administrator privileges. |
int |
isAnonymous()
Checks the current request for the lowest privilege level. |
boolean |
isFullInternalPath(java.lang.String path)
Tests the given internal path to see if it is a full path from the filesystem root. |
int |
isLassoLite()
Returns NOERR if Lasso edition is LassoLite. |
boolean |
isValid()
Returns true if a native object instance this LassoCall refers to
has not been destroyed yet. |
java.lang.String |
internalToFullPlatformPath(java.lang.String relativeOrFullInternalPath)
Converts an internal path into a full platform specific path. |
static int |
log(int msgLevel,
java.lang.String message)
Log a message. |
int |
mapFindElement(LassoTypeRef map,
LassoTypeRef key,
LassoTypeRef outElement)
Searches for the specified key in the provided map instance. |
int |
mapGetElement(LassoTypeRef map,
int index,
LassoTypeRef outPair)
Retrieves the specified element of the provided map instance by index. |
int |
mapGetSize(LassoTypeRef map,
IntValue outLen)
Retrieves the size of the provided map instance. |
int |
mapRemoveElement(LassoTypeRef map,
LassoTypeRef key)
Removes the specified element from the map based on the provided key. |
int |
mapSetElement(LassoTypeRef map,
LassoTypeRef key,
LassoTypeRef value)
Sets the specified element of the provided map instance. |
int |
operationAllowed(int secureOperation,
java.lang.String internalPathname)
Tests for file access permissions. |
int |
outputTagBytes(byte[] data)
Output some data onto the page. |
int |
outputTagData(byte[] data)
Output some data onto the page. |
int |
outputTagData(java.lang.String data)
Deprecated. |
int |
pairGetFirst(LassoTypeRef pair,
LassoTypeRef outValue)
Retrieves the first member from the provided pair. |
int |
pairGetSecond(LassoTypeRef pair,
LassoTypeRef outValue)
Retrieves the second member from the provided pair. |
int |
pairSetFirst(LassoTypeRef pair,
LassoTypeRef first)
Sets the first member of the provided pair. |
int |
pairSetSecond(LassoTypeRef pair,
LassoTypeRef second)
Sets the second member of the provided pair. |
static int |
registerConstant(java.lang.String name,
LassoTypeRef val)
Register a constant value. |
static int |
registerConstant2(java.lang.String namespaceName,
java.lang.String name,
LassoTypeRef val)
Register a constant value. |
int |
releaseSem(java.lang.String named)
Releases previously aquired semaphore. |
int |
removeVariable(java.lang.String named,
int index)
Deprecated. |
java.lang.String |
resolveIncludePath(java.lang.String partialPath)
Converts a partial path into a full, from the file system root, internal path which is guaranteed to be within the web root. |
java.lang.String |
resolvePath(java.lang.String partialPath)
Converts a partial path into a full, from the file system root, internal path. |
int |
returnTagValue(boolean value)
Return a boolean value from the current LJAPI tag call. |
int |
returnTagValue(byte[] value)
Return binary data from the current LJAPI tag call. |
int |
returnTagValue(double value)
Return a decimal value from the current LJAPI tag call. |
int |
returnTagValue(LassoTypeRef value)
Specifies the return value of the current LJAPI tag call. |
int |
returnTagValue(long value)
Return an integer value from the current LJAPI tag call. |
int |
returnTagValue(java.lang.String value)
Return a string value from the current LJAPI tag call. |
static int |
runRequest(java.lang.String className,
java.lang.String methodName,
int tagAction,
int unused)
Creates and runs a new LJAPI call on the given Java module method. |
int |
setActionStatement(java.lang.String statement)
Called to set the statement for the current action. |
int |
setAutoResolveFullPaths(boolean to)
Toggles how Lasso resolves file paths. |
int |
setDSConnection(java.lang.Object inConnection)
Called to set the current connection object for the datasource. |
int |
setNumRowsFound(int numRows)
Sets the number of rows found in the query. |
int |
setResultCode(int err)
Sets the result code that can be displayed. |
int |
setResultHeader(java.lang.String header)
Sets the result (HTTP) header. |
int |
setResultMessage(java.lang.String msg)
Sets the result message string |
int |
setRowID(int id)
Sets the currently specified record id (FileMaker-specific). |
int |
setVariable(java.lang.String named,
java.lang.String value,
int index)
Deprecated. |
int |
setVariable2(java.lang.String named,
LassoTypeRef value)
Sets the specified variable's value. |
int |
storeGetData(java.lang.String key,
LassoValue outValue)
Fetches data that has been stored. |
int |
storeHasData(java.lang.String key,
IntValue outLength)
Returns NOERR if the data, specified by key, exists. |
int |
storePutData(java.lang.String key,
byte[] data)
Adds the data to Lasso's storage. |
int |
storePutData(java.lang.String key,
java.lang.String data)
Adds the data to Lasso's storage. |
int |
switchToUser(java.lang.String username,
java.lang.String password)
Switches the current request to the given user. |
int |
tagGetExpectedParam(LassoTypeRef inTagType,
int index,
LassoValue outResult,
IntValue outRequired)
Provides access to indexed tag parameter |
int |
tagGetExpectedParamCount(LassoTypeRef inTagType,
IntValue outCount)
Provides access to tag parameters as specified by the -required/-optional keywords. |
int |
tagGetReturnType(LassoTypeRef inTagType,
LassoValue outResult)
Provides access to tag parameters as specified by the -returntype keyword |
int |
tagParamIsDefined(java.lang.String paramName)
Returns NOERR if the parameter was defined, anything else means it wasn't. |
int |
tagSetReturnType(LassoTypeRef inTagType,
java.lang.String typeName)
Provides access to tag parameters as specified by the -returntype keywords |
int |
typeAddMember(LassoTypeRef toType,
java.lang.String named,
LassoTypeRef member)
Adds a member to a type instance. |
int |
typeAddMemberTag(java.lang.String className,
java.lang.String methodName,
LassoTypeRef toType,
java.lang.String tagName)
Adds a member tag to a type instance. |
int |
typeAlloc(java.lang.String typeName,
LassoTypeRef[] params,
LassoTypeRef outType)
Allocates a new type instance. |
int |
typeAllocArray(LassoTypeRef outArray,
LassoTypeRef[] inElements)
Allocates a new instance of type array. |
int |
typeAllocBoolean(LassoTypeRef outBool,
boolean value)
Allocates a new instance of type boolean. |
int |
typeAllocCustom(LassoTypeRef outCustom,
java.lang.String typeName)
Allocates a custom type within a type initializer. |
int |
typeAllocDecimal(LassoTypeRef outDecimal,
double value)
Allocates a new instance of type decimal. |
int |
typeAllocDecimal(LassoTypeRef outDecimal,
double value,
int precision)
Allocates a new instance of type decimal with the given precision. |
int |
typeAllocFromProto(LassoTypeRef inProto,
LassoTypeRef outType)
Allocate a new type instance based on the given type instance. |
int |
typeAllocInteger(LassoTypeRef outInteger,
long value)
Allocates a new instance of type integer. |
int |
typeAllocMap(LassoTypeRef outMap,
LassoTypeRef[] inElements)
Allocates a new instance of type map. |
int |
typeAllocMap(LassoTypeRef outMap,
LassoTypeRef[] inKeys,
LassoTypeRef[] inValues)
Allocates a new instance of type map. |
int |
typeAllocNull(LassoTypeRef outNull)
Allocates a new instance of type null. |
int |
typeAllocOneOff(java.lang.String inName,
java.lang.String inParentTypeName,
LassoTypeRef outType)
Allocate a new type with the given name. |
int |
typeAllocPair(LassoTypeRef outPair,
LassoTypeRef inFirst,
LassoTypeRef inSecond)
Allocates a new instance of type pair. |
int |
typeAllocReference(LassoTypeRef outRef,
LassoTypeRef referenced)
Allocates a new hard reference to a type instance. |
int |
typeAllocString(LassoTypeRef outString,
byte[] value)
Allocates a new instance of type string. |
int |
typeAllocString(LassoTypeRef outString,
java.lang.String value)
Allocates a new instance of type string. |
int |
typeAllocStringConv(LassoTypeRef outString,
java.lang.String value,
java.lang.String conv)
Allocates a new instance of type string from a Java string using specified encoding. |
int |
typeAllocTag(LassoTypeRef outTag,
java.lang.String className,
java.lang.String methodName)
Allocates a new instance of type tag. |
int |
typeAllocTagFromSource(LassoTypeRef outTag,
java.lang.String source)
Allocates a new instance of type tag from the given source text. |
int |
typeAppendString(LassoTypeRef type,
java.lang.String value)
Appends additional data to the string instance. |
int |
typeAssign(LassoTypeRef left_hand_side,
LassoTypeRef right_hand_side)
typeAssign performs an assignment of one type to another. |
int |
typeClearFlag(LassoTypeRef type,
int flag)
Removes the flag for the given type instance. |
int |
typeCollect(LassoTypeRef inType)
Remove the LJAPI call's reference to a type instance. |
int |
typeDetach(LassoTypeRef toDetach)
Prevents the type from being destroyed once the LJAPI call returns. |
int |
typeFree(LassoTypeRef inType)
Subtract 1 from an instance's reference count. |
int |
typeFreeCustomJavaObject(LassoTypeRef type)
Releases the Java object previously attached to a custom type. |
int |
typeGetBoolean(LassoTypeRef type,
IntValue outValue)
Retrieves the boolean value from a type instance. |
byte[] |
typeGetBytes(LassoTypeRef type)
Retrieves data from a type instance as an array of bytes. |
int |
typeGetChild(LassoTypeRef from,
LassoTypeRef outChild)
Retrieves the child of the provided instance. |
java.lang.Object |
typeGetCustomJavaObject(LassoTypeRef type)
Retrieves the Java object previously attached to a custom type. |
int |
typeGetDecimal(LassoTypeRef type,
DecimalValue outValue)
Retrieves the decimal value from a type instance. |
int |
typeGetInteger(LassoTypeRef type,
IntValue outValue)
Retrieves the integer value from a type instance. |
int |
typeGetMember(LassoTypeRef fromType,
java.lang.String named,
LassoTypeRef outMember)
Retrieves a member from a type instance. |
int |
typeGetName(LassoTypeRef target,
LassoValue outName)
Returns the name of the target type. |
int |
typeGetParent(LassoTypeRef from,
LassoTypeRef outParent)
Retrieves the parent of the provided type instance. |
int |
typeGetProperties(LassoTypeRef targetType,
LassoTypeRef outPair)
This method has two uses. |
int |
typeGetString(LassoTypeRef type,
LassoValue outValue)
Retrieves character data from a type instance. |
int |
typeHasFlag(LassoTypeRef type,
int flag)
Tests the flag for the given type instance. |
int |
typeInheritFrom(LassoTypeRef inChild,
LassoTypeRef inNewParent)
Change the inheritence structure of a type. |
int |
typeIsA(LassoTypeRef target,
LassoTypeRef type)
Tests to see if a type is an instance of another type. |
int |
typeIsA(LassoTypeRef target,
java.lang.String typeName)
Tests to see if a type is an instance of another type. |
int |
typename(LassoTypeRef target,
LassoValue outName)
Retrieves the name of the target type. |
int |
typeRefer(LassoTypeRef toRefer)
Add 1 to an instance's reference count. |
int |
typeRunTag(LassoTypeRef tagType,
java.lang.String named,
LassoTypeRef[] params,
LassoTypeRef returnValue,
LassoTypeRef optionalTarget)
Execute a given tag. |
int |
typeRunTag(LassoTypeRef tagType,
java.lang.String named,
LassoTypeRef param,
LassoTypeRef returnValue,
LassoTypeRef optionalTarget)
Used to execute a given tag. |
int |
typeSetBoolean(LassoTypeRef type,
boolean value)
Sets the boolean value of a type instance, converting the type if necessary. |
int |
typeSetBytes(LassoTypeRef type,
byte[] value)
Converts the type instance into a string and sets the value. |
int |
typeSetCustomJavaObject(LassoTypeRef type,
java.lang.Object object)
typeSetCustomJavaObject permits attachment of Java objects to custom types. |
int |
typeSetDecimal(LassoTypeRef type,
double value)
Sets the decimal value of a type instance, converting the type if necessary. |
int |
typeSetDecimal(LassoTypeRef type,
double value,
int precision)
Sets the decimal value of a type instance, converting the type if necessary. |
int |
typeSetFlag(LassoTypeRef type,
int flag)
Sets the flag for the given type instance. |
int |
typeSetInteger(LassoTypeRef type,
long value)
Sets the integer value of a type instance, converting the type if necessary. |
int |
typeSetString(LassoTypeRef type,
java.lang.String value)
Converts the type instance into a string and sets the value. |
int |
typeSetStringConv(LassoTypeRef type,
byte[] value,
java.lang.String conv)
Converts the type instance using the specified source data and conversion method. |
int |
typeStealValue(LassoTypeRef inThief,
LassoTypeRef inVictim)
This function transfers the data from one type to another type. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int NOERR
Constructor Detail |
protected LassoCall()
Method Detail |
public boolean isValid()
true
if a native object instance this LassoCall refers to
has not been destroyed yet. Always evaluates to false
when called
outside the scope of the current call.
public static java.lang.String getVersion()
public static int registerConstant(java.lang.String name, LassoTypeRef val)
name
- the name for the constantval
- the value for the constantpublic static int registerConstant2(java.lang.String namespaceName, java.lang.String name, LassoTypeRef val)
namespaceName
- the namespace for the constantname
- the name for the constantval
- the value for the constantpublic int getRequestParam(int key, LassoValue outParam)
key
- one of the RequestParams
constants identifying the request variable to retrieve.outParam
- the resulting data for the requested variable. Some request variables require additional input data, which is submitted in this parameterRequestParams
public int getLassoParam(int key, LassoValue outParam)
key
- one of the LassoParams
constants identifying the server variable to retrieveoutParam
- the resulting value for the server variable.LassoParams
public int isLassoLite()
NOERR
if Lasso edition is LassoLite.
public int setResultCode(int err)
err
- the result codepublic int setResultMessage(java.lang.String msg)
public int getTagName(LassoValue outName)
[my_tag: ...]
the resulting value would be "my_tag"
outName
- The resulting tag name which will be placed in the name
field of the LassoValue
object.public int getTagParamCount(IntValue outCount)
outCount
- an object in which to store the result.public int getTagParam(int paramIndex, LassoValue outParam)
name
field, and the value in the data
.
If the parameter was provided without a keyword, the name
portion of the struct will be null
.
All parameters values will be converted to string, regardless of the original type
paramIndex
- the zero-based index of the desired parameteroutParam
- the resulting parameter datapublic int tagParamIsDefined(java.lang.String paramName)
NOERR
if the parameter was defined, anything else means it wasn't.
Only parameters specified with a keyword should be searched for.
paramName
- rhe name of the keyworded parameter to search for.public int findTagParam(java.lang.String paramName, LassoValue outParam)
NOERR
means the param was found.
The parameter that was passed to the LJAPI tag call must have been specified by keyword.
The keyword will be placed in the name
field of the LassoValue
object, and the value - in the data
portion.
If only a keyword was provided, the data
field will be null
.
paramName
- the keyword of the desired parameter.outParam
- the resulting parameter value.public int getTagEncoding(IntValue outMethod)
public int outputTagData(java.lang.String data)
public int outputTagData(byte[] data)
public int outputTagBytes(byte[] data)
returnTagValueBytes
.
public int getResultHeader(LassoValue outHeader)
outHeader
- on return, contains the header data in the name
fieldpublic int setResultHeader(java.lang.String header)
header
- the header data to usepublic int addResultHeader(java.lang.String header)
header
- the header data to usepublic int getCookieValue(java.lang.String named, LassoValue outValue)
named
- the name of the cookie to look foroutValue
- the resulting cookie value which will be placed in the name
portion of the struct.public java.lang.String getCookieValue(java.lang.String named)
named
- the name of the cookie to look for
null
if cookie wasn't foundpublic int getVariableCount(java.lang.String named, IntValue outCount)
public int getVariable(java.lang.String named, int index, LassoValue outValue)
public int setVariable(java.lang.String named, java.lang.String value, int index)
public int removeVariable(java.lang.String named, int index)
public int addDataSourceResult(java.lang.String data)
getInputColumn
& findInputColumn
can be used by tags to get input form params.
data
- the data to add. (TBD: Data must be in ISO8859-1 encoding.)public int getDataSourceName(LassoValue outName, IntValue outUseHostDefault, LassoValue outUsernamePassword)
outName
- on return, contains the database name stored in the data
field.outUseHostDefault
- the setting which specifies whether the hosts username/password combo should be used in the absence of a database specific combooutUsernamePassword
- user name and password to be used for logging in to the datasource host.public int getTableName(LassoValue outName)
outName
- on return, contains the table name stored in the name
field.public int getSchemaName(LassoValue outName)
outName
- on return, contains the schema name stored in the name
field.public int getDataHost(LassoValue outHost, LassoValue outUsernamePassword)
outHost
- the host address and port number strings are returned in the name
and data
fields, respectivelyoutUsernamePassword
- host default username and password, if anypublic int getDataHost(LassoValue outHost, LassoValue outDefaultSchema, LassoValue outUsernamePassword)
public int getDataHostID(IntValue outID)
public int getSkipRows(IntValue outRows)
-skiprecords
LDML parameter reference for more info.
public int getMaxRows(IntValue outRows)
-skiprecords
LDML parameter reference for more info.
public int getRowID(IntValue outId)
-keyvalue
LDML parameter reference for more info.
outId
- the resulting numeric -keyvalue
param valuepublic int setRowID(int id)
id
- the numeric row id.public int getPrimaryKeyColumn(LassoValue outColumn)
outColumn
- on return, contains the resulting key name and value.public int getPrimaryKeyColumn2(int index, LassoValue outColumn)
index
- the zero-based column indexoutColumn
- on return, contains the resulting key name and valuepublic int getInputColumnCount(IntValue outCount)
public int getSortColumnCount(IntValue outCount)
public int getInputColumn(int index, LassoValue outColumn)
index
- the zero-based index of the column to retrieve.public int getSortColumn(int index, LassoValue outColumn)
index
- the zero-based index of the sort column to retrieve
null
on errorpublic int findInputColumn(java.lang.String named, LassoValue outColumn)
named
- the name of the input column to retrievepublic int getLogicalOp(IntValue outOp)
outOp
- on return, one of the LassoOperators
constantspublic int getReturnColumnCount(IntValue outCount)
outCount
- on return, contains the resulting number of return columnspublic int getReturnColumn(int index, LassoValue outColumn)
index
- the zero-based index of the return column to retrieveoutColumn
- on return, contains the resulting column name and valuepublic int addColumnInfo(java.lang.String name, int nullOK, int type, int protection)
name
- the column namenullOK
- does the column type allows null values?type
- column type: TYPE_CHAR, TYPE_INT, TYPE_BOOLEAN, TYPE_DECIMAL, TYPE_DATETIME or TYPE_BLOBprotection
- is column value read only? Should be either PROTECTION_NONE or PROTECTION_READ_ONLYLassoValue
,
LassoDSModule
public int addColumnInfo2(java.lang.String name, int nullOK, int type, int protection, java.lang.String[] valueList)
name
- the column namenullOK
- is a null value for this column ok?type
- one of the data types defined in LassoDSModule
protection
- the code for the column's protection: either PROTECTION_NONE or PROTECTION_READ_ONLYvalueList
- an array of strings for the column's valuelist.public int addResultRow(java.lang.String[] columns)
columns
- an array of column valuespublic int addResultRow(byte[][] columns)
String data[] = { "apples", "oranges", "pears", "cherries" }; int count = data.length; byte cols[][] = new byte[count][]; for ( i = 0; i < count; i++ ) cols[i] = data[i].getBytes(); lasso.addResultRow( cols );
public int setNumRowsFound(int numRows)
addResultRow
call.
as the skip recs and max recs parameters effect that number.
public int getDataSourceModuleName(LassoValue outName)
outName
- on return, contains the datasource module name in the name
field.public java.lang.Object getDSConnection()
null
if no connection has been set yet.
public int setDSConnection(java.lang.Object inConnection)
ACTION_CLOSE
message if there is already a valid db connection.
Once set, the connection could be retrieved from a nested LDML "inline" call.
inConnection
- an object representing valid datasource connection.public int setActionStatement(java.lang.String statement)
action_statement
LDML tag.
statement
- the action statement valuepublic int getIsStatementOnly()
-statementonly
LDML inline param.
NOERR
if -statementonly
keyword is presentpublic int acquireSem(java.lang.String named)
public int createSem(java.lang.String named)
acquireSem
public int destroySem(java.lang.String named)
acquireSem
public int releaseSem(java.lang.String named)
acquireSem
public int formatBuffer(java.lang.String buffer, LassoValue outResult)
data
field of the LassoValue
.
The buffer should consist of plain text and bracketed Lasso tags.
buffer
- the buffer holding the script dataoutResult
- on return, contains the resulting valuepublic int includeRaw(java.lang.String filePath, LassoValue out)
public int storeHasData(java.lang.String key, IntValue outLength)
NOERR
if the data, specified by key, exists.
The length of the stored data can be returned in the length parameter.
This parameter may be null
if the length is not required.
public int storePutData(java.lang.String key, java.lang.String data)
key
is the unique identifier for the data.
public int storePutData(java.lang.String key, byte[] data)
key
is the unique identifier for the data.
public int storeGetData(java.lang.String key, LassoValue outValue)
data
field of the LassoValue
object.
key
- the unique identifier for the data.public int isAdministrator()
NOERR
is the current user has administrator priveleges.
This is useful for doing administrative activities or file accesses which only the admin should be able to do.
public int isAnonymous()
NOERR
if the current user is the anonymous user.
public int switchToUser(java.lang.String username, java.lang.String password)
public int operationAllowed(int secureOperation, java.lang.String internalPathname)
NOERR
is the given operation is permitted by Lasso security.
secureOperation
- one of the constants defined in LassoSecureOperations
classinternalPathname
- full path to the file using the internal pathname formatpublic static java.lang.String getPlatformSpecificPath(java.lang.String internalPath)
internalPath
- the internal pathname.
public static java.lang.String getInternalPath(java.lang.String platformPath)
platformPath
- the platform-specific path name
public java.lang.String fullyQualifyPath(java.lang.String relativePath)
relativePath
- the relative path
public java.lang.String resolvePath(java.lang.String partialPath)
partialPath
- the path to resolve
public java.lang.String resolveIncludePath(java.lang.String partialPath)
partialPath
- the path to resolve. Must name an item within the web-root or a blank string is returned
public java.lang.String internalToFullPlatformPath(java.lang.String relativeOrFullInternalPath)
relativeOrFullInternalPath
- The input path to convert
public boolean isFullInternalPath(java.lang.String path)
path
- the path to test
true
if the given internal path is a full path from the filesystem rootpublic int setAutoResolveFullPaths(boolean to)
/blah/file.lasso
) through the webserver (the default behavior: true
)
OR
whether Lasso will resolve "/" through the server and then prepend that to the given file path (false
).
The default behavior can conflict with some usages of mod_rewrite.
As of LP7, this setting is global.
to
- the togglepublic boolean getAutoResolveFullPaths()
true
if Lasso will resolve the given file path through the webserversetAutoResolveFullPaths
public int typeAlloc(java.lang.String typeName, LassoTypeRef[] params, LassoTypeRef outType)
typeName
- the name of the type to instantiateparams
- an array of parameters to pass to the type initializer. Could be null
outType
- a storage for the newly instantiated typepublic int typeAllocCustom(LassoTypeRef outCustom, java.lang.String typeName)
typeAddMember
.
The new type should be the return value of the tag call, set via returnTagValue
.
Any inherited members will be added to the type after the LJAPI call returns.
Warning: Do not call this unless you are in a type initializer. If you are not in a type initializer, the result will be a type that will never be fully initialized.
outCustom
- the resulting newly allocated custom typetypeName
- the new type's name.public int typeAllocFromProto(LassoTypeRef inProto, LassoTypeRef outType)
inProto
- the original type instance whose tag members will be referencedoutType
- the resulting new type instancepublic int typeAllocOneOff(java.lang.String inName, java.lang.String inParentTypeName, LassoTypeRef outType)
null
or empty string is passed in), type "null" will be the default.
If a parent type is provided, it must have been a validly registered type initializer.
OnCreate member tag will be called for the parent and any of its parents, but will not be called for the new type instance itself.
inName
- the name for the new type instanceinParentTypeName
- the name of the parent typeoutType
- the new type instance, or null
on errorpublic int typeRefer(LassoTypeRef toRefer)
typeFree
.
When a type instance's reference count reaches zero, the instance is destroyed.
public int typeFree(LassoTypeRef inType)
LassoTypeRef
is no longer valid.
The LassoCall
token may be null
if it is not available for any reason.
Warning: ONLY call this if you have previously called typeRefer
using the same type instance or the result may be a double free.
inType
- the type instance which should be unreferred topublic int typeCollect(LassoTypeRef inType)
typeRefer
.
inType
- the type instance to operate onpublic int typeAllocNull(LassoTypeRef outNull)
outNull
- The resulting new type instance.public int typeAllocString(LassoTypeRef outString, java.lang.String value)
outString
- the resulting new type instancevalue
- The string data from which to copy for the new string instancepublic int typeAllocString(LassoTypeRef outString, byte[] value)
public int typeAllocStringConv(LassoTypeRef outString, java.lang.String value, java.lang.String conv)
outString
- the resulting new type instancevalue
- the source data from which to copy for the new string instanceconv
- The encoding of the source datapublic int typeAllocInteger(LassoTypeRef outInteger, long value)
outInteger
- the resulting new type instancevalue
- the integer value which the new type instance will holdpublic int typeAllocDecimal(LassoTypeRef outDecimal, double value)
outDecimal
- the resulting new type instancevalue
- the double value which the new type instance will holdpublic int typeAllocDecimal(LassoTypeRef outDecimal, double value, int precision)
outDecimal
- the resulting new type instancevalue
- the double value which the new type instance will holdprecision
- the decimal precision that the new type instance will output topublic int typeAllocPair(LassoTypeRef outPair, LassoTypeRef inFirst, LassoTypeRef inSecond)
outPair
- the resulting new type instanceinFirst
- the instance to use for the first member of the pair. A reference to the instance will be made.inSecond
- the instance to use for the second member of the pair. A reference to the instance will be made.public int typeAllocReference(LassoTypeRef outRef, LassoTypeRef referenced)
outRef
- the resulting new type instancereferenced
- the instance to be referencedpublic int typeAllocTag(LassoTypeRef outTag, java.lang.String className, java.lang.String methodName)
className
and methodName
parameters
should have the same signature as TAG_METHOD_PROTOTYPE
.
outTag
- the resulting new type instanceclassName
- the name of the java class implementing your modulemethodName
- the name of a java method which will be called when the tag is usedpublic int typeAllocTagFromSource(LassoTypeRef outTag, java.lang.String source)
outTag
- the resulting new type instancesource
- the source text which will be compiled to become the body of the tagpublic int typeAllocArray(LassoTypeRef outArray, LassoTypeRef[] inElements)
outArray
- the resulting new type instanceinElements
- an array of LassoTypeRef
's which will become the elements of the array (each item will be referenced). Can be nullpublic int typeAllocMap(LassoTypeRef outMap, LassoTypeRef[] inElements)
outMap
- the resulting new type instanceinElements
- an array of LassoTypeRef
's which will become the elements of the map. Each even numbered item will be treated as the key for following elementpublic int typeAllocMap(LassoTypeRef outMap, LassoTypeRef[] inKeys, LassoTypeRef[] inValues)
typeAllocMap
,
only the map keys and values are passed as separate parameters.
outMap
- the resulting new type instanceinKeys
- an array of LassoTypeRef
's which will become the map keyspublic int typeAllocBoolean(LassoTypeRef outBool, boolean value)
outBool
- the resulting new type instancevalue
- the boolean value which the new type instance will holdpublic int typeStealValue(LassoTypeRef inThief, LassoTypeRef inVictim)
public byte[] handleExternalConversion(LassoTypeRef inInstance, java.lang.String inEncoding)
public int handleInternalConversion(byte[] inData, java.lang.String inEncoding, int inClosestLassoType, LassoTypeRef outType)
inClosestLassoType
- desired Lasso type. pass one of the TYPE_XXX constants defined in LassoValue
outType
- resulting Lasso type intancepublic int typeGetString(LassoTypeRef type, LassoValue outValue)
type
- the type instance from which to retrieve the character dataoutValue
- on return, the data will be stored in the name
field of the LassoValue
public byte[] typeGetBytes(LassoTypeRef type)
type
- the type instance from which to retrieve the byte data
public int typeGetInteger(LassoTypeRef type, IntValue outValue)
type
- the type instance from which to retieve the integer valueoutValue
- on return, contains the resulting 64-bit integer valuepublic int typeGetDecimal(LassoTypeRef type, DecimalValue outValue)
type
- the type instance from which to retieve the decimal valueoutValue
- on return, the resulting double valuepublic int typeGetBoolean(LassoTypeRef type, IntValue outValue)
type
- the type instance from which to retieve the boolean value.public int typeSetString(LassoTypeRef type, java.lang.String value)
type
- the type instance to setvalue
- the source string datapublic int typeSetBytes(LassoTypeRef type, byte[] value)
type
- the type instance to setvalue
- the datapublic int typeSetStringConv(LassoTypeRef type, byte[] value, java.lang.String conv)
type
- the type instance to be convertedvalue
- the source data to be used for the conversionconv
- the conversion method to use when transforming type instancepublic int typeAppendString(LassoTypeRef type, java.lang.String value)
type
- the type instance which will be appended tovalue
- the source data to appendpublic int typeSetInteger(LassoTypeRef type, long value)
type
- the type instance which will be set to the provided integervalue
- the integer value to usepublic int typeSetDecimal(LassoTypeRef type, double value)
type
- the type instance which will be set to the provided doublevalue
- the double value to usepublic int typeSetDecimal(LassoTypeRef type, double value, int precision)
type
- the type instance which will be set to the provided integervalue
- the double value to useprecision
- the decimal precision which the decimal instance will output topublic int typeSetBoolean(LassoTypeRef type, boolean value)
type
- the type instance which will be set to the provided booleanvalue
- the boolean value to use.public int arrayGetSize(LassoTypeRef array, IntValue outLen)
array
- the array instanceoutLen
- on return, contains the resulting sizepublic int arrayGetElement(LassoTypeRef array, int index, LassoTypeRef outElement)
array
- the array instanceindex
- the zero-based index at which to retreive the elementoutElement
- the resulting elementpublic int arraySetElement(LassoTypeRef array, int index, LassoTypeRef element)
array
- the array instanceindex
- the zero-based index at which to set the elementelement
- the type instance which will be placed at the specified index. The instance will be referencedpublic int arrayRemoveElement(LassoTypeRef array, int index)
array
- the array instanceindex
- the zero based index at which to removepublic int mapGetSize(LassoTypeRef map, IntValue outLen)
map
- the map instanceoutLen
- on return, contains the resulting map sizepublic int mapFindElement(LassoTypeRef map, LassoTypeRef key, LassoTypeRef outElement)
map
- the map instancekey
- the key to search for within the mapoutElement
- on return, the found map elementpublic int mapGetElement(LassoTypeRef map, int index, LassoTypeRef outPair)
map
- the map instanceindex
- the zero based index at which to retreiveoutPair
- the pointer in which to store the result. The result will be a pair whose first member is the key and second member is the associated elementpublic int mapSetElement(LassoTypeRef map, LassoTypeRef key, LassoTypeRef value)
key
,
the element will be added to the map, otherwise the old element will be replaced by a new value
.
map
- the map instancekey
- the instance of the key which will be setvalue
- the value of the element to associate with the provided keypublic int mapRemoveElement(LassoTypeRef map, LassoTypeRef key)
map
- the map instancekey
- the key to be removedpublic int pairGetFirst(LassoTypeRef pair, LassoTypeRef outValue)
pair
- the pair instanceoutValue
- on return, the resulting type instancepublic int pairGetSecond(LassoTypeRef pair, LassoTypeRef outValue)
pair
- the pair instance
null
on errorpublic int pairSetFirst(LassoTypeRef pair, LassoTypeRef first)
pair
- the pair instancefirst
- the instance to use as the first member. The instance will be referencedpublic int pairSetSecond(LassoTypeRef pair, LassoTypeRef second)
pair
- the pair instancesecond
- the instance to use as the second member. The instance will be referencedpublic int typeGetProperties(LassoTypeRef targetType, LassoTypeRef outPair)
targetType
parameter is not null
,
it is used to get all the data and tag members from a given type.
They are returned as an array of pairs in the outPair
value.
The first element of each pair is the map of data members for the type. The second element is the map of tag members.
Each element in the array represents the members of each type inherited by the targetType
.
If the targetType
parameter is null
, typeGetProperties
will return an array containing the variable maps for the currently active request.
public int typeInheritFrom(LassoTypeRef inChild, LassoTypeRef inNewParent)
inChild
- the child instance which will have its inheritance changedinNewParent
- the new parent for the childpublic int typeGetParent(LassoTypeRef from, LassoTypeRef outParent)
from
- the child instance from which to retrieve the parentoutParent
- on return, the type parentpublic int typeGetChild(LassoTypeRef from, LassoTypeRef outChild)
from
- the parent instance from which to retrieve the childoutChild
- on return, the resulting child typepublic int typeAddMember(LassoTypeRef toType, java.lang.String named, LassoTypeRef member)
toType
- the type instance to which the new member will be addednamed
- the name for the new membermember
- the new member to addpublic int typeGetMember(LassoTypeRef fromType, java.lang.String named, LassoTypeRef outMember)
fromType
- the type instance in which to searchnamed
- the name of the member to look foroutMember
- on return, the found memberpublic int typeAddMemberTag(java.lang.String className, java.lang.String methodName, LassoTypeRef toType, java.lang.String tagName)
public int typeSetFlag(LassoTypeRef type, int flag)
type
- the type instance on which to set the flagflag
- the flag to setpublic int typeHasFlag(LassoTypeRef type, int flag)
true
if the flag is set for that type instance.
type
- the type instance to be testedflag
- the flag to test forpublic int typeClearFlag(LassoTypeRef type, int flag)
type
- the type instanceflag
- the flag to remove from the type instancepublic int typename(LassoTypeRef target, LassoValue outName)
target
type.
public int getTagSelf(LassoTypeRef outSelf)
outSelf
- on return, the resulting type instancepublic int typeGetName(LassoTypeRef target, LassoValue outName)
target
- the type instance to get the name ofoutName
- the resulting name which will be stored in the name
portion of the LassoValue
public int typeIsA(LassoTypeRef target, java.lang.String typeName)
target
- the target instance to testtypeName
- the type code to test forpublic int typeIsA(LassoTypeRef target, LassoTypeRef type)
target
- the target instance to testtype
- the type name to test forpublic int returnTagValue(LassoTypeRef value)
value
- the value to returnpublic int returnTagValue(boolean value)
value
- the boolean value to returnpublic int returnTagValue(long value)
value
- the integer value to returnpublic int returnTagValue(java.lang.String value)
value
- the string data to be returnedpublic int returnTagValue(double value)
value
- the double value to returnpublic int returnTagValue(byte[] value)
public int getTagReturnValue(LassoTypeRef outValue)
returnTagValue
.
The resulting type instance will start out as type null
.
outValue
- the resulting return value type instancepublic int typeRunTag(LassoTypeRef tagType, java.lang.String named, LassoTypeRef[] params, LassoTypeRef returnValue, LassoTypeRef optionalTarget)
null
.
tagType
- the tag instance to be executednamed
- the name for the tagparams
- the array of parameters for the tag. May be null
returnValue
- on return, contains the resulting value.optionalTarget
- the target instance for a member tag call. May be null
if the tag is not a member tagpublic int typeRunTag(LassoTypeRef tagType, java.lang.String named, LassoTypeRef param, LassoTypeRef returnValue, LassoTypeRef optionalTarget)
typeRunTag
, except that is accepts a single LassoTypeRef
parameter instead of an array, returning the resulting type instance.
tagType
- must be a valid instance of an executable tag of type LASSO_TAG
named
- optionally sets the tag name at the time of execution. Could be null
param
- Optional. Single tag parameter. Could be null
.returnValue
- the result of this tag executionoptionalTarget
- would be used in a member tag call. Otherwise it should be null
public int findTag(java.lang.String named, LassoTypeRef outTag, boolean disableOnDemand)
ERR_NOERR
if the tag is found.
The final parameter can be used to disable searching for the tag in any on-demand libraries.
named
- the tag name to search foroutTag
- the resulting tag, if founddisableOnDemand
- used to disable the searching of on-demand librariespublic int getVariable2(java.lang.String named, LassoTypeRef outValue)
named
- the name of the variable to accessoutValue
- the resulting variable valuepublic int setVariable2(java.lang.String named, LassoTypeRef value)
named
- the name of the variable to setvalue
- the value to setpublic int getTagParam2(int paramIndex, LassoTypeRef outType)
paramIndex
- the zero based index of the desired parameteroutType
- the resulting parameter valuepublic int findTagParam2(java.lang.String paramName, LassoTypeRef outType)
paramName
- the keyword of the desired parameteroutType
- the resulting parameter valuepublic int childrenRun(LassoTypeRef outResult)
outResult
- the resulting datapublic int tagGetReturnType(LassoTypeRef inTagType, LassoValue outResult)
public int tagSetReturnType(LassoTypeRef inTagType, java.lang.String typeName)
public int tagGetExpectedParamCount(LassoTypeRef inTagType, IntValue outCount)
public int tagGetExpectedParam(LassoTypeRef inTagType, int index, LassoValue outResult, IntValue outRequired)
public int typeSetCustomJavaObject(LassoTypeRef type, java.lang.Object object)
typeSetCustomJavaObject
permits attachment of Java objects to custom types.
Java object is retained until the typeFreeCustomJavaObject
is called, or the
type is destroyed. One of the most common uses of this feature is to attach the
LassoTagModule
instance to a custom LDML type created by that module.
In this case, Lasso will attempt to reuse the Java object and invoke member methods on the
attached module instead of creating new module instance for each corresponding call.
As an added bonus, module methods will always be executed in the current "context".
So, instead of:
Note: if the attached object class implementsLassoTypeRef type = new LassoTypeRef(); lasso.getTagSelf(type); Object obj = lasso.typeGetCustomJavaObject(type); obj.counter++;
one could simply write:this.counter++;
Cloneable
interface, an attempt will be made to invoke its clone
method during assignment
operation if OnAssign
member is not implemented by the module.
public java.lang.Object typeGetCustomJavaObject(LassoTypeRef type)
null
if no object has been associated with this custom type instance.
public int typeFreeCustomJavaObject(LassoTypeRef type)
public int typeAssign(LassoTypeRef left_hand_side, LassoTypeRef right_hand_side)
typeAssign
performs an assignment of one type to another.
The result will be the same as if the following had been executed in LDML:
#left_hand_side = #right_hand_side
public int typeDetach(LassoTypeRef toDetach)
typeFree
or a memory leak will occur.
public static int runRequest(java.lang.String className, java.lang.String methodName, int tagAction, int unused)
methodName
will be run within that threads context.
If there is no currently active request on the current thread, a new request will be created and run based off the global context.
className
- name of the java class implementing the methodmethodName
- java method. Must have the same signature as TAG_METHOD_PROTOTYPE
tagAction
- this parameter will be passed to the methodName
and can be used to signal or pass information to the functionunused
- reserved for future usepublic int getSiteID()
public java.lang.String getSiteName()
public static int log(int msgLevel, java.lang.String message)
msgLevel
- one of the LOG_LEVEL constantsmessage
- message text
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |