|
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.AdminSession
public abstract class AdminSession
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 | |
|---|---|
AdminSession()
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 |
deleteCustomerType(javax.servlet.http.HttpServletRequest request)
Delete a customer_types record. |
void |
deletePartner(javax.servlet.http.HttpServletRequest request)
Delete a partners 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. |
CustomerTypeBean |
editCustomerType(javax.servlet.http.HttpServletRequest request)
Create/edit a customer_types record. |
PartnerBean |
editPartner(javax.servlet.http.HttpServletRequest request)
Create/edit a partners 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. |
CategoryBean[] |
getCategoryList()
Return an Array of java bean instances of type
CategoryBean that represents all the
records in the categories table. |
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. |
CustomerTypeBean[] |
getCustomerTypeList()
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. |
PartnerBean[] |
getPartnerList()
Return an Array of java bean instances of type
PartnerBean. |
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 AdminSession()
| Method Detail |
|---|
public PartnerBean[] getPartnerList()
throws CMAException
Array of java bean instances of type
PartnerBean.
CMAException - - If Naming or Finder exceptions are
encoutered while fetching the collection of entity beans.PartnerBean.findAll()
public PartnerBean editPartner(javax.servlet.http.HttpServletRequest request)
throws CMAException
partners record. If the specified
partner_id is 0 then a new record
is created in the partner table. If the
specified partner_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.PartnerBean.create( int, String, String, char, Date, String, String, String, String, String ),
SitePropertyBean.create( int )
public void deletePartner(javax.servlet.http.HttpServletRequest request)
throws CMAException
partners record. The database record
as well as the associated PartnerBean 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.PartnerBean.delete( PartnerBean )
public CustomerTypeBean[] getCustomerTypeList()
throws CMAException
Array of java bean instances of
type CustomerTypeBean.
CMAException - - If Naming or Finder exceptions are
encountered while fetching the collection of java beans.CustomerTypeBean.findAll()
public CustomerTypeBean editCustomerType(javax.servlet.http.HttpServletRequest request)
throws CMAException
customer_types 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 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 )
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[] getCategoryList()
throws CMAException
Array of java bean instances of type
CategoryBean that represents all the
records in the categories table.
CMAException - - If Naming or Finder exceptions are
encoutered while fetching the collection of entity beans.CategoryBean.findAll(),
Session.getCategoryBeans( Collection )
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 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 | |||||||||