[cvs] expresso commit by rimovm: Use of constants instead of field names.

JCorporate Ltd jcorp at jcorporate.com
Thu Dec 9 22:02:50 UTC 2004


Log Message:
-----------
Use of constants instead of field names. A few checkstyle errors fixed, a few javadoc errors fixed.

Modified Files:
--------------
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj:
        SecuredDBObject.java

Revision Data
-------------
Index: SecuredDBObject.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/SecuredDBObject.java,v
retrieving revision 1.56
retrieving revision 1.57
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/SecuredDBObject.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/SecuredDBObject.java -u -r1.56 -r1.57
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/SecuredDBObject.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/SecuredDBObject.java
@@ -164,6 +164,7 @@
 
     /**
      * Constructor
+     * @throws DBException upon construction error.
      */
     public SecuredDBObject()
             throws DBException {
@@ -176,6 +177,7 @@
      *
      * @param newConnection The dbConnection object to associate with this
      *                      object
+     * @throws DBException upon construction error.
      */
     public SecuredDBObject(DBConnection newConnection)
             throws DBException {
@@ -199,6 +201,7 @@
      * @param setupTablesContext The data context that contains the setup (and
      *                           security) tables for this object
      * @since Expresso 5.0.1
+     * @throws DBException upon construction error.
      */
     public SecuredDBObject(DBConnection newConnection, String setupTablesContext)
             throws DBException {
@@ -303,6 +306,7 @@
      *
      * @param dbKey   db/Context key for the context being requested
      * @param theUser User id of the user requesting access
+     * @throws DBException upon construction error.
      */
     public SecuredDBObject(String dbKey, int theUser)
             throws DBException {
@@ -329,6 +333,7 @@
      * @param requestedFunction (A)dd, (U)pdate, (D)elete, (S)earch
      * @return boolean: true if the operation is allowed, or false if it is not
      * @see #isAllowed
+     * @throws DBException upon construction error.
      */
     public boolean checkAllowed(String requestedFunction)
             throws DBException {
@@ -415,6 +420,7 @@
      *                          <li>D: Delete<li>
      *                          </ol>
      * @throws DBException If the requested operation is not permitted to this user
+     * @throws SecurityException if the user is not allowed access to the object.
      */
     public void isAllowed(String requestedFunction)
             throws SecurityException, DBException {
@@ -506,7 +512,7 @@
                     for (Iterator esec = dbSec.searchAndRetrieveList().iterator();
                          esec.hasNext();) {
                         oneSec = (DBObjSecurity) esec.next();
-                        newSec = oneSec.getField("MethodCode");
+                        newSec = oneSec.getField(DBObjSecurity.METHOD_ALLOWED_CODE);
 
                         /* if we already have the permission, don't add it again */
                         if (currentSecurity.toString().indexOf(newSec) < 0) {
@@ -818,7 +824,7 @@
     }
 
     /**
-     * Security check on count
+     * Security check on count.
      *
      * @return the count
      * @throws com.jcorporate.expresso.core.db.DBException
@@ -831,7 +837,8 @@
     }
 
     /**
-     * Security check on deleteAll
+     * Security check on deleteAll.
+     * @throws DBException upon isAllowed() check error.
      */
     public synchronized void deleteAll() throws com.jcorporate.expresso.core.db.DBException {
         isAllowed(DELETE);
@@ -839,7 +846,7 @@
     }
 
     /**
-     * determine if getRequestingUid has rights to read this kind of object
+     * Determine if getRequestingUid has rights to read this kind of object.
      * (not just this particular object, but ALL INSTANCES of this kind of object)
      *
      * @return true  if getRequestingUid has rights to read this row
@@ -877,7 +884,7 @@
     }
 
     /**
-     * determine if getRequestingUid has rights to add this kind of object
+     * Determine if getRequestingUid has rights to add this kind of object.
      * (not just this particular object, but ALL INSTANCES of this kind of object)
      *
      * @return true if requesting id has permission to add
@@ -915,7 +922,7 @@
     }
 
     /**
-     * determine if getRequestingUid has rights to delete this kind of object
+     * Determine if getRequestingUid has rights to delete this kind of object.
      * (not just this particular object, but ALL INSTANCES of this kind of object)
      *
      * @return true if requesting id has permission to delete
@@ -953,7 +960,7 @@
     }
 
     /**
-     * determine if getRequestingUid has rights to update this kind of object
+     * Determine if getRequestingUid has rights to update this kind of object.
      * (not just this particular object, but ALL INSTANCES of this kind of object)
      *
      * @return true if requesting id has permission to update


More information about the cvs mailing list