com.omnipilot.lassopro
Class LassoTagModule

java.lang.Object
  extended bycom.omnipilot.lassopro.LassoTagModule
All Implemented Interfaces:
LassoJavaModule

public abstract class LassoTagModule
extends java.lang.Object
implements LassoJavaModule

Base class for any tag module. Most tag modules output data onto the web page, though some tags may perform other actions based on the parameters passed to them.

Every LassoTagModule must implement registerLassoModule method, and one or more methods with the same signature as TAG_METHOD_PROTOTYPE.

Lasso calls registerLassoModule once at startup to give this module a chance to register its tags. LassoTagModule must then call registerTagModule as many times as there are tags implemented by this module.


Field Summary
static int FLAG_ASYNC
          The tag is to be run in its own thread.
static int FLAG_CONTAINER
          The tag is a container tag.
static int FLAG_DEPRECATED
          Use of the tag is deprecated.
static int FLAG_INITIALIZER
          The tag is to be treated as an initializer for a custom type.
static int FLAG_LOOPING
          The tag is a looping container tag.
static int FLAG_NO_GLOBAL_IMPORT
          The tag should not be automatically imported into the global namespace.
static int FLAG_SKIP_SECURITY_CHECK
          Bypass any security checks for the tag.
static int FLAG_SUBSTITUTION
          The tag is to be treated as a "regular" tag.
static int FLAG_USER1
          User-defined flag.
static int FLAG_USER2
          User-defined flag.
static int FLAG_USER3
          User-defined flag.
static int FLAG_USER4
          User-defined flag.
 
Fields inherited from interface com.omnipilot.lassopro.LassoJavaModule
ERR_NOERR
 
Constructor Summary
protected LassoTagModule()
           
 
Method Summary
protected  void registerTagModule(java.lang.String moduleName, java.lang.String tagName, java.lang.String methodName, int flags, java.lang.String description)
          Use this method to register substitution tags implemented by your module.
 int TAG_METHOD_PROTOTYPE(LassoCall lasso, int action)
          A prototype for all tag methods registered by registerTagModule.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.omnipilot.lassopro.LassoJavaModule
registerLassoModule
 

Field Detail

FLAG_INITIALIZER

public static final int FLAG_INITIALIZER
The tag is to be treated as an initializer for a custom type.

See Also:
Constant Field Values

FLAG_SUBSTITUTION

public static final int FLAG_SUBSTITUTION
The tag is to be treated as a "regular" tag. This is the default behavior so this flag is not required.

See Also:
Constant Field Values

FLAG_ASYNC

public static final int FLAG_ASYNC
The tag is to be run in its own thread. It will return no value to the caller.

See Also:
Constant Field Values

FLAG_CONTAINER

public static final int FLAG_CONTAINER
The tag is a container tag. The tag must be called using the proper
tag; ... /tag;
syntax or an error is generated. The result of executing any body statements can be retrieved using the childrenRun method.

See Also:
Constant Field Values

FLAG_SKIP_SECURITY_CHECK

public static final int FLAG_SKIP_SECURITY_CHECK
Bypass any security checks for the tag. Useful to avoid any performance hits associated with security checks. Should only be used when a tag performs only trival or completely secure operations.

See Also:
Constant Field Values

FLAG_LOOPING

public static final int FLAG_LOOPING
The tag is a looping container tag. For any tag registered with this flag, Lasso will automatically keep track of the loop_count and increment it each time the tag calls childrenRun.

See Also:
Constant Field Values

FLAG_NO_GLOBAL_IMPORT

public static final int FLAG_NO_GLOBAL_IMPORT
The tag should not be automatically imported into the global namespace. All LJAPI tags, starting with LP8, which are registered with a namespace should specify this flag.

See Also:
Constant Field Values

FLAG_DEPRECATED

public static final int FLAG_DEPRECATED
Use of the tag is deprecated. Depending on the administrator's configuration, calling the tag will automatically output a warning to the logging system.

See Also:
Constant Field Values

FLAG_USER1

public static final int FLAG_USER1
User-defined flag. May be used with tagSetFlag, tagHasFlag, tagClearFlag OR typeSetFlag, typeHasFlag, typeClearFlag

See Also:
Constant Field Values

FLAG_USER2

public static final int FLAG_USER2
User-defined flag. May be used with tagSetFlag, tagHasFlag, tagClearFlag OR typeSetFlag, typeHasFlag, typeClearFlag

See Also:
Constant Field Values

FLAG_USER3

public static final int FLAG_USER3
User-defined flag. May be used with tagSetFlag, tagHasFlag, tagClearFlag OR typeSetFlag, typeHasFlag, typeClearFlag

See Also:
Constant Field Values

FLAG_USER4

public static final int FLAG_USER4
User-defined flag. May be used with tagSetFlag, tagHasFlag, tagClearFlag OR typeSetFlag, typeHasFlag, typeClearFlag

See Also:
Constant Field Values
Constructor Detail

LassoTagModule

protected LassoTagModule()
Method Detail

registerTagModule

protected void registerTagModule(java.lang.String moduleName,
                                 java.lang.String tagName,
                                 java.lang.String methodName,
                                 int flags,
                                 java.lang.String description)
Use this method to register substitution tags implemented by your module. You should call registerTagModule as many times as there are tags implemented in your module.

Parameters:
moduleName - name of the module as returned by [Lasso_TagModuleName] LDML tag
tagName - name of the custom LDML tag implemented by this module
methodName - Lasso will call this method every time it finds tagName tag in a xxx.lasso format file
flags - one or more logically or'ed FLAG constants
description - optional tag info, such as brief description of this tag usage

TAG_METHOD_PROTOTYPE

public int TAG_METHOD_PROTOTYPE(LassoCall lasso,
                                int action)
A prototype for all tag methods registered by registerTagModule. Since methods are being registered by name, they must exactly match the values passed in a tagName parameter of registerTagModule call.

Parameters:
action - reserved for future use;