Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.RuntimeCollective.sitemap.bean
Class Template  view Template download Template.java

java.lang.Object
  extended bycom.RuntimeCollective.sitemap.bean.Template
All Implemented Interfaces:
com.RuntimeCollective.webapps.bean.EntityBean, java.io.Serializable

public class Template
extends java.lang.Object
implements com.RuntimeCollective.webapps.bean.EntityBean

The Template class will hold the code used to render e.g. SiteLocations. The code can either be stored in the (db) persistence layer, or via a filename reference.

Version:
$Id: Template.java,v 1.7 2003/09/30 15:12:59 joe Exp $

Field Summary
static java.lang.String DATABASE_TABLE
          The name of the database table for this bean type.
protected  java.lang.String Description
          A text description of this template
protected  java.lang.String EditFilename
          The File containing the template used to edit
protected  int id
          This template's id
protected  boolean LinkToNewWindow
          Should this Template be viewed in a new window ?
protected  java.lang.String Name
          The name
protected  java.lang.String SnapshotFilename
          The File containing an example snapshot of what the templates look like
protected  boolean UsableByAuthors
          Is this template UsableByAuthors ?
protected  java.lang.String ViewFilename
          The File containing the template used to view
 
Fields inherited from interface com.RuntimeCollective.webapps.bean.EntityBean
INTERFACE_BEAN, NULL_ID
 
Constructor Summary
Template()
          Construct a new blank template, giving it a new unique ID.
Template(int id)
          Get a current template from the RuntimeDataSource, given an id.
 
Method Summary
 void delete()
          Delete this bean from the database.
 java.lang.String getDescription()
          Get the Description
 java.lang.String getEditFilename()
          Get the EditFilename
 int getId()
          Get the unique id of this template.
 boolean getLinkToNewWindow()
          Get the LinkToNewWindow
 java.lang.String getName()
          Get the name
 java.lang.String getSnapshotFilename()
          Get the SnapshotFilename
static Template getTemplateForName(java.lang.String name)
          Get the Template with the smallest id whose name matches the one requested.
 boolean getUsableByAuthors()
          Get the UsableByAuthors
 java.lang.String getViewFilename()
          Get the viewFilename
 void save()
          Save this template to the database.
 void setDescription(java.lang.String description)
          Set the Description
 void setEditFilename(java.lang.String editFilename)
          Set the EditFilename
 void setId(int id)
          Set the unique id of this template.
 void setLinkToNewWindow(boolean linkToNewWindow)
          Set the LinkToNewWindow
 void setName(java.lang.String name)
          Set the name
 void setSnapshotFilename(java.lang.String snapshotFilename)
          Set the SnapshotFilename
 void setUsableByAuthors(boolean usableByAuthors)
          Set the UsableByAuthors
 void setViewFilename(java.lang.String viewFilename)
          Set the viewFilename
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATABASE_TABLE

public static final java.lang.String DATABASE_TABLE
The name of the database table for this bean type.

See Also:
Constant Field Values

id

protected int id
This template's id


Name

protected java.lang.String Name
The name


ViewFilename

protected java.lang.String ViewFilename
The File containing the template used to view


EditFilename

protected java.lang.String EditFilename
The File containing the template used to edit


SnapshotFilename

protected java.lang.String SnapshotFilename
The File containing an example snapshot of what the templates look like


Description

protected java.lang.String Description
A text description of this template


UsableByAuthors

protected boolean UsableByAuthors
Is this template UsableByAuthors ?


LinkToNewWindow

protected boolean LinkToNewWindow
Should this Template be viewed in a new window ?

Constructor Detail

Template

public Template()
         throws java.sql.SQLException
Construct a new blank template, giving it a new unique ID.


Template

public Template(int id)
         throws java.sql.SQLException
Get a current template from the RuntimeDataSource, given an id.

Method Detail

setId

public void setId(int id)
Set the unique id of this template.

Specified by:
setId in interface com.RuntimeCollective.webapps.bean.EntityBean

getId

public int getId()
Get the unique id of this template.

Specified by:
getId in interface com.RuntimeCollective.webapps.bean.EntityBean

save

public void save()
          throws java.sql.SQLException
Save this template to the database.

Specified by:
save in interface com.RuntimeCollective.webapps.bean.EntityBean

delete

public void delete()
            throws java.sql.SQLException
Delete this bean from the database.

Specified by:
delete in interface com.RuntimeCollective.webapps.bean.EntityBean

setName

public void setName(java.lang.String name)
Set the name


getName

public java.lang.String getName()
Get the name


setViewFilename

public void setViewFilename(java.lang.String viewFilename)
Set the viewFilename


getViewFilename

public java.lang.String getViewFilename()
Get the viewFilename


setEditFilename

public void setEditFilename(java.lang.String editFilename)
Set the EditFilename


getEditFilename

public java.lang.String getEditFilename()
Get the EditFilename


setSnapshotFilename

public void setSnapshotFilename(java.lang.String snapshotFilename)
Set the SnapshotFilename


getSnapshotFilename

public java.lang.String getSnapshotFilename()
Get the SnapshotFilename


setDescription

public void setDescription(java.lang.String description)
Set the Description


getDescription

public java.lang.String getDescription()
Get the Description


setUsableByAuthors

public void setUsableByAuthors(boolean usableByAuthors)
Set the UsableByAuthors


getUsableByAuthors

public boolean getUsableByAuthors()
Get the UsableByAuthors


setLinkToNewWindow

public void setLinkToNewWindow(boolean linkToNewWindow)
Set the LinkToNewWindow


getLinkToNewWindow

public boolean getLinkToNewWindow()
Get the LinkToNewWindow


getTemplateForName

public static Template getTemplateForName(java.lang.String name)
Get the Template with the smallest id whose name matches the one requested.