|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectpl.aislib.fm.Application
Describes an application. Uses following components:
FormsHandler -- describing all forms inside of applicationMessagesHandler -- describing all applications messagesWorkflow -- describing flow betweeen application pages
| Tomasz Pik, AIS.PL |
| Michal Jastak, AIS.PL |
| Constructor Summary | |
Application(java.lang.String _applicationName,
javax.servlet.http.HttpServlet _servlet)
Main constructor. |
|
| Method Summary | |
void |
dispatch(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Process request and response. |
AttributeNameWrapper |
getAttributeNameWrapper()
|
ConfigAdapter |
getConfigAdapter()
|
Database |
getDatabase()
|
java.lang.String |
getDefaultContentType()
|
Form |
getForm(java.lang.String formName)
Deprecated. As of AISLIB 0.5 replaced by Page.getForm(String) which supports multi language. |
Form |
getForm(java.lang.String formName,
java.lang.String language)
Gets form. |
org.apache.commons.logging.Log |
getLog()
|
org.apache.commons.logging.Log |
getLog(java.lang.String loggerName)
|
Message |
getMessage(int messageCode)
Deprecated. As of AISLIB 0.5 replaced by Page.getMessage(int) with default language. |
Message |
getMessage(int messageCode,
java.lang.String lang)
Method getMessage returns the message for given code and language. |
java.util.List |
getMessageGroup(int groupCode)
|
java.lang.String |
getName()
Returns Pasture name. |
javax.servlet.http.HttpServlet |
getServlet()
|
void |
initForms(org.xml.sax.InputSource formsSource)
Initialize FormsHandler component. |
void |
initForms(java.io.InputStream formsStream)
Initialize FormsHandler component. |
void |
initMessages(org.xml.sax.InputSource messagesSource)
Initialize MessagesHandler component. |
void |
initMessages(java.io.InputStream messagesStream)
Initialize MessagesHandler component. |
void |
initWorkflow(org.xml.sax.InputSource workflowSource)
Initialize Workflow component. |
void |
initWorkflow(java.io.InputStream workflowStream)
Initialize Workflow component. |
void |
setConfigAdapter(ConfigAdapter _configAdapter)
Set ConfigAdapter for this Application. |
void |
setDatabase(Database _database)
Set Database for this Application
During setting as a component inside Application, jdbc
logger is pushed into given Database. |
void |
setDefaultContentType(java.lang.String _contentType)
Sets default ContentType for the application. |
void |
setPageSelector(PageSelector _pageSelector)
Set PageSelector for this Application. |
void |
setTemplateEngine(TemplateEngine _templateEngine)
Set TemplateEngine for this Application. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Application(java.lang.String _applicationName,
javax.servlet.http.HttpServlet _servlet)
_applicationName - name of the application._servlet - that requests this application handle.
Throws NullPointerException if the _applicationName or _servlet is null| Method Detail |
public void initWorkflow(java.io.InputStream workflowStream)
throws ApplicationConfigurationException
Workflow component.
workflowStream - contains XML definition of application workflow
ApplicationConfigurationException - if something goes wrong
public void initWorkflow(org.xml.sax.InputSource workflowSource)
throws ApplicationConfigurationException
Workflow component.
workflowSource - contains XML definition of application workflow
ApplicationConfigurationException - if something goes wrong
public void initMessages(java.io.InputStream messagesStream)
throws ApplicationConfigurationException
MessagesHandler component.
messagesStream - contains XML definition of application messages
ApplicationConfigurationException - if something goes wrong
public void initMessages(org.xml.sax.InputSource messagesSource)
throws ApplicationConfigurationException
MessagesHandler component.
messagesSource - contains XML definition of application messages
ApplicationConfigurationException - if something goes wrong
public void initForms(java.io.InputStream formsStream)
throws ApplicationConfigurationException
FormsHandler component.
formsStream - contains XML definition of application forms
ApplicationConfigurationException - if something goes wrong
public void initForms(org.xml.sax.InputSource formsSource)
throws ApplicationConfigurationException
FormsHandler component.
formsSource - contains XML definition of application forms
ApplicationConfigurationException - if something goes wrongpublic void setTemplateEngine(TemplateEngine _templateEngine)
TemplateEngine for this Application.
_templateEngine - which should be used to load templates.public void setDatabase(Database _database)
Database for this Application
During setting as a component inside Application, jdbc
logger is pushed into given Database.
_database - for using within given Application.
Throws NullPointerException if given argument is nullpublic Database getDatabase()
public void setConfigAdapter(ConfigAdapter _configAdapter)
ConfigAdapter for this Application.
_configAdapter - which should be used to access application parameters.public void setPageSelector(PageSelector _pageSelector)
PageSelector for this Application.
_pageSelector - which slould be used for determinig page of user's request.public void setDefaultContentType(java.lang.String _contentType)
ContentType for the application.
text/html is hard-coded as default one.
_contentType - default ContentTypepublic java.lang.String getDefaultContentType()
ContentType for the application.public ConfigAdapter getConfigAdapter()
public AttributeNameWrapper getAttributeNameWrapper()
AttributeNameWrapper for the applicationpublic java.lang.String getName()
Pasture
getName in interface Pasturepublic javax.servlet.http.HttpServlet getServlet()
public org.apache.commons.logging.Log getLog()
public org.apache.commons.logging.Log getLog(java.lang.String loggerName)
loggerName - name of a logging object.
public Message getMessage(int messageCode)
Page.getMessage(int) with default language.
getMessage(int, String).
public Message getMessage(int messageCode,
java.lang.String lang)
messageCode - code of message.lang - language of message content.
messageCode and lang
(if lang is null it returns default content).public java.util.List getMessageGroup(int groupCode)
groupCode - code of message group.
Message objects defined as group with given code.public Form getForm(java.lang.String formName)
Page.getForm(String) which supports multi language.
formName - name of a form.
Form object.
public Form getForm(java.lang.String formName,
java.lang.String language)
formName - name of a form.language - language for the form.
Form object.
public void dispatch(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
servlet object.
java.io.IOException
javax.servlet.ServletExceptionServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||