Java Doc for AbstractDatabaseAction.java in  » Content-Management-System » apache-lenya-2.0 » org » apache » cocoon » acting » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Content Management System » apache lenya 2.0 » org.apache.cocoon.acting 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.cocoon.acting.AbstractAction
   org.apache.cocoon.acting.AbstractConfigurableAction
      org.apache.cocoon.acting.ConfigurableServiceableAction
         org.apache.cocoon.acting.AbstractComplementaryConfigurableAction
            org.apache.cocoon.acting.AbstractDatabaseAction

All known Subclasses:   org.apache.cocoon.acting.DbXMLAuthenticatorAction,  org.apache.cocoon.acting.DatabaseUpdateAction,  org.apache.cocoon.acting.DatabaseCookieAuthenticatorAction,  org.apache.cocoon.acting.DatabaseDeleteAction,  org.apache.cocoon.acting.DatabaseAddAction,  org.apache.cocoon.acting.DatabaseAuthenticatorAction,  org.apache.cocoon.acting.DatabaseSelectAction,
AbstractDatabaseAction
abstract public class AbstractDatabaseAction extends AbstractComplementaryConfigurableAction implements Disposable(Code)
Set up environment for configurable form handling data. It is important to note that all DatabaseActions use a common configuration format. This group of actions are unique in that they employ a terciary mapping. There is the Form parameter, the database column, and the type. Each configuration file must use the same format in order to be effective. The name of the root configuration element is irrelevant.
 <root>
 <connection>personnel<connection>
 <table>
 <keys>
 <key param="id" dbcol="id" type="int"/>
 </keys>
 <values>
 <value param="name" dbcol="name" type="string"/>
 <value param="department" dbcol="department_id" type="int"/>
 </values>
 </table>
 </root>
 
The types recognized by this system are:
Type Description
ascii ASCII Input Stream, a CLOB input
big-decimal a java.math.BigDecimal value
binary Binary Input Stream, a BLOB input
byte a Byte
string a String
date a Date
double a Double
float a Float
int an Integer
long a Long
short a Short
time a Time
time-stamp a Timestamp
now a Timestamp with the current day/time--the form value is ignored.
image a binary image file, we cache the attribute information
image-width the width attribute of the cached file attribute. NOTE: param attribute must equal the param for image with a "-width" suffix.
image-height the width attribute of the cached file attribute NOTE: param attribute must equal the param for image with a "-height" suffix.
image-size the size attribute of the cached file attribute NOTE: param attribute must equal the param for image with a "-size" suffix.

author:
   Berin Loritsch
author:
   Donald Ball
version:
   $Id: AbstractDatabaseAction.java 452425 2006-10-03 11:18:47Z vgritsenko $


Field Summary
protected  ServiceSelectordbselector
    
protected  Mapfiles
    
final protected static  MaptypeConstants
    


Method Summary
protected  StringBufferbuildList(Configuration[] values, String separator)
    
protected  StringBufferbuildList(Configuration[] values, int begin)
    
public  voiddispose()
    
protected  ObjectgetColumn(ResultSet set, Request request, Configuration entry)
     Get the Statement column so that the results are mapped correctly.
final protected  DataSourceComponentgetDataSource(Configuration conf)
     Get the Datasource we need.
protected  ObjectgetRequestAttribute(Request request, String key)
     Retreive a value from the request attributes.
final protected  booleanisLargeObject(String type)
     Return whether a type is a Large Object (BLOB/CLOB).
public  voidservice(ServiceManager manager)
     Compose the Actions so that we can select our databases.
protected  voidsetColumn(PreparedStatement statement, int position, Request request, Configuration entry)
     Set the Statement column so that the results are mapped correctly.
protected  voidsetColumn(PreparedStatement statement, int position, Request request, Configuration entry, String param)
     Set the Statement column so that the results are mapped correctly.
protected  voidsetColumn(PreparedStatement statement, int position, Request request, Configuration entry, String param, Object value)
     Set the Statement column so that the results are mapped correctly.
protected  voidsetColumn(PreparedStatement statement, int position, Request request, Configuration entry, String param, Object value, int rowIndex)
     Set the Statement column so that the results are mapped correctly.
protected  voidsetRequestAttribute(Request request, String key, Object value)
     Store a key/value pair in the request attributes.

Field Detail
dbselector
protected ServiceSelector dbselector(Code)



files
protected Map files(Code)



typeConstants
final protected static Map typeConstants(Code)





Method Detail
buildList
protected StringBuffer buildList(Configuration[] values, String separator) throws ConfigurationException(Code)
Build a separed list with the Values of a Configuration Array
Parameters:
  values - - build the list from
