|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.buildforge.services.client.dbo.Template
public class Template
This class represents the email notification templates used by the
system to generate notification emails on specific events. They are
owned and scoped by a specific Project
's Step
.
Field Summary | |
---|---|
static java.lang.Class<Template> |
CLASS
|
Constructor Summary | |
---|---|
Template(APIClientConnection conn,
int projectId,
int stepId)
Deprecated. use Template(APIClientConnection, int, int, String, String) instead |
|
Template(APIClientConnection conn,
int projectId,
int stepId,
java.lang.String name,
java.lang.String locale)
Defines a new Template for a specific Project's Step |
Method Summary | |
---|---|
Template |
create()
Creates a new Template in the database |
void |
delete()
Removes this Template from the database |
static void |
deleteById(APIClientConnection conn,
int projectId,
int stepId,
java.lang.String name,
java.lang.String locale)
Removes the specified Template from the database |
static java.util.List<Template> |
findAll(APIClientConnection conn,
int projectId,
int stepId)
Deprecated. Use findById(APIClientConnection, int, int, String, String) instead. |
static Template |
findById(APIClientConnection conn,
int projectId,
int stepId,
java.lang.String templateName,
java.lang.String locale)
Retrieves a specific named Template of a Project 's Step |
java.lang.String |
getBodyText()
Returns the text of the Template itself |
java.lang.String |
getDescription()
Returns the user-defined decription of this Template |
java.lang.String |
getFrom()
Returns the address to be used as the 'From' address when emailing this Template |
java.lang.String |
getLocale()
Returns the ISO 639 code for the language of this template, e.g.: 'en_US', 'fr_CA', etc. |
java.lang.String |
getName()
Returns the unique (project step-wide) name of this Template |
int |
getProjectId()
Returns the identifier of the Project that owns this Template |
int |
getStepId()
Returns the identifier of the Step that owns this Template |
java.lang.String |
getSubject()
Returns the text of the 'Subject' that will be used when emailing this Template |
void |
setBodyText(java.lang.String bodyText)
Sets the text of the Template itself |
void |
setDescription(java.lang.String description)
Sets user-defined decription of this Template |
void |
setFrom(java.lang.String from)
Sets the address to be used as the 'From' address when emailing this Template |
void |
setLocale(java.lang.String newLocale)
Sets the ISO 639 code for the language of this template, e.g.: 'en_US', 'fr_CA', etc. |
void |
setName(java.lang.String name)
Sets the unique (project step-wide) name of this Template |
void |
setProjectId(int newProjectId)
Sets the identifier of the Project that owns this Template |
void |
setStepId(int newStepId)
Sets the identifier of the Step that owns this Template |
void |
setSubject(java.lang.String subject)
Sets the text of the 'Subject' that will be used when emailing this Template |
java.lang.String |
toString()
|
Template |
update()
Commits the current state of this Template to the database |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.Class<Template> CLASS
Constructor Detail |
---|
public Template(APIClientConnection conn, int projectId, int stepId)
conn
- projectId
- The integer identifier of the Project
to which this Template belongsstepId
- The integer identifer of the Step
to which this Template belongspublic Template(APIClientConnection conn, int projectId, int stepId, java.lang.String name, java.lang.String locale)
conn
- projectId
- The integer identifier of the Project
to which this Template belongsstepId
- The integer identifer of the Step
to which this Template belongsname
- The unique name of this Templatelocale
- The ISO 639 code for the language of this template, e.g.: 'en_US', 'fr_CA', etc.Method Detail |
---|
public static java.util.List<Template> findAll(APIClientConnection conn, int projectId, int stepId) throws java.io.IOException, ServiceException
findById(APIClientConnection, int, int, String, String)
instead.
Project
's Step
.
conn
- projectId
- stepId
-
java.io.IOException
ServiceException
public static Template findById(APIClientConnection conn, int projectId, int stepId, java.lang.String templateName, java.lang.String locale) throws java.io.IOException, ServiceException
Project
's Step
conn
- the API client connection to useprojectId
- the id of the project for the templatestepId
- 1 based step id (or 0 if no step)templateName
- name of the templatelocale
- locale of the template
java.io.IOException
ServiceException
public Template create() throws java.io.IOException, ServiceException
java.io.IOException
ServiceException
public Template update() throws java.io.IOException, ServiceException
java.io.IOException
ServiceException
public void delete() throws java.io.IOException, ServiceException
java.io.IOException
ServiceException
public static void deleteById(APIClientConnection conn, int projectId, int stepId, java.lang.String name, java.lang.String locale) throws java.io.IOException, ServiceException
conn
- projectId
- stepId
- name
- locale
-
java.io.IOException
ServiceException
public int getProjectId()
Project
that owns this Template
public int getStepId()
Step
that owns this Template
public java.lang.String getBodyText()
public java.lang.String getDescription()
public java.lang.String getFrom()
public java.lang.String getLocale()
public java.lang.String getName()
public java.lang.String getSubject()
public void setBodyText(java.lang.String bodyText)
bodyText
- public void setDescription(java.lang.String description)
description
- public void setFrom(java.lang.String from)
from
- public void setLocale(java.lang.String newLocale)
newLocale
- public void setName(java.lang.String name)
name
- public void setProjectId(int newProjectId)
Project
that owns this Template
newProjectId
- the new Project
identifierpublic void setStepId(int newStepId)
Step
that owns this Template
newStepId
- the new Step
identifierpublic void setSubject(java.lang.String subject)
subject
- public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |