CONGO AppServer

Class templates

java.lang.Object
  extended bytemplates

public class templates
extends java.lang.Object

an XMLRPC class to handle 'templates' for page rendering

Version:
$Id: templates.java,v 1.23 2005/01/07 16:22:11 shevett Exp $
Author:
Dave Belfer Shevett - dbs@stonekeep.com

Nested Class Summary
static class templates.Foo
           
 
Constructor Summary
templates()
           
 
Method Summary
static java.lang.Object generateEmail(int rid, int cid, java.lang.String ccAddress, java.lang.String templateName)
           
static java.lang.Object processTemplate(int cid, int rid, java.lang.String templateName, java.util.Hashtable bulkInfo)
          Process a template, returning the result.
 java.lang.Object templateCreate(int confID, java.lang.String newName, java.lang.String newDescription, java.lang.String newBody)
          Create a new template
 java.lang.Object templateDelete(int confID, java.lang.String name)
          Delete a template
static java.util.Hashtable templateFetch(int whatCID, java.lang.String whatTemplate)
          Fetch a single template for use
 java.util.Hashtable templateList(int whatCID)
          List out templates available
 java.lang.Object templateUpdate(int confID, java.lang.String name, java.lang.String newdesc, java.lang.String newbody)
          Update information in a template
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

templates

public templates()
Method Detail

templateList

public java.util.Hashtable templateList(int whatCID)
List out templates available

Parameters:
whatCID - What conference to list templates for
Returns:
Hashtable containing:
    Integer rowcount - The number of rows returned
    Hashtable rowdata - The Hashtable containing rows for each property. See below

Structure of rowdata:
    String templateName - Template name
    String templateDesc - Template value
    String templateLastmod - Date last modified

templateCreate

public java.lang.Object templateCreate(int confID,
                                       java.lang.String newName,
                                       java.lang.String newDescription,
                                       java.lang.String newBody)
Create a new template

Parameters:
confID - The conference id this template is stored under
Returns:
Hashtable containing:
    Integer errorCode - 0 = Success, 1 = error
    String errorString - Text of the reason for the failre ('Success' if successful)

templateFetch

public static java.util.Hashtable templateFetch(int whatCID,
                                                java.lang.String whatTemplate)
Fetch a single template for use

Parameters:
whatCID - What conference to get the template from
whatTemplate - The name of the template
Returns:
Hashtable containing:
Integer errorCode - '0' if successful, '1' if there was an error
String errorString - The text of the error if any ('Success' if okay)
String templateName - Template name
String templateDesc - Template value
String templateBody - The template itself
String templateLastmod - Date last modified

templateUpdate

public java.lang.Object templateUpdate(int confID,
                                       java.lang.String name,
                                       java.lang.String newdesc,
                                       java.lang.String newbody)
Update information in a template

Parameters:
confID - Which conference
name - Which template name
newdesc - The new description
newbody - The new body
Returns:
Hashtable containing:
    If the function succeeds:
      Integer errorCode - 0
      String errorString - 'Success'
    If the function fails:
      Integer errorCode - 1
      String errorString - The reason for the failure.

templateDelete

public java.lang.Object templateDelete(int confID,
                                       java.lang.String name)
Delete a template

Parameters:
confID - Which conference
name - Which template name
Returns:
Hashtable containing:
    If the function succeeds:
      Integer errorCode - 0
      String errorString - 'Success'
    If the function fails:
      Integer errorCode - 1
      String errorString - The reason for the failure.

generateEmail

public static java.lang.Object generateEmail(int rid,
                                             int cid,
                                             java.lang.String ccAddress,
                                             java.lang.String templateName)

processTemplate

public static java.lang.Object processTemplate(int cid,
                                               int rid,
                                               java.lang.String templateName,
                                               java.util.Hashtable bulkInfo)
Process a template, returning the result.

Parameters:
cid - Which conference
rid - the registrant id (0 = none)
templateName - Which template name
Returns:
Hashtable containing:
    If the function succeeds:
      String templateBody - The rendered template
      Integer errorCode - 2
      String errorString - 'Success'
    If the function fails:
      Integer errorCode - 1
      String errorString - The reason for the failure.

CONGO AppServer

Copyright © 2004 Stonekeep Consulting, Inc.