Parameters:
  separator - - Put a separator between the values of the list - an StringBuffer with the builded List
throws:
  ConfigurationException -



buildList
protected StringBuffer buildList(Configuration[] values, int begin) throws ConfigurationException(Code)
Build a separed list with the Values of a Configuration Array
Parameters:
  values - - build the list from
Parameters:
  begin - - Initial index - an StringBuffer with the builded List
throws:
  ConfigurationException -



dispose
public void dispose()(Code)
dispose



getColumn
protected Object getColumn(ResultSet set, Request request, Configuration entry) throws Exception(Code)
Get the Statement column so that the results are mapped correctly.



getDataSource
final protected DataSourceComponent getDataSource(Configuration conf) throws ServiceException(Code)
Get the Datasource we need.



getRequestAttribute
protected Object getRequestAttribute(Request request, String key)(Code)
Retreive a value from the request attributes.



isLargeObject
final protected boolean isLargeObject(String type)(Code)
Return whether a type is a Large Object (BLOB/CLOB).



service
public void service(ServiceManager manager) throws ServiceException(Code)
Compose the Actions so that we can select our databases.



setColumn
protected void setColumn(PreparedStatement statement, int position, Request request, Configuration entry) throws Exception(Code)
Set the Statement column so that the results are mapped correctly. The name of the parameter is retrieved from the configuration object.
Parameters:
  statement - the prepared statement
Parameters:
  position - the position of the column
Parameters:
  request - the request
Parameters:
  entry - the configuration object



setColumn
protected void setColumn(PreparedStatement statement, int position, Request request, Configuration entry, String param) throws Exception(Code)
Set the Statement column so that the results are mapped correctly. The value of the column is retrieved from the request object. If the named parameter exists in the request object's parameters, that value is used. Otherwise if the named parameter exists in the request object's attributes, that value is used. Otherwise the request object is retrieved using Request.get(attribute), which is documented to be the same as Request.getAttribute(attribute), so something weird must be going on.
Parameters:
  statement - the prepared statement
Parameters:
  position - the position of the column
Parameters:
  request - the request
Parameters:
  entry - the configuration object
Parameters:
  param - the name of the request parameter



setColumn
protected void setColumn(PreparedStatement statement, int position, Request request, Configuration entry, String param, Object value) throws Exception(Code)
Set the Statement column so that the results are mapped correctly.
Parameters:
  statement - the prepared statement
Parameters:
  position - the position of the column
Parameters:
  request - the request
Parameters:
  entry - the configuration object
Parameters:
  param - the name of the request parameter
Parameters:
  value - the value of the column



setColumn
protected void setColumn(PreparedStatement statement, int position, Request request, Configuration entry, String param, Object value, int rowIndex) throws Exception(Code)
Set the Statement column so that the results are mapped correctly.
Parameters:
  statement - the prepared statement
Parameters:
  position - the position of the column
Parameters:
  request - the request
Parameters:
  entry - the configuration object
Parameters:
  param - the name of the request parameter
Parameters:
  value - the value of the column
Parameters:
  rowIndex - the index of the current row for manyrows inserts



setRequestAttribute
protected void setRequestAttribute(Request request, String key, Object value)(Code)
Store a key/value pair in the request attributes. We prefix the key with the name of this class to prevent potential name collisions.



Methods inherited from org.apache.cocoon.acting.AbstractComplementaryConfigurableAction
protected Configuration getConfiguration(String descriptor) throws ConfigurationException(Code)(Java Doc)
protected Configuration getConfiguration(String descriptor, boolean reloadable) throws ConfigurationException(Code)(Java Doc)
protected Configuration getConfiguration(String descriptor, SourceResolver resolver, boolean reloadable) throws ConfigurationException(Code)(Java Doc)

Fields inherited from org.apache.cocoon.acting.ConfigurableServiceableAction
protected ServiceManager manager(Code)(Java Doc)

Methods inherited from org.apache.cocoon.acting.ConfigurableServiceableAction
public void service(ServiceManager manager) throws ServiceException(Code)(Java Doc)

Fields inherited from org.apache.cocoon.acting.AbstractConfigurableAction
protected HashMap settings(Code)(Java Doc)

Methods inherited from org.apache.cocoon.acting.AbstractConfigurableAction
public void configure(Configuration conf) throws ConfigurationException(Code)(Java Doc)

Fields inherited from org.apache.cocoon.acting.AbstractAction
final protected static Map EMPTY_MAP(Code)(Java Doc)


www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.