[cvs] expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj RegistrationDomain.java

JCorporate Ltd jcorp at jcorp2.servlets.net
Thu Sep 9 11:46:05 PDT 2004


Update of /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj
In directory jcorp2.servlets.net:/tmp/cvs-serv13202/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj

Modified Files:
	RegistrationDomain.java 
Log Message:
cosmetic: reformat only


Index: RegistrationDomain.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/dbobj/RegistrationDomain.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** RegistrationDomain.java	18 Feb 2004 23:12:02 -0000	1.14
--- RegistrationDomain.java	9 Sep 2004 18:46:03 -0000	1.15
***************
*** 88,103 ****
   * @author Shash Chatterjee
   */
! public class RegistrationDomain extends SecuredDBObject
! {
      /**
       * Default constructor
       *
!      * @exception DBException The exception description.
       */
!     public RegistrationDomain() throws DBException
!     {
          super();
      }
!      /* RegistrationDomain() */
  
      /**
--- 88,101 ----
   * @author Shash Chatterjee
   */
! public class RegistrationDomain extends SecuredDBObject {
      /**
       * Default constructor
       *
!      * @throws DBException The exception description.
       */
!     public RegistrationDomain() throws DBException {
          super();
      }
!     /* RegistrationDomain() */
  
      /**
***************
*** 106,114 ****
       *
       * @param uid the Uid of the user context
-      *
       * @throws DBException if there's an initialization problem
       */
!     public RegistrationDomain(int uid) throws DBException
!     {
          super(uid);
      }
--- 104,110 ----
       *
       * @param uid the Uid of the user context
       * @throws DBException if there's an initialization problem
       */
!     public RegistrationDomain(int uid) throws DBException {
          super(uid);
      }
***************
*** 120,128 ****
       *
       * @param request - The controller request handed to you by the framework.
-      *
       * @throws DBException upon initialization error
       */
!     public RegistrationDomain(RequestContext request) throws DBException
!     {
          super(request);
      }
--- 116,122 ----
       *
       * @param request - The controller request handed to you by the framework.
       * @throws DBException upon initialization error
       */
!     public RegistrationDomain(RequestContext request) throws DBException {
          super(request);
      }
***************
*** 133,143 ****
       *
       * @param fieldName Field name for which values are requested
-      *
       * @return Vector The ValidValues field
-      *
       * @throws DBException If the values cannot be retrieved
       */
!     public Vector getValidValues(String fieldName) throws DBException
!     {
          if (fieldName.equals("RegRequired") || fieldName.equals("Approve") ||
                  fieldName.equals("UserPasswd") ||
--- 127,134 ----
       *
       * @param fieldName Field name for which values are requested
       * @return Vector The ValidValues field
       * @throws DBException If the values cannot be retrieved
       */
!     public Vector getValidValues(String fieldName) throws DBException {
          if (fieldName.equals("RegRequired") || fieldName.equals("Approve") ||
                  fieldName.equals("UserPasswd") ||
***************
*** 150,163 ****
              return myValues;
          }
!         
          if (fieldName.equals("NotApprovedGrp")) {
! 			Vector myValues = super.getValidValues(fieldName);
! 			myValues.add(0, new ValidValue("", getString("notSelected"))); 
! 			return myValues;
          }
  
          return super.getValidValues(fieldName);
      }
!      /* getValidValues(String) */
  
      /**
--- 141,154 ----
              return myValues;
          }
! 
          if (fieldName.equals("NotApprovedGrp")) {
!             Vector myValues = super.getValidValues(fieldName);
!             myValues.add(0, new ValidValue("", getString("notSelected")));
!             return myValues;
          }
  
          return super.getValidValues(fieldName);
      }
!     /* getValidValues(String) */
  
      /**
***************
*** 165,176 ****
       *
       * @return Vector of ValidValue objects
-      *
-      * @throws DBException
       */
!     public Vector getValues() throws DBException
!     {
          return getValuesDefault("RegDomId", "Name");
      }
!      /* getValues() */
  
      /**
--- 156,164 ----
       *
       * @return Vector of ValidValue objects
       */
!     public Vector getValues() throws DBException {
          return getValuesDefault("RegDomId", "Name");
      }
!     /* getValues() */
  
      /**
***************
*** 178,189 ****
       * provide an unique id
       *
!      * @throws com.jcorporate.expresso.core.db.DBException DOCUMENT ME!
       * @throws DBException If the next number could not be allocated or the add
!      *         fails
!      *
!      * @see com.jcorporate.expresso.core.dbobj.SecuredDBObj#add
       */
!     public void add() throws com.jcorporate.expresso.core.db.DBException
!     {
          RegistrationDomain rd = new RegistrationDomain();
          rd.setDataContext(getDataContext());
--- 166,176 ----
       * provide an unique id
       *
!      * @throws com.jcorporate.expresso.core.db.DBException
!      *                     DOCUMENT ME!
       * @throws DBException If the next number could not be allocated or the add
!      *                     fails
!      * @see com.jcorporate.expresso.core.dbobj.SecuredDBObject#add
       */
!     public void add() throws com.jcorporate.expresso.core.db.DBException {
          RegistrationDomain rd = new RegistrationDomain();
          rd.setDataContext(getDataContext());
***************
*** 192,196 ****
          if (rd.find()) {
              throw new DBException("Registration domain \"" +
!                 rd.getField("Name") + "\" already exists.");
          }
  
--- 179,183 ----
          if (rd.find()) {
              throw new DBException("Registration domain \"" +
!                     rd.getField("Name") + "\" already exists.");
          }
  
***************
*** 231,235 ****
          super.add();
      }
!      /* add() */
  
      /**
--- 218,222 ----
          super.add();
      }
!     /* add() */
  
      /**
***************
*** 238,249 ****
       *
       * @param dbContext the database context name
-      *
       * @return Registration domain object
-      *
       * @throws DBException upon construction failure
       */
!     public static RegistrationDomain buildDefaultRegistrationDomain(
!         String dbContext) throws DBException
!     {
          String regDomain = Setup.getValueRequired(dbContext, "defaultRegDomain");
          RegistrationDomain rd = new RegistrationDomain(SecuredDBObject.SYSTEM_ACCOUNT);
--- 225,232 ----
       *
       * @param dbContext the database context name
       * @return Registration domain object
       * @throws DBException upon construction failure
       */
!     public static RegistrationDomain buildDefaultRegistrationDomain(String dbContext) throws DBException {
          String regDomain = Setup.getValueRequired(dbContext, "defaultRegDomain");
          RegistrationDomain rd = new RegistrationDomain(SecuredDBObject.SYSTEM_ACCOUNT);
***************
*** 254,260 ****
              return rd;
          } else {
!             throw new DBException(
!                 "Unable to locate default registration domain: '" + regDomain +
!                 "'");
          }
      }
--- 237,242 ----
              return rd;
          } else {
!             throw new DBException("Unable to locate default registration domain: '" + regDomain +
!                     "'");
          }
      }
***************
*** 264,278 ****
       *
       * @return Controller instance that performs registration
-      *
       * @throws DBException upon error
       */
!     public Controller getRegistrationObject() throws DBException
!     {
          StringUtil.assertNotBlank(this.getField("ControllerClass"),
!             "Invalid Registration ControllerClassname for this object");
  
          try {
!             return ConfigManager.getControllerFactory().getController(this.getField(
!                     "ControllerClass"));
          } catch (com.jcorporate.expresso.core.controller.ControllerException ce) {
              throw new DBException("Error creating Registration controller", ce);
--- 246,257 ----
       *
       * @return Controller instance that performs registration
       * @throws DBException upon error
       */
!     public Controller getRegistrationObject() throws DBException {
          StringUtil.assertNotBlank(this.getField("ControllerClass"),
!                 "Invalid Registration ControllerClassname for this object");
  
          try {
!             return ConfigManager.getControllerFactory().getController(this.getField("ControllerClass"));
          } catch (com.jcorporate.expresso.core.controller.ControllerException ce) {
              throw new DBException("Error creating Registration controller", ce);
***************
*** 284,294 ****
       * entries
       *
!      * @throws com.jcorporate.expresso.core.db.DBException If the next number
!      *         could not be allocated or the add fails
!      *
!      * @see com.jcorporate.expresso.core.dbobj.SecuredDBObj#delete
       */
!     public void delete() throws com.jcorporate.expresso.core.db.DBException
!     {
          RegistrationObjectMap rom = new RegistrationObjectMap();
          rom.setDataContext(getDataContext());
--- 263,272 ----
       * entries
       *
!      * @throws com.jcorporate.expresso.core.db.DBException
!      *          If the next number
!      *          could not be allocated or the add fails
!      * @see com.jcorporate.expresso.core.dbobj.SecuredDBObject#delete
       */
!     public void delete() throws com.jcorporate.expresso.core.db.DBException {
          RegistrationObjectMap rom = new RegistrationObjectMap();
          rom.setDataContext(getDataContext());
***************
*** 308,317 ****
       * Extends the usual update method to check for duplicate entries
       *
!      * @throws com.jcorporate.expresso.core.db.DBException DOCUMENT ME!
       * @throws DBException If the next number could not be allocated or the add
!      *         fails
       */
!     public void update() throws com.jcorporate.expresso.core.db.DBException
!     {
          RegistrationDomain rd = new RegistrationDomain();
          rd.setDataContext(getDataContext());
--- 286,295 ----
       * Extends the usual update method to check for duplicate entries
       *
!      * @throws com.jcorporate.expresso.core.db.DBException
!      *                     DOCUMENT ME!
       * @throws DBException If the next number could not be allocated or the add
!      *                     fails
       */
!     public void update() throws com.jcorporate.expresso.core.db.DBException {
          RegistrationDomain rd = new RegistrationDomain();
          rd.setDataContext(getDataContext());
***************
*** 321,325 ****
                  (!rd.getField("RegDomId").equals(this.getField("RegDomId")))) {
              throw new DBException("Registration domain \"" +
!                 rd.getField("Name") + "\" already exists.");
          }
  
--- 299,303 ----
                  (!rd.getField("RegDomId").equals(this.getField("RegDomId")))) {
              throw new DBException("Registration domain \"" +
!                     rd.getField("Name") + "\" already exists.");
          }
  
***************
*** 364,368 ****
          super.update();
      }
!      /* update() */
  
      /**
--- 342,346 ----
          super.update();
      }
!     /* update() */
  
      /**
***************
*** 372,381 ****
       * @throws DBException If there is a problem checking the integrity
       */
!     protected void checkAllRefs() throws DBException
!     {
          checkRef("GroupName", new UserGroup(SecuredDBObject.SYSTEM_ACCOUNT),
!             "Invalid " + getString(getMetaData().getDescription("GroupName")));
      }
!      /* checkAllRefs() */
  
      /**
--- 350,358 ----
       * @throws DBException If there is a problem checking the integrity
       */
!     protected void checkAllRefs() throws DBException {
          checkRef("GroupName", new UserGroup(SecuredDBObject.SYSTEM_ACCOUNT),
!                 "Invalid " + getString(getMetaData().getDescription("GroupName")));
      }
!     /* checkAllRefs() */
  
      /**
***************
*** 386,394 ****
       *
       * @throws DBException If there is an error setting up the fields as
!      *         requested. For example, if a field allowing null is requested
!      *         as part of the key
       */
!     protected void setupFields() throws DBException
!     {
          setTargetTable("REGDOMAIN");
          setDescription("DBregDomain");
--- 363,370 ----
       *
       * @throws DBException If there is an error setting up the fields as
!      *                     requested. For example, if a field allowing null is requested
!      *                     as part of the key
       */
!     protected void setupFields() throws DBException {
          setTargetTable("REGDOMAIN");
          setDescription("DBregDomain");
***************
*** 428,439 ****
          setMultiValued("NotApprovedGrp");
          setLookupObject("GroupName",
!             "com.jcorporate.expresso.services.dbobj.UserGroup");
          setLookupObject("NotRegGrp",
!             "com.jcorporate.expresso.services.dbobj.UserGroup");
          setLookupObject("NotApprovedGrp",
!             "com.jcorporate.expresso.services.dbobj.UserGroup");
          addDetail("com.jcorporate.expresso.services.dbobj.RegistrationObjectMap",
!             "RegDomId", "RegDomId");
      }
!      /* setupFields() */
  }
--- 404,415 ----
          setMultiValued("NotApprovedGrp");
          setLookupObject("GroupName",
!                 "com.jcorporate.expresso.services.dbobj.UserGroup");
          setLookupObject("NotRegGrp",
!                 "com.jcorporate.expresso.services.dbobj.UserGroup");
          setLookupObject("NotApprovedGrp",
!                 "com.jcorporate.expresso.services.dbobj.UserGroup");
          addDetail("com.jcorporate.expresso.services.dbobj.RegistrationObjectMap",
!                 "RegDomId", "RegDomId");
      }
!     /* setupFields() */
  }



More information about the cvs mailing list