org.sandev.generator.tags
Class NodeTagImplement

java.lang.Object
  extended by org.sandev.generator.tags.AbstractSandBaseTag
      extended by org.sandev.generator.tags.AbstractSandClassTag
          extended by org.sandev.generator.tags.AbstractSandNodeTag
              extended by org.sandev.generator.tags.NodeTagImplement
All Implemented Interfaces:
com.sun.tools.doclets.Taglet

public class NodeTagImplement
extends AbstractSandNodeTag

Handle @sand.implements declarations of zero or more interfaces to be implemented in the NodeBase. Implementation values:

Comments are not supported for this tag.

MailSender:

Generates a SimpleMailSender mailSender data member, initialized at startup from the simpleMailSenderClass global config variable. Also generates a utility safeSendMail method.

If declaring this implementation, you must declare the following global parameters (with appropriate values) in your config:



AuthUserPeer:

Generates an AuthUserLookup implementation via callthrough to a peer node identified by name in the peerAuthUserLookupNode config parameter.

If declaring this implementation, you must declare the following data member in your NodeDecl:



IDLookup:

Generates an IDLookup implementation using the declared query/collection calls declarations supported by an IDCache. By default the cache used is a NamedSingletonIDCache initialized with the deployment prefix so that all nodes within the deployment share the same cache memory. This can be changed by overriding the cache retrieval methods.

The IDLookup declaration requires AuthUserPeer to be declared. This is so that all user instance retrieval is done through the same mechanism.

For caching, the generated getInstance method calls the generated cacheTrack method which calls to register for CacheAction notifications. A default onDelivery(CacheAction) implementation is provided which removes invalid cached items. These methods require the following to be present in the NodeDecl:

These declarations are NOT generated automatically. They must be present in the source NodeDecl to provide an accurate and complete view of this messaging from the source.



IDLookupPeer:

Generates an IDLookup implementation via callthrough to a peer node identified by name in the peerIDLookupNode config parameter.

If declaring this implementation, you must declare the following data member in your NodeDecl:




Field Summary
static java.lang.String CORENAME
          The core name of this tag.
protected  boolean implAuthUserPeer
          Declares implementation of AuthUserPeer
protected  boolean implIDLookup
          Declares implementation of IDLookup
protected  boolean implIDLookupPeer
          Declares implementation of IDLookupPeer
protected  boolean implMailSender
          Declares implementation of MailSender
static java.lang.String TAGNAME
          Our fixed name, used for hash lookup and text parsing.
 
Fields inherited from class org.sandev.generator.tags.AbstractSandBaseTag
PREFIX
 
Constructor Summary
NodeTagImplement()
           
 
Method Summary
static boolean exists(com.sun.javadoc.ClassDoc cd)
          Returns true if the given field contains this tag, false otherwise.
 java.lang.String getImplDescription()
          Assuming this instance has been initialized, return the description of the implementations that were declared.
 java.lang.String getName()
          Return our tag name
static NodeTagImplement getNodeTagImplement(com.sun.javadoc.ClassDoc cd)
          Factory method for retrieving a new instance given a ClassDoc.
 boolean hasImplAuthUserPeer()
          accessor for implAuthUserPeer
 boolean hasImplIDLookup()
          accessor for implIDLookup
 boolean hasImplIDLookupPeer()
          accessor for implIDLookupPeer
 boolean hasImplMailSender()
          accessor for implMailSender
 void init(com.sun.javadoc.Tag tag)
          Initialize this instance from the tag information.
static void register(java.util.Map tagletMap)
          Registers this taglet when triggered by the taglet declaration being loaded in as part of the build.
 void setImplAuthUserPeer(boolean val)
          mutator for implAuthUserPeer
 void setImplIDLookup(boolean val)
          mutator for implIDLookup
 void setImplIDLookupPeer(boolean val)
          mutator for implIDLookupPeer
 void setImplMailSender(boolean val)
          mutator for implMailSender
 java.lang.String toString(com.sun.javadoc.Tag tag)
          Return a documentation description of this tag.
 java.lang.String toString(com.sun.javadoc.Tag[] tags)
          Return a documentation text for when several of these tags are present.
 
Methods inherited from class org.sandev.generator.tags.AbstractSandClassTag
inType
 
Methods inherited from class org.sandev.generator.tags.AbstractSandBaseTag
inConstructor, inField, inMethod, inOverview, inPackage, isInlineTag, registerHelper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CORENAME

public static final java.lang.String CORENAME
The core name of this tag.

See Also:
Constant Field Values

implMailSender

protected boolean implMailSender
Declares implementation of MailSender


implAuthUserPeer

protected boolean implAuthUserPeer
Declares implementation of AuthUserPeer


implIDLookup

protected boolean implIDLookup
Declares implementation of IDLookup


implIDLookupPeer

protected boolean implIDLookupPeer
Declares implementation of IDLookupPeer


TAGNAME

public static final java.lang.String TAGNAME
Our fixed name, used for hash lookup and text parsing.

See Also:
Constant Field Values
Constructor Detail

NodeTagImplement

public NodeTagImplement()
Method Detail

hasImplMailSender

public boolean hasImplMailSender()
accessor for implMailSender


setImplMailSender

public void setImplMailSender(boolean val)
mutator for implMailSender


hasImplAuthUserPeer

public boolean hasImplAuthUserPeer()
accessor for implAuthUserPeer


setImplAuthUserPeer

public void setImplAuthUserPeer(boolean val)
mutator for implAuthUserPeer


hasImplIDLookup

public boolean hasImplIDLookup()
accessor for implIDLookup


setImplIDLookup

public void setImplIDLookup(boolean val)
mutator for implIDLookup


hasImplIDLookupPeer

public boolean hasImplIDLookupPeer()
accessor for implIDLookupPeer


setImplIDLookupPeer

public void setImplIDLookupPeer(boolean val)
mutator for implIDLookupPeer


init

public void init(com.sun.javadoc.Tag tag)
Initialize this instance from the tag information.


getName

public java.lang.String getName()
Return our tag name


register

public static void register(java.util.Map tagletMap)
Registers this taglet when triggered by the taglet declaration being loaded in as part of the build.


toString

public java.lang.String toString(com.sun.javadoc.Tag[] tags)
Return a documentation text for when several of these tags are present. Should only be one declaration.

Specified by:
toString in interface com.sun.tools.doclets.Taglet
Specified by:
toString in class AbstractSandBaseTag
Parameters:
tags - the array of Tags representing of this custom tag.

toString

public java.lang.String toString(com.sun.javadoc.Tag tag)
Return a documentation description of this tag. We essentially just init ourselves and then dump out a one liner for each declared interface implementation.

Specified by:
toString in interface com.sun.tools.doclets.Taglet
Specified by:
toString in class AbstractSandBaseTag
Parameters:
tag - the Tag representation of this custom tag.

getImplDescription

public java.lang.String getImplDescription()
Assuming this instance has been initialized, return the description of the implementations that were declared.


getNodeTagImplement

public static NodeTagImplement getNodeTagImplement(com.sun.javadoc.ClassDoc cd)
Factory method for retrieving a new instance given a ClassDoc. Returns an initialized instance if the tag was found, or an instance with all implementations undeclared if nothing was declared.


exists

public static boolean exists(com.sun.javadoc.ClassDoc cd)
Returns true if the given field contains this tag, false otherwise.