This is an automated email from the ASF dual-hosted git repository.
doebele pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/empire-db.git
The following commit(s) were added to refs/heads/master by this push:
new 01ed47c7 EMPIREDB-386 More Javadoc fixes
01ed47c7 is described below
commit 01ed47c7088fd56dc5e837ba80b029477ccc4fcf
Author: Rainer Döbele <[email protected]>
AuthorDate: Fri Apr 14 14:49:09 2023 +0200
EMPIREDB-386
More Javadoc fixes
---
.../apache/empire/db/codegen/CodeGenWriter.java | 10 ++--
.../apache/empire/db/codegen/CodeGenerator.java | 21 ++++++---
.../apache/empire/db/codegen/WriterService.java | 55 +++++++++++++++++-----
.../apache/empire/db/codegen/util/FileUtils.java | 13 ++---
.../org/apache/empire/jsf2/app/FacesUtils.java | 7 ++-
.../empire/jsf2/app/WebAppStartupListener.java | 2 +-
.../org/apache/empire/jsf2/app/WebApplication.java | 32 +++++++++----
.../org/apache/empire/jsf2/app/WebDBContext.java | 7 ++-
.../apache/empire/jsf2/components/ControlTag.java | 7 +--
.../org/apache/empire/jsf2/components/LinkTag.java | 4 +-
.../apache/empire/jsf2/controls/InputControl.java | 19 +++-----
.../empire/jsf2/impl/FacesImplementation.java | 9 ++++
.../jsf2/pageelements/BeanListPageElement.java | 22 +++++----
.../empire/jsf2/pageelements/ListPageElement.java | 6 ++-
.../jsf2/pageelements/RecordPageElement.java | 10 ++--
.../apache/empire/jsf2/pages/PageDefinitions.java | 10 ++--
.../org/apache/empire/jsf2/pages/PageElement.java | 10 ++--
.../org/apache/empire/jsf2/utils/ParameterMap.java | 41 ++++++++--------
.../empire/jsf2/utils/TagEncodingHelper.java | 1 +
.../jsf2/utils/ValueExpressionUnwrapper.java | 14 +++---
20 files changed, 187 insertions(+), 113 deletions(-)
diff --git
a/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenWriter.java
b/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenWriter.java
index 8e8df1bf..79cb934a 100644
---
a/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenWriter.java
+++
b/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenWriter.java
@@ -87,7 +87,9 @@ public class CodeGenWriter {
private File viewDir;
/**
- * Constructor
+ * Constructor
+ * @param config the config object
+ * @param writerService the writer service
*/
public CodeGenWriter(CodeGenConfig config, WriterService writerService)
{
this.writerService = writerService;
@@ -116,7 +118,7 @@ public class CodeGenWriter {
/**
* Overload using standard WriterService
- * @param config
+ * @param config the config object
*/
public CodeGenWriter(CodeGenConfig config) {
this(config, new WriterService(config));
@@ -125,8 +127,8 @@ public class CodeGenWriter {
/**
* Generates the java code files for the database
*
- * @param db
- * the DBDatabase to generate files for
+ * @param db the DBDatabase to generate files for
+ * @return the generates files
*/
public List<File> generateCodeFiles(DBDatabase db) {
List<File> generatedFiles = new ArrayList<File>();
diff --git
a/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenerator.java
b/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenerator.java
index c11b907b..e47f631c 100644
---
a/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenerator.java
+++
b/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenerator.java
@@ -53,6 +53,7 @@ public class CodeGenerator {
/**
* Starts the actual generation according to the provided config file
+ * @param configFile the config file name
*/
public void generate(final String configFile) {
// load configuration file
@@ -63,6 +64,7 @@ public class CodeGenerator {
/**
* Starts the actual generation according to the provided config file
+ * @param config the config object
*/
public void generate(final CodeGenConfig config) {
// get the DBMS
@@ -73,10 +75,13 @@ public class CodeGenerator {
generate(dbms, conn, config);
}
- /**
- * Starts the actual generation according to the provided configuration
- */
- public void generate(DBMSHandler dbms, Connection conn, CodeGenConfig
config) {
+ /**
+ * Starts the actual generation according to the provided configuration
+ * @param dbms the database handler
+ * @param conn the database connection
+ * @param config the config object
+ */
+ public void generate(DBMSHandler dbms, Connection conn, CodeGenConfig
config) {
// log all options
listOptions(config);
@@ -101,8 +106,8 @@ public class CodeGenerator {
/**
* Loads the configuration file and
- * @param configFile
- * @return
+ * @param configFile the config file name
+ * @return the config object
*/
protected CodeGenConfig loadConfig(String configFile){
// Init Configuration
@@ -135,6 +140,8 @@ public class CodeGenerator {
* JDBC url, user and password for the connection are obtained from the
SampleConfig bean
* Please use the config.xml file to change connection params.
* </PRE>
+ * @param config the config object
+ * @return the database connection
*/
protected Connection getJDBCConnection(CodeGenConfig config)
{
@@ -173,6 +180,8 @@ public class CodeGenerator {
/**
* Creates an Empire-db DatabaseDriver for the given provider and applies
dbms specific configuration
+ * @param config the config object
+ * @return the database handler
*/
protected DBMSHandler getDBMSHandler(CodeGenConfig config)
{
diff --git
a/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/WriterService.java
b/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/WriterService.java
index aaebe516..877097dd 100644
---
a/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/WriterService.java
+++
b/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/WriterService.java
@@ -70,6 +70,8 @@ public class WriterService {
/**
* Returns the instance name of a table
+ * @param t the table
+ * @return the table name
*/
public String getTableName(DBTable t) {
return StringUtils.toString(config.getTableNamePrefix(), "")
@@ -78,6 +80,8 @@ public class WriterService {
/**
* Returns the instance name of a view
+ * @param v the view
+ * @return the view name
*/
public String getViewName(DBView v) {
return StringUtils.toString(config.getViewNamePrefix(), "")
@@ -86,6 +90,8 @@ public class WriterService {
/**
* Returns the instance name of a rowset
+ * @param r the rowset
+ * @return the rowset name
*/
public String getRowsetName(DBRowSet r) {
// use same as table
@@ -95,6 +101,8 @@ public class WriterService {
/**
* Returns the instance name of a column
+ * @param c the column
+ * @return the column name
*/
public String getColumnName(DBColumn c) {
return StringUtils.toString(config.getColumnNamePrefix(), "")
@@ -103,6 +111,8 @@ public class WriterService {
/**
* Returns the java table class name for a given table name.
+ * @param tableName the table name
+ * @return the table class name
*/
public String getTableClassName(String tableName)
{
@@ -113,6 +123,8 @@ public class WriterService {
/**
* Returns the java table class name for a given view name.
+ * @param viewName the view name
+ * @return the view class name
*/
public String getViewClassName(String viewName)
{
@@ -123,8 +135,8 @@ public class WriterService {
/**
* Returns the java record class name for a given table name.
- *
* @param tableName the table name
+ * @return the record class name
*/
public String getRecordClassName(String tableName)
{
@@ -134,6 +146,7 @@ public class WriterService {
/**
* Returns the "getter" name for a given DBColumn.
* @param column the column
+ * @return the getter function name
*/
public String getAccessorName(DBColumn column)
{
@@ -143,6 +156,7 @@ public class WriterService {
/**
* Returns the "setter" name for a given DBColumn
* @param column the column
+ * @return the setter function name
*/
public String getMutatorName(DBColumn column)
{
@@ -162,6 +176,7 @@ public class WriterService {
* uses this information to generate the neccessary import expression.
*
* @param table the table to inspect
+ * @return true if the table has a BigDecimal field
*/
public boolean hasBigDecimalField(DBTable table)
{
@@ -180,6 +195,7 @@ public class WriterService {
* uses this information to generate the neccessary import expression.
*
* @param table the table to inspect
+ * @return true if the table has a Date field
*/
public boolean hasDateField(DBTable table)
{
@@ -197,6 +213,7 @@ public class WriterService {
* Returns whether the given table has a locking column or not.
*
* @param table the table to inspect
+ * @return true if the table has a locking column
*/
public boolean hasLockingColumn(DBTable table)
{
@@ -207,6 +224,7 @@ public class WriterService {
* Returns the corresponding java type of the given empire DataType.
*
* @param column the column to get the type for
+ * @return the column's java type
*/
public Class<?> getJavaType(DBColumn column)
{
@@ -257,6 +275,8 @@ public class WriterService {
/**
* Returns the empire DataType of the given DBColumn.
+ * @param c the column
+ * @return the data type
*/
public DataType getDataType(DBColumn c)
{
@@ -266,6 +286,8 @@ public class WriterService {
/**
* Returns the default value of the given DBColumn.
+ * @param c the column
+ * @return the default value
*/
protected String getDefaultValue(DBColumn c)
{
@@ -284,6 +306,8 @@ public class WriterService {
/**
* Returns the list of key columns
+ * @param t the table
+ * @return the key columns
*/
public String getKeyColumns(DBTable t)
{
@@ -300,6 +324,8 @@ public class WriterService {
/**
* Derives a java class name from a database table name.
+ * @param name the table name
+ * @return the java class name
*/
protected String deriveClassName(String name)
{
@@ -339,9 +365,9 @@ public class WriterService {
/**
* Derives the accessor method name based on the attribute name.
*
- * @param attribute
- * @param isBoolean
- * @return
+ * @param attribute the attribute name
+ * @param type the java type
+ * @return the accessor method name (get or is)
*/
protected String deriveAccessorName(String attribute, Class<?> type)
{
@@ -349,10 +375,14 @@ public class WriterService {
}
/**
- * We need to alter both getter and setter if the method name will
- * conflict with existing methods DBRecord. This will check both
- * so that getter and setter have matching suffixes if one or
- * the other conflicts with an existing method.
+ * We need to alter both getter and setter if the method name will
+ * conflict with existing methods DBRecord. This will check both
+ * so that getter and setter have matching suffixes if one or
+ * the other conflicts with an existing method.
+ * @param attribute the attribute
+ * @param type the java type
+ * @param isGetter flag whether getter or setter is required
+ * @return the method name
*/
protected String deriveRecordMethodName(String attribute, Class<?>
type, boolean isGetter) {
attribute = deriveAttributeName(attribute);
@@ -403,8 +433,9 @@ public class WriterService {
/**
* Derives the mutator method name based on the attribute name.
*
- * @param attribute
- * @return
+ * @param attribute the attribute
+ * @param type the java type
+ * @return the mutator method name
*/
protected String deriveMutatorName(String attribute, Class<?> type)
{
@@ -414,8 +445,8 @@ public class WriterService {
/**
* Derives the attribute name based on the column name.
*
- * @param attribute
- * @return
+ * @param column the column name
+ * @return the attribute name
*/
protected String deriveAttributeName(String column)
{
diff --git
a/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/util/FileUtils.java
b/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/util/FileUtils.java
index 5360735d..a1fcbb01 100644
---
a/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/util/FileUtils.java
+++
b/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/util/FileUtils.java
@@ -50,8 +50,9 @@ public class FileUtils {
/**
* Creates a directory structure due to a java package name within the
specified folder.
- * @param target, the target folder
- * @param pack, the java package name
+ * @param target the target folder
+ * @param pack the java package name
+ * @return the file
*/
public static File getFileFromPackage(File target, String pack) {
StringBuilder sb = new StringBuilder();
@@ -68,7 +69,7 @@ public class FileUtils {
* Recursively cleans (removes) all files under the given
* directory. Note that this removes all sub-directories
* but not the parent directory.
- * @param directory
+ * @param directory the directory
*/
public static void cleanDirectory(File directory) {
boolean success;
@@ -96,7 +97,7 @@ public class FileUtils {
/**
* Recursively deletes a directory and everything under it.
*
- * @param directory
+ * @param directory the directory
* @return true on success
*/
public static boolean deleteDirectory(File directory) {
@@ -120,7 +121,7 @@ public class FileUtils {
/**
* Non-recursive delete for all files in the given directory.
* Files in sub-directories not deleted.
- * @param directory
+ * @param directory the directory
*/
// TODO remove as not in use?
public static void deleteFiles(File directory) {
@@ -249,7 +250,7 @@ public class FileUtils {
/**
* Closes a closeable and logs exceptions
- * @param closeable
+ * @param closeable a closeable object
*/
public static void close(Closeable closeable)
{
diff --git
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/app/FacesUtils.java
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/app/FacesUtils.java
index 47c11eee..131fbf16 100644
--- a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/app/FacesUtils.java
+++ b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/app/FacesUtils.java
@@ -282,6 +282,11 @@ public class FacesUtils
/* PageResource-map */
public static final String PAGE_RESOURCE_MAP_ATTRIBUTE = "pageResources";
/** use el-expression: #{pageResources.xxx} **/
+ /**
+ * returns the page resource map
+ * @param fc the faces context
+ * @return the ressource map
+ */
@SuppressWarnings("unchecked")
public static Map<String, Object> getPageResourceMap(final FacesContext fc)
{
@@ -414,7 +419,7 @@ public class FacesUtils
}
*/
- /**
+ /*
* indicates whether submitted values in InputControl should be cleared or
preserved.
* Default is true.
* @param fc the faces context
diff --git
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/app/WebAppStartupListener.java
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/app/WebAppStartupListener.java
index a8531d6d..accccf4d 100644
---
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/app/WebAppStartupListener.java
+++
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/app/WebAppStartupListener.java
@@ -76,7 +76,7 @@ public class WebAppStartupListener implements
SystemEventListener
/**
* Detects the JSF Implementation and returns an implmentation handler
class.
* Supported Implementations are Sun Mojarra (2.2.x) and Apache MyFaces
(2.2.x)
- * @return
+ * @return the faces implementation
*/
protected FacesImplementation detectFacesImplementation()
{
diff --git
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/app/WebApplication.java
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/app/WebApplication.java
index 2d1b5574..0cf6f655 100644
---
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/app/WebApplication.java
+++
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/app/WebApplication.java
@@ -75,6 +75,7 @@ public abstract class WebApplication
/**
* Returns the one and only instance of the WebApplication (Singleton)
+ * @param <T> the application type
* @return the WebApplication instance
*/
@SuppressWarnings("unchecked")
@@ -103,7 +104,8 @@ public abstract class WebApplication
/**
* Init the Application
- * @param servletContext
+ * @param facesImpl the faces implementation
+ * @param startupContext the startup context
*/
public final void init(FacesImplementation facesImpl, FacesContext
startupContext)
{
@@ -142,7 +144,7 @@ public abstract class WebApplication
/**
* handle request cleanup
- * @param ctx
+ * @param ctx the faces context
*/
public void onRequestComplete(final FacesContext ctx)
{
@@ -151,8 +153,8 @@ public abstract class WebApplication
/**
* handle view not found
- * @param fc
- * @param HttpServletRequest
+ * @param fc the faces context
+ * @param req the request
*/
public void onViewNotFound(final FacesContext fc, final HttpServletRequest
req)
{ // View not Found Error
@@ -161,8 +163,8 @@ public abstract class WebApplication
/**
* handle view change
- * @param fc
- * @param viewId
+ * @param fc the faces context
+ * @param viewId the view id
*/
public void onChangeView(final FacesContext fc, String viewId)
{ // allow custom view change logic
@@ -173,6 +175,11 @@ public abstract class WebApplication
sm.remove(FacesUtils.PAGE_RESOURCE_MAP_ATTRIBUTE);
}
+ /**
+ * adds a Javascript call to the request
+ * @param fc the faces context
+ * @param function the javascript command
+ */
public void addJavascriptCall(final FacesContext fc, String function)
{
throw new NotSupportedException(this, "addJavascriptCall");
@@ -181,6 +188,7 @@ public abstract class WebApplication
/**
* return the interface for Implementation specific features
* that are specific for Mojarra or MyFaces
+ * @return the faces implementation
*/
public FacesImplementation getFacesImplementation()
{
@@ -189,6 +197,7 @@ public abstract class WebApplication
/**
* returns the web context path as returned from
ServletContext.getContextPath()
+ * @return the web root
*/
public String getWebRoot()
{
@@ -197,6 +206,8 @@ public abstract class WebApplication
/**
* returns the active locale for a given FacesContext
+ * @param ctx the faces context
+ * @return the context locale
*/
public Locale getContextLocale(final FacesContext ctx)
{
@@ -406,8 +417,8 @@ public abstract class WebApplication
/**
* Obtains a JDBC-Connection from the connection pool
- *
- * @return
+ * @param db the database for which to obtain a connection
+ * @return the connection
*/
protected synchronized Connection getConnection(DBDatabase db)
{
@@ -428,6 +439,9 @@ public abstract class WebApplication
/**
* Releases a JDBC-Connection from the connection pool
+ * @param conn the connection to release
+ * @param commit flag whether to commit changes
+ * @param dbrm the rollback manager
*/
protected synchronized void releaseConnection(Connection conn, boolean
commit, DBRollbackManager dbrm)
{
@@ -469,6 +483,7 @@ public abstract class WebApplication
* Obtains a DBRollbackManager for the current request
* @param fc the FacesContext
* @param create if true a DBRollbackManager will be created if not
already present
+ * @return the rollback manager
*/
public DBRollbackManager getRollbackManagerForRequest(FacesContext fc,
boolean create)
{
@@ -485,6 +500,7 @@ public abstract class WebApplication
* @param fc the FacesContext
* @param db the DBDatabase for which to obtain a connection
* @param create if true a Connection will be created if not already
present
+ * @return the connection
*/
public Connection getConnectionForRequest(FacesContext fc, DBDatabase db,
boolean create)
{
diff --git
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/app/WebDBContext.java
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/app/WebDBContext.java
index 788e0c1f..2cd55403 100644
--- a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/app/WebDBContext.java
+++ b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/app/WebDBContext.java
@@ -40,8 +40,6 @@ import org.slf4j.LoggerFactory;
* Important: The connection is obtained on HttpRequest scope and hot held by
the context
* The connection is automatically released via the FacesRequestPhaseListener
* @author rainer
- *
- * @param <DB>
*/
public class WebDBContext<DB extends DBDatabase> extends DBContextBase
implements Serializable
{
@@ -55,6 +53,8 @@ public class WebDBContext<DB extends DBDatabase> extends
DBContextBase implement
/**
* Custom serialization for transient fields.
+ * @param strm the output stream
+ * @throws IOException from strm.defaultWriteObject
*/
private void writeObject(ObjectOutputStream strm) throws IOException
{ // Database
@@ -65,6 +65,9 @@ public class WebDBContext<DB extends DBDatabase> extends
DBContextBase implement
/**
* Custom deserialization for transient fields.
+ * @param strm the input stream
+ * @throws IOException from strm.defaultReadObject
+ * @throws ClassNotFoundException from strm.defaultReadObject
*/
private void readObject(ObjectInputStream strm)
throws IOException, ClassNotFoundException
diff --git
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/ControlTag.java
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/ControlTag.java
index b03f4eb4..c36c1dbb 100644
---
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/ControlTag.java
+++
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/ControlTag.java
@@ -465,8 +465,9 @@ public class ControlTag extends UIInput implements
NamingContainer
/**
* called from LabelSeparatorComponent
- * @param context
+ * @param context the faces context
* @param parent the LabelSeparatorComponent
+ * @throws IOException from ResponseWriter
*/
protected void encodeLabel(FacesContext context, UIComponentBase parent)
throws IOException
@@ -503,9 +504,9 @@ public class ControlTag extends UIInput implements
NamingContainer
/**
* called from InputSeparatorComponent
- * @param context
+ * @param context the faces context
* @param parent the InputSeparatorComponent
- * @throws IOException
+ * @throws IOException from ResponseWriter
*/
protected void encodeInput(FacesContext context, UIComponent parent)
throws IOException
diff --git
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/LinkTag.java
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/LinkTag.java
index 4b72f561..c0a40ed5 100644
---
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/LinkTag.java
+++
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/LinkTag.java
@@ -226,8 +226,8 @@ public class LinkTag extends UIOutput // implements
NamingContainer
/**
* required for MenuItemTag
- * @param context
- * @throws IOException
+ * @param context the faces context
+ * @throws IOException from base
*/
public void forceEncodeChildren(FacesContext context) throws IOException
{
diff --git
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/InputControl.java
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/InputControl.java
index 267369e2..deae57e2 100644
---
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/InputControl.java
+++
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/InputControl.java
@@ -234,7 +234,7 @@ public abstract class InputControl
* @param tooltip the title of the HTML wrapper tag (optional)
* @param vi the value info
* @param context the FacesContext
- * @throws IOException
+ * @throws IOException from ResponseWriter
*/
public void renderValue(UIComponent comp, String tagName, String
styleClass, String tooltip, ValueInfo vi, FacesContext context)
throws IOException
@@ -269,7 +269,7 @@ public abstract class InputControl
* Renders the control value without a surrounding tag (Text only)
* @param vi the value info
* @param writer the output writer
- * @throws IOException
+ * @throws IOException from ResponseWriter
*/
public void renderValue(ValueInfo vi, ResponseWriter writer)
throws IOException
@@ -283,7 +283,7 @@ public abstract class InputControl
* @param comp the JSF component
* @param ii the input info
* @param context the FacesContext
- * @throws IOException
+ * @throws IOException from ResponseWriter
*/
public void renderInput(UIComponent comp, InputInfo ii, FacesContext
context)
throws IOException
@@ -396,10 +396,10 @@ public abstract class InputControl
/**
* adds style attributes related to the current value
- * @param vi
+ * @param vi the value info
* @param value the current value
- * @param styleClass
- * @return
+ * @param styleClass the style class
+ * @return the data value string
*/
protected String addDataValueStyle(ValueInfo vi, Object value, String
styleClass)
{
@@ -496,13 +496,6 @@ public abstract class InputControl
reqMap.remove(clientId);
}
- /**
- * Override this to format a value for output
- *
- * @param value
- * @param ii
- * @return
- */
protected Object formatInputValue(Object value, InputInfo ii)
{
return value;
diff --git
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/impl/FacesImplementation.java
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/impl/FacesImplementation.java
index 84548f6d..25eb1cfd 100644
---
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/impl/FacesImplementation.java
+++
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/impl/FacesImplementation.java
@@ -53,6 +53,9 @@ public interface FacesImplementation
* mbi.setScope(scope);
* rc.addManagedBean(beanName, mbi);
*
+ * @param beanName the bean name
+ * @param beanClass the bean class
+ * @param scope the scope
*/
void registerManagedBean(final String beanName, final String beanClass,
final String scope);
@@ -65,6 +68,9 @@ public interface FacesImplementation
* final Application application = fc.getApplication();
* return application.getELResolver().getValue(elcontext, null, beanName);
*
+ * @param beanName the bean name
+ * @param fc the faces context
+ * @return the bean
*/
public Object getManagedBean(final String beanName, final FacesContext
fc);
@@ -82,6 +88,9 @@ public interface FacesImplementation
* // set Parent
* return cc;
* }
+ *
+ * @param ve the value expression
+ * @return the component
*/
UIComponent getValueParentComponent(final ValueExpression ve);
diff --git
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pageelements/BeanListPageElement.java
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pageelements/BeanListPageElement.java
index d21f9260..92d5f920 100644
---
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pageelements/BeanListPageElement.java
+++
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pageelements/BeanListPageElement.java
@@ -123,7 +123,7 @@ public class BeanListPageElement<T> extends
ListPageElement<T> implements ListIt
* Overload that requires a default sort order to be provided
* @param page the page element
* @param beanClass the bean class
- * @param defaultSortColumn
+ * @param defaultSortColumn the default sort column
* @param propertyName the property name which is used to get and retrieve
session information
*/
public BeanListPageElement(Page page, Class<T> beanClass, DBColumn
defaultSortColumn, String propertyName)
@@ -135,7 +135,7 @@ public class BeanListPageElement<T> extends
ListPageElement<T> implements ListIt
* Overload that requires a default sort order to be provided
* @param page the page element
* @param beanClass the bean class
- * @param defaultSortColumn
+ * @param defaultSortColumn the default sort column
*/
public BeanListPageElement(Page page, Class<T> beanClass, DBColumn
defaultSortColumn)
{
@@ -146,7 +146,7 @@ public class BeanListPageElement<T> extends
ListPageElement<T> implements ListIt
* Overload that requires a default sort order to be provided
* @param page the page element
* @param beanClass the bean class
- * @param rowset required Table or View
+ * @param rowSet required Table or View
*/
public BeanListPageElement(Page page, Class<T> beanClass, DBRowSet rowSet)
{
@@ -242,8 +242,9 @@ public class BeanListPageElement<T> extends
ListPageElement<T> implements ListIt
/**
* Init list items with pagination
*
- * @param queryCmd
- * @param pageSize
+ * @param queryCmd the query command
+ * @param countCmd the count command
+ * @param pageSize the page size
*/
public void initItems(DBCommand queryCmd, DBCommand countCmd, int pageSize)
{
@@ -285,7 +286,8 @@ public class BeanListPageElement<T> extends
ListPageElement<T> implements ListIt
/**
* Init list items without pagination
*
- * @param queryCmd
+ * @param queryCmd the query commmand
+ * @param pageSize the page size
*/
public final void initItems(DBCommand queryCmd, int pageSize)
{
@@ -296,7 +298,7 @@ public class BeanListPageElement<T> extends
ListPageElement<T> implements ListIt
/**
* Init list items without pagination
*
- * @param queryCmd
+ * @param queryCmd the query commmand
*/
public final void initItems(DBCommand queryCmd)
{
@@ -305,7 +307,7 @@ public class BeanListPageElement<T> extends
ListPageElement<T> implements ListIt
/**
* Returns true if (and only if) items are valid but empty
- * @return
+ * @return true if reault is empty
*/
public boolean isResultEmpty()
{
@@ -315,7 +317,7 @@ public class BeanListPageElement<T> extends
ListPageElement<T> implements ListIt
/**
* loads all visible list items from the database
- * @param initScrollbar
+ * @param initScrollbar flag whether to init the scrollbar
*/
protected void loadItems(boolean initScrollbar)
{
@@ -423,7 +425,7 @@ public class BeanListPageElement<T> extends
ListPageElement<T> implements ListIt
/**
* set order by for db queries
*
- * @param cmd
+ * @param cmd the command
*/
protected void setOrderBy(DBCommand cmd)
{
diff --git
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pageelements/ListPageElement.java
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pageelements/ListPageElement.java
index c0c6dd0f..0a99e309 100644
---
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pageelements/ListPageElement.java
+++
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pageelements/ListPageElement.java
@@ -236,7 +236,7 @@ public abstract class ListPageElement<T> extends PageElement
return this.pageSize;
}
- /*** sorting ***/
+ /* sorting */
public String getSortColumnName()
{
@@ -283,7 +283,7 @@ public abstract class ListPageElement<T> extends PageElement
this.sortOrderChanged = sortOrderChanged;
}
- /*** pagination ***/
+ /* pagination */
public int getPosition()
{
@@ -334,6 +334,7 @@ public abstract class ListPageElement<T> extends PageElement
/**
* set the next x entries
+ * @param e the action event
*/
public void nextPage(ActionEvent e)
{
@@ -353,6 +354,7 @@ public abstract class ListPageElement<T> extends PageElement
/**
* set the prev x entries
+ * @param e the action event
*/
public void prevPage(ActionEvent e)
{
diff --git
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pageelements/RecordPageElement.java
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pageelements/RecordPageElement.java
index 1fb1c4a9..44890653 100644
---
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pageelements/RecordPageElement.java
+++
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pageelements/RecordPageElement.java
@@ -132,7 +132,8 @@ public class RecordPageElement<T extends DBRecord> extends
PageElement
}
/**
- * loads the record identified by the supplied key from the database<BR>
+ * loads the record identified by the supplied key from the database
+ * @param recKey the record key
*/
public void loadRecord(Object[] recKey)
{
@@ -150,7 +151,7 @@ public class RecordPageElement<T extends DBRecord> extends
PageElement
/**
* loads an existing record
- * @param idParam
+ * @param idParam the id param
*/
public void loadRecord(String idParam)
{
@@ -161,8 +162,8 @@ public class RecordPageElement<T extends DBRecord> extends
PageElement
/**
* loads an existing record the the specified page
*
- * @param page
- * @param idParam
+ * @param page the page
+ * @param idParam the id param
*/
public void loadRecord(PageDefinition page, String idParam) {
Object[] key = getPage().getKeyFromParam(page, rowset, idParam);
@@ -182,6 +183,7 @@ public class RecordPageElement<T extends DBRecord> extends
PageElement
/**
* updates or inserts the record in the database
+ * @return true if the record was modified and successfully udpated
*/
public boolean updateRecord()
{
diff --git
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pages/PageDefinitions.java
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pages/PageDefinitions.java
index 15adaa56..23b866ba 100644
---
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pages/PageDefinitions.java
+++
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pages/PageDefinitions.java
@@ -65,7 +65,7 @@ public abstract class PageDefinitions // *Deprecated*
implements Serializable
/**
* Register page beans with the BeanManager
- * @param facesImpl
+ * @param facesImpl the faces implementation
*/
public void registerPageBeans(FacesImplementation facesImpl)
{
@@ -82,7 +82,7 @@ public abstract class PageDefinitions // *Deprecated*
implements Serializable
/**
* returns the page uri extension
- * @return
+ * @return the page uri extension
*/
public String getPageUriExtension()
{
@@ -105,7 +105,7 @@ public abstract class PageDefinitions // *Deprecated*
implements Serializable
/**
* returns true if the view exists in the page map or false otherwise
- * @param viewId
+ * @param viewId the view id
* @return true if the view exists in the page map or false otherwise
*/
public boolean containsView(String viewId)
@@ -126,7 +126,7 @@ public abstract class PageDefinitions // *Deprecated*
implements Serializable
/**
* returns a page definition for a given viewId
- * @param viewId
+ * @param viewId the view id
* @return the page definition
*/
public PageDefinition getPageFromViewId(String viewId)
@@ -148,7 +148,7 @@ public abstract class PageDefinitions // *Deprecated*
implements Serializable
/**
* register a page. Called internally from PageDefinition constructor!
* Do not call yourself.
- * @param pageDef
+ * @param pageDef the page definition
*/
protected static void registerPage(PageDefinition pageDef)
{
diff --git
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pages/PageElement.java
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pages/PageElement.java
index 58a65a78..9f286574 100644
--- a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pages/PageElement.java
+++ b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pages/PageElement.java
@@ -71,12 +71,8 @@ public class PageElement // *Deprecated* implements
Serializable
// Chance to init the page
}
- /**
- * Session Object handling
- *
- * @param type
- * @return
- */
+ /* Session Object handling */
+
@SuppressWarnings("unchecked")
protected <T> T getSessionObject(Class<T> type)
{
@@ -114,7 +110,7 @@ public class PageElement // *Deprecated* implements
Serializable
/**
* generates a default property name for the bean list
- * @param rowset
+ * @param rowset the rowset
* @return a propertyName
*/
protected static String getDefaultPropertyName(DBRowSet rowset)
diff --git
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/utils/ParameterMap.java
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/utils/ParameterMap.java
index cebc574c..d5372196 100644
---
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/utils/ParameterMap.java
+++
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/utils/ParameterMap.java
@@ -116,7 +116,7 @@ public class ParameterMap // *Deprecated* implements
Serializable
/**
* gets a unique name for a given rowset
- * @param rowset
+ * @param rowset the rowset
* @return a unique name for the given rowset
*/
protected String getRowSetTypeName(DBRowSet rowset)
@@ -132,9 +132,9 @@ public class ParameterMap // *Deprecated* implements
Serializable
/**
* puts an object into the parameter map
- * @param typeName
- * @param id
- * @param value
+ * @param typeName the type name
+ * @param encodedId the id
+ * @param item the object
*/
protected void putValue(String typeName, String encodedId, Object item)
{ // put in Table
@@ -152,9 +152,10 @@ public class ParameterMap // *Deprecated* implements
Serializable
/**
* encodes the objectKey and stores the item in the parameter map
- * @param typeName
- * @param id
- * @param value
+ * @param typeName the type name
+ * @param objectKey the object key
+ * @param item the object
+ * @param useCache flag whether to cache the objectKey
*/
protected String encodeAndStore(String typeName, String objectKey, Object
item, boolean useCache)
{ // Generate the id
@@ -173,8 +174,8 @@ public class ParameterMap // *Deprecated* implements
Serializable
/**
* Puts an object into the paramter map that implements the
ParameterObject interface
- * @param paramObject
- * @return
+ * @param paramObject the param object
+ * @return the encoded object
*/
public String put(ParameterObject paramObject)
{
@@ -209,10 +210,10 @@ public class ParameterMap // *Deprecated* implements
Serializable
/**
* Generates an idParam which is only valid for the given page.
- * @param targetPage
- * @param rowset
- * @param key
- * @return
+ * @param targetPage the target page
+ * @param rowset the rowset
+ * @param key the key
+ * @return the encoded object
*/
public String put(PageDefinition targetPage, DBRowSet rowset, Object[]
key) {
// Generate id and put in map
@@ -242,9 +243,9 @@ public class ParameterMap // *Deprecated* implements
Serializable
/**
* Puts an object into the paramter map that implements the
ParameterObject interface
- * @param paramType
- * @param id
- * @return
+ * @param paramType the param type
+ * @param id the item id
+ * @return the object
*/
@SuppressWarnings("unchecked")
public <T extends ParameterObject> T get(Class<T> paramType, String id)
@@ -286,10 +287,10 @@ public class ParameterMap // *Deprecated* implements
Serializable
/**
* returns an record key for a given page
- * @param page
- * @param rowset
- * @param id
- * @return
+ * @param page the page
+ * @param rowset the rowset
+ * @param id the object id
+ * @return the object key
*/
public Object[] getKey(PageDefinition page, DBRowSet rowset, String id)
{
diff --git
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/utils/TagEncodingHelper.java
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/utils/TagEncodingHelper.java
index 0edd27ef..2d32a747 100644
---
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/utils/TagEncodingHelper.java
+++
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/utils/TagEncodingHelper.java
@@ -961,6 +961,7 @@ public class TagEncodingHelper implements NamingContainer
/**
* used for partial submits to detect whether the value of this field can
be set to null
+ * @return true if the column is required of false otherwise
*/
public boolean isTempoaryNullable()
{
diff --git
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/utils/ValueExpressionUnwrapper.java
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/utils/ValueExpressionUnwrapper.java
index 505e22fe..1a6c60af 100644
---
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/utils/ValueExpressionUnwrapper.java
+++
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/utils/ValueExpressionUnwrapper.java
@@ -36,17 +36,17 @@ import org.slf4j.LoggerFactory;
* IMPORTANT: The expression in the Facelet-Tag must use a '$' character
instead of a '#'
*
* Here is an example for such a tag
- <ui:composition
+ <ui:composition
xmlns="http://www.w3.org/1999/xhtml"
- xmlns:e="http://java.sun.com/jsf/composite/empire">
- <tr>
- <e:control
+ xmlns:e="http://java.sun.com/jsf/composite/empire">
+ <tr>
+ <e:control
column="#{column}"
record="#{record}"
value="${value}"
- </e:control>
- </tr>
- </ui:composition>
+ </e:control>
+ </tr>
+ </ui:composition>
*
* In this example the "${value}" will be unwrapped from the TagEncodingHelper
in order to dectect
* whether or not an expression has been provided.