com.jxml.qare.qhome
Class Template

java.lang.Object
  |
  +--com.jxml.qare.qhome.Template
All Implemented Interfaces:
Item
Direct Known Subclasses:
ActivationMsgReply.ReplyTemplate, AppDirTemplate, CDelegate, CDelegations, ChangePasswordTemplate, CommonErrorReply.CommonErrorTemplate, CommonExceptionReply.CommonExceptionTemplate, countTemplate, CPending, CreateUserGroupsTemplate, CreateUserTemplate, DeleteRemoteTemplate, HelloTemplate, InboxTemplate, loginTemplate, LoginTemplate, RefreshTemplate, RemoteUserTemplate, ResponseError.RETemplate, ResponseException.RETemplate

public abstract class Template
extends Object
implements Item

This class provides the functionality for complete processing of template .


Field Summary
static String[] E
           
static String EV
           
 Map properties
           
 
Constructor Summary
Template()
           
 
Method Summary
 void check(String t)
          Throws an exception when text contains markup characters
 void content(String t)
          Append content, encode markup characters.
static String cvt(String t)
          Encode markup characters.
 void eval(Map properties, List args, ClassLoader cl)
          Evaluates the properties with the list of argumants
 void expand(String template)
          Expands the template data
 void expandProperty(String propertyName)
          Expands the property specified by the propertyName
 void expandURL(String templateName)
          Expands the URL specified by the templateName
 void init(Map properties, List args)
          Initializes the properties
 void markup(String t)
          Append markup.
abstract  String process(String arg)
           
 String readURL(String templateName)
          Returns the string containing the template data
static void redirectToAppDir(Map properties)
           
static void redirectToDelegationDisplay(Map properties)
           
static void redirectToDelegationDisplayUG(Map properties)
           
static void redirectToLogin(Map properties)
           
static void redirectToRemoteAccountDisplay(Map properties)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EV

public static final String EV

E

public static final String[] E

properties

public Map properties
Constructor Detail

Template

public Template()
Method Detail

cvt

public static String cvt(String t)
Encode markup characters.

check

public void check(String t)
           throws Exception
Throws an exception when text contains markup characters

redirectToAppDir

public static void redirectToAppDir(Map properties)
                             throws Exception

redirectToLogin

public static void redirectToLogin(Map properties)
                            throws Exception

redirectToDelegationDisplay

public static void redirectToDelegationDisplay(Map properties)
                                        throws Exception

redirectToDelegationDisplayUG

public static void redirectToDelegationDisplayUG(Map properties)
                                          throws Exception

redirectToRemoteAccountDisplay

public static void redirectToRemoteAccountDisplay(Map properties)
                                           throws Exception

markup

public void markup(String t)
Append markup.

content

public void content(String t)
Append content, encode markup characters.

eval

public void eval(Map properties,
                 List args,
                 ClassLoader cl)
          throws Exception
Evaluates the properties with the list of argumants
Specified by:
eval in interface Item
Parameters:
properties - Contains the data in the form of name,value pair.
args - Template name present in properties.
cl - class to be loaded for individual plugins.

init

public void init(Map properties,
                 List args)
Initializes the properties
Parameters:
properties - Contains the data in the form of name,value pair.
args - Template name present in properties.

expandProperty

public void expandProperty(String propertyName)
                    throws Exception
Expands the property specified by the propertyName

expandURL

public void expandURL(String templateName)
               throws Exception
Expands the URL specified by the templateName

readURL

public String readURL(String templateName)
Returns the string containing the template data

expand

public void expand(String template)
            throws Exception
Expands the template data

process

public abstract String process(String arg)
                        throws Exception