|
Rakesh API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbiz.wedoit4u.Session
biz.wedoit4u.CMASession
public abstract class CMASession
A Java Bean that is used to store sessional information for a CMA user. This class also contains utility methods that are used to abstract business logic away from the presentation layer.
Copyright 2003, Rakesh Vidyadharan and wedoit4u.biz
| Constructor Summary | |
|---|---|
CMASession()
The default constructor. |
|
| Method Summary | |
|---|---|
void |
deleteCategory(javax.servlet.http.HttpServletRequest request)
Delete a categories record. |
void |
deleteContent(javax.servlet.http.HttpServletRequest request)
Delete a contents record. |
void |
deleteCustomer(javax.servlet.http.HttpServletRequest request)
Delete a customers record. |
void |
deleteCustomerStyle(javax.servlet.http.HttpServletRequest request)
Delete a customer_styles record. |
void |
deleteCustomerType(javax.servlet.http.HttpServletRequest request)
Delete a customer_types record. |
void |
deleteSiteProperty(javax.servlet.http.HttpServletRequest request)
Delete a site_properties record. |
void |
deleteStyleClass(javax.servlet.http.HttpServletRequest request)
Delete a style_classes record. |
CategoryBean |
editCategory(javax.servlet.http.HttpServletRequest request)
Create/edit a categories record. |
ContentBean |
editContent(javax.servlet.http.HttpServletRequest request)
Create/edit a contents record. |
CustomerBean |
editCustomer(javax.servlet.http.HttpServletRequest request)
Create/edit a customers record. |
CustomerStyleBean |
editCustomerStyle(javax.servlet.http.HttpServletRequest request)
Create/edit a customer_styles record. |
CustomerTypeBean |
editCustomerType(int customerTypeId,
java.lang.String type,
java.lang.String description,
int partnerId)
Create/edit a customer_types record. |
PartnerStyleBean |
editPartnerStyle(javax.servlet.http.HttpServletRequest request)
Create/edit a partner_styles record. |
SitePropertyBean |
editSiteProperty(javax.servlet.http.HttpServletRequest request)
Create/edit a site_properties record. |
StyleClassBean |
editStyleClass(javax.servlet.http.HttpServletRequest request)
Create/edit a style_classes record. |
private CustomerBean[] |
getCustomerBeans(java.util.Collection collection)
Iterate through the Collection of entity bean
instances of type Customer
and create an array of java beans. |
CustomerBean[] |
getCustomerList()
Return an Array of java bean instances of type
CustomerBean. |
CustomerBean[] |
getCustomerList(int customerTypeId)
Return an Array of java bean instances of type
CustomerBean that are associated
with the specified customer_type_id. |
CustomerStyleBean[] |
getCustomerStyleList(int customerId)
Return an Array of java bean instances of
type CustomerStyleBean that are
associated with the specified customer_id. |
CustomerTypeBean[] |
getCustomerTypeList(int partnerId)
Return an Array of java bean instances of
type CustomerTypeBean. |
java.lang.String |
getFormattedDate(java.util.Date date)
Return a String representation of the specified Date
object. |
SitePropertyBean[] |
getSitePropertyList()
Return an Array of java bean instances of
type SitePropertyBean. |
StyleClassBean[] |
getStyleClassList()
Return an Array of java bean instances of
type StyleClassBean. |
| Methods inherited from class biz.wedoit4u.Session |
|---|
getCategoryBeans, getCategoryList, getContentList, getContentList, getUniqueNumber |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CMASession()
| Method Detail |
|---|
public PartnerStyleBean editPartnerStyle(javax.servlet.http.HttpServletRequest request)
throws CMAException
partner_styles record.
Note: The primary key columns for the table are
foreign keys to the partners and the
style_classes table, and hence should exist prior
to any records being created in the partner_styles
table.
request - - The request from the client that
contains the form elements with all the value for the database
fields.
CMAException - - If database errors are encountered while
creating/editing the database record.
public CustomerTypeBean[] getCustomerTypeList(int partnerId)
throws CMAException
Array of java bean instances of
type CustomerTypeBean.
partnerId - - The partner_id foreign key
for which the list of customers are to be retrieved.
CMAException - - If Naming or Finder exceptions are
encountered while fetching the collection of java beans.CustomerTypeBean.findByPartner( int )
public CustomerTypeBean editCustomerType(int customerTypeId,
java.lang.String type,
java.lang.String description,
int partnerId)
throws CMAException
customer_types record. If the specified
customer_type_id is 0 then a new record
is created. If the specified customer_type_id
exists in the database, then the associated record is updated,
otherwise, a new record is created with the specified value.
customerTypeId - - The customer_type_id value that is
to be edited. If 0 add a new record.type - - The name for the customer type.description - - The description for the customer type.partnerId - - The partner_id foreign key
value for the customer type record.
CMAException - - If database errors are encountered while
creating/editing the database record.
public void deleteCustomerType(javax.servlet.http.HttpServletRequest request)
throws CMAException
customer_types record. The database record
as well as the associated CustomerTypeBean instance are deleted.
request - - The request from the client that
contains the form elements with all the value for the database
fields.
CMAException - - If database errors are encountered while
deleting the database record.CustomerTypeBean.delete( CustomerTypeBean )
public CustomerBean[] getCustomerList()
throws CMAException
Array of java bean instances of type
CustomerBean.
CMAException - - If Naming or Finder exceptions are
encoutered while fetching the collection of entity beans.CustomerBean.findAll(),
getCustomerBeans( Collection )
public CustomerBean[] getCustomerList(int customerTypeId)
throws CMAException
Array of java bean instances of type
CustomerBean that are associated
with the specified customer_type_id.
customerTypeId - - The customer_type_id
foreign key value to filter by.
CMAException - - If Naming or Finder exceptions are
encoutered while fetching the collection of entity beans.CustomerBean.findByCustomerType( int ),
getCustomerBeans( Collection )
private CustomerBean[] getCustomerBeans(java.util.Collection collection)
throws CMAException
Collection of entity bean
instances of type Customer
and create an array of java beans.
collection - - The collection of entity bean
instances.
CMAException - - If errors are encountered while fetching
the java bean instances.
public CustomerBean editCustomer(javax.servlet.http.HttpServletRequest request)
throws CMAException
customers record. If the specified
customer_id is 0 then a new record
is created in the customer table and and associated
record in the site_properties tables. If the
specified customer_id exists in the database, then
the associated record is updated, otherwise, a new record is
created with the specified primary key value.
request - - The request from the client that
contains the form elements with all the value for the database
fields.
CMAException - - If database errors are encountered while
creating/editing the database record.CustomerBean.create( int, String, String, String, String, char, Date, Date, int ),
SitePropertyBean.create( int )
public void deleteCustomer(javax.servlet.http.HttpServletRequest request)
throws CMAException
customers record. The database record
as well as the associated CustomerBean instance are deleted.
request - - The request from the client that
contains the form elements with all the value for the database
fields.
CMAException - - If database errors are encountered while
deleting the database record.CustomerBean.delete( CustomerBean )
public CategoryBean editCategory(javax.servlet.http.HttpServletRequest request)
throws CMAException
categories record. If the specified
category_id is 0 then a new record
is created. If the specified category_id
exists in the database, then the associated record is updated,
otherwise, a new record is created with the specified value.
request - - The request from the client that
contains the form elements with all the value for the database
fields.
CMAException - - If database errors are encountered while
creating/editing the database record.
public void deleteCategory(javax.servlet.http.HttpServletRequest request)
throws CMAException
categories record. The database record
as well as the associated CategoryBean instance are deleted.
request - - The request from the client that
contains the form elements with all the value for the database
fields.
CMAException - - If database errors are encountered while
deleting the database record.CategoryBean.delete( CategoryBean )
public ContentBean editContent(javax.servlet.http.HttpServletRequest request)
throws CMAException
contents record. If the specified
content_id is 0 then a new record
is created. If the specified content_id
exists in the database, then the associated record is updated,
otherwise, a new record is created with the specified value.
request - - The request from the client that
contains the form elements with all the value for the database
fields.
CMAException - - If database errors are encountered while
creating/editing the database record.
public void deleteContent(javax.servlet.http.HttpServletRequest request)
throws CMAException
contents record. The database record
as well as the associated ContentBean instance are deleted.
request - - The request from the client that
contains the form elements with all the value for the database
fields.
CMAException - - If database errors are encountered while
deleting the database record.ContentBean.delete( ContentBean )
public SitePropertyBean[] getSitePropertyList()
throws CMAException
Array of java bean instances of
type SitePropertyBean.
CMAException - - If Naming or Finder exceptions are
encountered while fetching the collection of java beans.SitePropertyBean.findAll()
public SitePropertyBean editSiteProperty(javax.servlet.http.HttpServletRequest request)
throws CMAException
site_properties record. If the specified
customer_type_id is 0 then a new record
is created. The the specified customer_type_id
exists in the database, then the associated record is updated,
otherwise, a new record is created with the specified value.
request - - The request from the client that
contains the form elements with all the value for the database
fields.
CMAException - - If database errors are encountered while
creating/editing the database record.
public void deleteSiteProperty(javax.servlet.http.HttpServletRequest request)
throws CMAException
site_properties record. The database record
as well as the associated SitePropertyBean instance are deleted.
request - - The request from the client that
contains the form elements with all the value for the database
fields.
CMAException - - If database errors are encountered while
deleting the database record.SitePropertyBean.delete( SitePropertyBean )
public StyleClassBean[] getStyleClassList()
throws CMAException
Array of java bean instances of
type StyleClassBean.
CMAException - - If Naming or Finder exceptions are
encountered while fetching the collection of java beans.StyleClassBean.findAll()
public StyleClassBean editStyleClass(javax.servlet.http.HttpServletRequest request)
throws CMAException
style_classes record. If the specified
style_class_id is 0 then a new record
is created. The the specified style_class_id
exists in the database, then the associated record is updated,
otherwise, a new record is created with the specified value.
request - - The request from the client that
contains the form elements with all the value for the database
fields.
CMAException - - If database errors are encountered while
creating/editing the database record.
public void deleteStyleClass(javax.servlet.http.HttpServletRequest request)
throws CMAException
style_classes record. The database record
as well as the associated StyleClassBean instance are deleted.
request - - The request from the client that
contains the form elements with all the value for the database
fields.
CMAException - - If database errors are encountered while
deleting the database record.StyleClassBean.delete( StyleClassBean )
public CustomerStyleBean[] getCustomerStyleList(int customerId)
throws CMAException
Array of java bean instances of
type CustomerStyleBean that are
associated with the specified customer_id.
customerId - - The customer_id for which the
bean instances are to be fetched.
CMAException - - If Naming or Finder exceptions are
encountered while fetching the collection of java beans.CustomerStyleBean.findByCustomer( int )
public CustomerStyleBean editCustomerStyle(javax.servlet.http.HttpServletRequest request)
throws CMAException
customer_styles record.
Note: The primary key columns for the table are
foreign keys to the customers and the
style_classes table, and hence should exist prior
to any records being created in the customer_styles
table.
request - - The request from the client that
contains the form elements with all the value for the database
fields.
CMAException - - If database errors are encountered while
creating/editing the database record.
public void deleteCustomerStyle(javax.servlet.http.HttpServletRequest request)
throws CMAException
customer_styles record. The database record
as well as the associated CustomerStyleBean instance are deleted.
request - - The request from the client that
contains the form elements with all the value for the database
fields.
CMAException - - If database errors are encountered while
deleting the database record.CustomerStyleBean.delete( CustomerStyleBean )public java.lang.String getFormattedDate(java.util.Date date)
Date
object. The representation is in SQL Timestamp
format. This method returns an empty String if errors are
encountered while using the DateFormatter session bean.
date - - The date to format.
DateFormatter.getSQLTimestamp( Date )
|
Rakesh API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||