manveen 02/05/03 11:34:14 Modified: webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm JDBCRealmForm.java JNDIRealmForm.java MemoryRealmForm.java UserDatabaseRealmForm.java Added: webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm RealmForm.java Log: Created a generic realm base form. Refactored Realms to reuse code between them. Revision Changes Path 1.5 +14 -227 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm/JDBCRealmForm.java Index: JDBCRealmForm.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm/JDBCRealmForm.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- JDBCRealmForm.java 3 May 2002 07:19:23 -0000 1.4 +++ JDBCRealmForm.java 3 May 2002 18:34:14 -0000 1.5 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm/JDBCRealmForm.java,v 1.4 2002/05/03 07:19:23 manveen Exp $ - * $Revision: 1.4 $ - * $Date: 2002/05/03 07:19:23 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm/JDBCRealmForm.java,v 1.5 2002/05/03 18:34:14 manveen Exp $ + * $Revision: 1.5 $ + * $Date: 2002/05/03 18:34:14 $ * * ==================================================================== * @@ -76,45 +76,19 @@ * Form bean for the jdbc realm page. * * @author Manveen Kaur - * @version $Revision: 1.4 $ $Date: 2002/05/03 07:19:23 $ + * @version $Revision: 1.5 $ $Date: 2002/05/03 18:34:14 $ */ -public final class JDBCRealmForm extends ActionForm { +public final class JDBCRealmForm extends RealmForm { // ----------------------------------------------------- Instance Variables - /** - * The administrative action represented by this form. - */ - private String adminAction = "Edit"; - - /** - * The object name of the Realm this bean refers to. - */ - private String objectName = null; - - /** - * The text for the debug level. - */ - private String debugLvl = "0"; - /** * The text for the realm name, used to retrieve * the corresponding realm mBean. */ private String realmName = null; - - /** - * The text for the realm type. - * Specifies if it is a JNDI, JDBC or MemoryRealm. - */ - private String realmType = null; - - /** - * Set of valid values for debug level. - */ - private List debugLvlVals = null; - + /** * The text for the digest. */ @@ -134,12 +108,7 @@ * The text for the driver. */ private String driver = null; - - /** - * The text for the node label. - */ - private String nodeLabel = null; - + /** * The text for the role table. */ @@ -165,113 +134,8 @@ */ private String connectionURL = null; - /** - * The object name of the parent of this Realm. - */ - private String parentObjectName = null; - - /** - * Set of valid values for realms. - */ - private List realmTypeVals = null; - - /** - * The text for whether "delete this realm" operation is allowed - * on the realm or not. - */ - private String allowDeletion = null; - // ------------------------------------------------------------- Properties - - /** - * Return the administrative action represented by this form. - */ - public String getAdminAction() { - - return this.adminAction; - - } - - /** - * Set the administrative action represented by this form. - */ - public void setAdminAction(String adminAction) { - - this.adminAction = adminAction; - - } - - /** - * Return the Object Name. - */ - public String getObjectName() { - - return this.objectName; - - } - - /** - * Set the Object Name. - */ - public void setObjectName(String objectName) { - - this.objectName = objectName; - - } - - /** - * Return the Realm type. - */ - public String getRealmType() { - - return this.realmType; - - } - - /** - * Set the Realm type. - */ - public void setRealmType(String realmType) { - - this.realmType = realmType; - - } - - /** - * Return the debugVals. - */ - public List getDebugLvlVals() { - - return this.debugLvlVals; - - } - /** - * Set the debugVals. - */ - public void setDebugLvlVals(List debugLvlVals) { - - this.debugLvlVals = debugLvlVals; - - } - - /** - * Return the Debug Level Text. - */ - public String getDebugLvl() { - - return this.debugLvl; - - } - - /** - * Set the Debug Level Text. - */ - public void setDebugLvl(String debugLvl) { - - this.debugLvl = debugLvl; - - } /** * Return the digest. @@ -363,24 +227,6 @@ } /** - * Return the label of the node that was clicked. - */ - public String getNodeLabel() { - - return this.nodeLabel; - - } - - /** - * Set the node label. - */ - public void setNodeLabel(String nodeLabel) { - - this.nodeLabel = nodeLabel; - - } - - /** * Return the passwordCol. */ public String getPasswordCol() { @@ -453,65 +299,8 @@ this.connectionURL = connectionURL; - } - - /** - * Return the parent object name of the Realm this bean refers to. - */ - public String getParentObjectName() { - - return this.parentObjectName; - - } - - - /** - * Set the parent object name of the Realm this bean refers to. - */ - public void setParentObjectName(String parentObjectName) { - - this.parentObjectName = parentObjectName; - - } - - - /** - * Return the realmTypeVals. - */ - public List getRealmTypeVals() { - - return this.realmTypeVals; - - } - - /** - * Set the realmTypeVals. - */ - public void setRealmTypeVals(List realmTypeVals) { - - this.realmTypeVals = realmTypeVals; - - } - - /** - * Return the allow deletion value. - */ - public String getAllowDeletion() { - - return this.allowDeletion; - - } + } - /** - * Set the allow Deletion value. - */ - public void setAllowDeletion(String allowDeletion) { - - this.allowDeletion = allowDeletion; - - } - - // --------------------------------------------------------- Public Methods /** @@ -522,9 +311,7 @@ */ public void reset(ActionMapping mapping, HttpServletRequest request) { - this.objectName = null; - this.debugLvl = "0"; - + super.reset(mapping, request); this.digest = null; this.driver = null; @@ -545,9 +332,9 @@ public String toString() { StringBuffer sb = new StringBuffer("UserDatabaseRealmForm[adminAction="); - sb.append(adminAction); + sb.append(getAdminAction()); sb.append(",debugLvl="); - sb.append(debugLvl); + sb.append(getDebugLvl()); sb.append(",digest="); sb.append(digest); sb.append("',driver='"); @@ -567,9 +354,9 @@ sb.append(",connectionURL="); sb.append(connectionURL); sb.append("',objectName='"); - sb.append(objectName); + sb.append(getObjectName()); sb.append("',realmType="); - sb.append(realmType); + sb.append(getRealmType()); sb.append("]"); return (sb.toString()); @@ -592,7 +379,7 @@ ActionErrors errors = new ActionErrors(); String submit = request.getParameter("submit"); - String type = request.getParameter("realmType"); + //String type = request.getParameter("realmType"); // front end validation when save is clicked. if (submit != null) { 1.5 +11 -223 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm/JNDIRealmForm.java Index: JNDIRealmForm.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm/JNDIRealmForm.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- JNDIRealmForm.java 3 May 2002 07:19:23 -0000 1.4 +++ JNDIRealmForm.java 3 May 2002 18:34:14 -0000 1.5 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm/JNDIRealmForm.java,v 1.4 2002/05/03 07:19:23 manveen Exp $ - * $Revision: 1.4 $ - * $Date: 2002/05/03 07:19:23 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm/JNDIRealmForm.java,v 1.5 2002/05/03 18:34:14 manveen Exp $ + * $Revision: 1.5 $ + * $Date: 2002/05/03 18:34:14 $ * * ==================================================================== * @@ -76,39 +76,13 @@ * Form bean for the JNDI realm page. * * @author Manveen Kaur - * @version $Revision: 1.4 $ $Date: 2002/05/03 07:19:23 $ + * @version $Revision: 1.5 $ $Date: 2002/05/03 18:34:14 $ */ -public final class JNDIRealmForm extends ActionForm { +public final class JNDIRealmForm extends RealmForm { // ----------------------------------------------------- Instance Variables - /** - * The administrative action represented by this form. - */ - private String adminAction = "Edit"; - - /** - * The object name of the Realm this bean refers to. - */ - private String objectName = null; - - /** - * The text for the debug level. - */ - private String debugLvl = "0"; - - /** - * The text for the realm type. - * Specifies if it is a JNDI, JNDI or MemoryRealm. - */ - private String realmType = null; - - /** - * The text for the node label. - */ - private String nodeLabel = null; - /** * The text for the search subtree. */ @@ -163,107 +137,15 @@ * The text for the user search Pattern. */ private String userPattern = null; - - /** - * Set of valid values for debug level. - */ - private List debugLvlVals = null; - + /** * Set of valid values for search subtrees(true/false). */ private List searchVals = null; - /** - * The object name of the parent of this Realm. - */ - private String parentObjectName = null; - - /** - * Set of valid values for realms. - */ - private List realmTypeVals = null; - /** - * The text for whether "delete this realm" operation is allowed - * on the realm or not. - */ - private String allowDeletion = null; - // ------------------------------------------------------------- Properties - - /** - * Return the administrative action represented by this form. - */ - public String getAdminAction() { - - return this.adminAction; - - } - - /** - * Set the administrative action represented by this form. - */ - public void setAdminAction(String adminAction) { - - this.adminAction = adminAction; - - } - - /** - * Return the Object Name. - */ - public String getObjectName() { - - return this.objectName; - - } - - /** - * Set the Object Name. - */ - public void setObjectName(String objectName) { - - this.objectName = objectName; - - } - - /** - * Return the Realm type. - */ - public String getRealmType() { - - return this.realmType; - - } - - /** - * Set the Realm type. - */ - public void setRealmType(String realmType) { - - this.realmType = realmType; - - } - - /** - * Return the debugVals. - */ - public List getDebugLvlVals() { - - return this.debugLvlVals; - - } - - /** - * Set the debugVals. - */ - public void setDebugLvlVals(List debugLvlVals) { - - this.debugLvlVals = debugLvlVals; - } - /** * Return the search Vals. */ @@ -281,25 +163,7 @@ this.searchVals = searchVals; } - - /** - * Return the Debug Level Text. - */ - public String getDebugLvl() { - - return this.debugLvl; - - } - - /** - * Set the Debug Level Text. - */ - public void setDebugLvl(String debugLvl) { - - this.debugLvl = debugLvl; - } - /** * Return the search boolean Text. */ @@ -391,24 +255,6 @@ } /** - * Return the label of the node that was clicked. - */ - public String getNodeLabel() { - - return this.nodeLabel; - - } - - /** - * Set the node label. - */ - public void setNodeLabel(String nodeLabel) { - - this.nodeLabel = nodeLabel; - - } - - /** * Return the user Password . */ public String getUserPassword() { @@ -519,62 +365,6 @@ } - /** - * Return the parent object name of the Realm this bean refers to. - */ - public String getParentObjectName() { - - return this.parentObjectName; - - } - - - /** - * Set the parent object name of the Realm this bean refers to. - */ - public void setParentObjectName(String parentObjectName) { - - this.parentObjectName = parentObjectName; - - } - - - /** - * Return the realmTypeVals. - */ - public List getRealmTypeVals() { - - return this.realmTypeVals; - - } - - /** - * Set the realmTypeVals. - */ - public void setRealmTypeVals(List realmTypeVals) { - - this.realmTypeVals = realmTypeVals; - - } - - /** - * Return the allow deletion value. - */ - public String getAllowDeletion() { - - return this.allowDeletion; - - } - - /** - * Set the allow Deletion value. - */ - public void setAllowDeletion(String allowDeletion) { - - this.allowDeletion = allowDeletion; - - } - // --------------------------------------------------------- Public Methods /** @@ -585,8 +375,7 @@ */ public void reset(ActionMapping mapping, HttpServletRequest request) { - this.objectName = null; - this.debugLvl = "0"; + super.reset(mapping, request); this.search="false"; this.digest = null; @@ -609,9 +398,9 @@ public String toString() { StringBuffer sb = new StringBuffer("UserDatabaseRealmForm[adminAction="); - sb.append(adminAction); + sb.append(getAdminAction()); sb.append(",debugLvl="); - sb.append(debugLvl); + sb.append(getDebugLvl()); sb.append(",search="); sb.append(search); sb.append(",digest="); @@ -635,9 +424,9 @@ sb.append(",contextFactory="); sb.append(contextFactory); sb.append("',objectName='"); - sb.append(objectName); + sb.append(getObjectName()); sb.append("',realmType="); - sb.append(realmType); + sb.append(getRealmType()); sb.append("]"); return (sb.toString()); @@ -660,7 +449,6 @@ ActionErrors errors = new ActionErrors(); String submit = request.getParameter("submit"); - String type = request.getParameter("realmType"); // front end validation when save is clicked. if (submit != null) { 1.5 +11 -223 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm/MemoryRealmForm.java Index: MemoryRealmForm.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm/MemoryRealmForm.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- MemoryRealmForm.java 3 May 2002 07:19:23 -0000 1.4 +++ MemoryRealmForm.java 3 May 2002 18:34:14 -0000 1.5 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm/MemoryRealmForm.java,v 1.4 2002/05/03 07:19:23 manveen Exp $ - * $Revision: 1.4 $ - * $Date: 2002/05/03 07:19:23 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm/MemoryRealmForm.java,v 1.5 2002/05/03 18:34:14 manveen Exp $ + * $Revision: 1.5 $ + * $Date: 2002/05/03 18:34:14 $ * * ==================================================================== * @@ -76,195 +76,20 @@ * Form bean for the memory realm page. * * @author Manveen Kaur - * @version $Revision: 1.4 $ $Date: 2002/05/03 07:19:23 $ + * @version $Revision: 1.5 $ $Date: 2002/05/03 18:34:14 $ */ -public final class MemoryRealmForm extends ActionForm { +public final class MemoryRealmForm extends RealmForm { // ----------------------------------------------------- Instance Variables - - /** - * The administrative action represented by this form. - */ - private String adminAction = "Edit"; - - /** - * The object name of the Realm this bean refers to. - */ - private String objectName = null; - - /** - * The text for the debug level. - */ - private String debugLvl = "0"; /** - * The text for the realm type. - * Specifies if it is a JNDI, JDBC, UserDatabase or MemoryRealm. - */ - private String realmType = null; - - /** - * Set of valid values for debug level. - */ - private List debugLvlVals = null; - - /** * The text for the path Name. */ private String pathName = null; - - /** - * The text for the node label. - */ - private String nodeLabel = null; - - /** - * The object name of the parent of this Realm. - */ - private String parentObjectName = null; - - /** - * Set of valid values for realms. - */ - private List realmTypeVals = null; - - /** - * The text for whether "delete this realm" operation is allowed - * on the realm or not. - */ - private String allowDeletion = null; - + // ------------------------------------------------------------- Properties - - /** - * Return the administrative action represented by this form. - */ - public String getAdminAction() { - - return this.adminAction; - - } - - /** - * Set the administrative action represented by this form. - */ - public void setAdminAction(String adminAction) { - - this.adminAction = adminAction; - - } - - /** - * Return the Object Name. - */ - public String getObjectName() { - return this.objectName; - - } - - /** - * Set the Object Name. - */ - public void setObjectName(String objectName) { - - this.objectName = objectName; - - } - - /** - * Return the parent object name of the Realm this bean refers to. - */ - public String getParentObjectName() { - - return this.parentObjectName; - - } - - - /** - * Set the parent object name of the Realm this bean refers to. - */ - public void setParentObjectName(String parentObjectName) { - - this.parentObjectName = parentObjectName; - - } - - - /** - * Return the realmTypeVals. - */ - public List getRealmTypeVals() { - - return this.realmTypeVals; - - } - - /** - * Set the realmTypeVals. - */ - public void setRealmTypeVals(List realmTypeVals) { - - this.realmTypeVals = realmTypeVals; - - } - - /** - * Return the Realm type. - */ - public String getRealmType() { - - return this.realmType; - - } - - /** - * Set the Realm type. - */ - public void setRealmType(String realmType) { - - this.realmType = realmType; - - } - - /** - * Return the debugVals. - */ - public List getDebugLvlVals() { - - return this.debugLvlVals; - - } - - /** - * Set the debugVals. - */ - public void setDebugLvlVals(List debugLvlVals) { - - this.debugLvlVals = debugLvlVals; - - } - - /** - * Return the Debug Level Text. - */ - public String getDebugLvl() { - - return this.debugLvl; - - } - - /** - * Set the Debug Level Text. - */ - public void setDebugLvl(String debugLvl) { - - this.debugLvl = debugLvl; - - } - /** * Return the path Name. */ @@ -282,43 +107,7 @@ this.pathName = pathName; } - - /** - * Return the label of the node that was clicked. - */ - public String getNodeLabel() { - - return this.nodeLabel; - } - - /** - * Set the node label. - */ - public void setNodeLabel(String nodeLabel) { - - this.nodeLabel = nodeLabel; - - } - - /** - * Return the allow deletion value. - */ - public String getAllowDeletion() { - - return this.allowDeletion; - - } - - /** - * Set the allow Deletion value. - */ - public void setAllowDeletion(String allowDeletion) { - - this.allowDeletion = allowDeletion; - - } - // --------------------------------------------------------- Public Methods /** @@ -329,8 +118,7 @@ */ public void reset(ActionMapping mapping, HttpServletRequest request) { - this.objectName = null; - this.debugLvl = "0"; + super.reset(mapping, request); this.pathName = null; } @@ -341,15 +129,15 @@ public String toString() { StringBuffer sb = new StringBuffer("UserDatabaseRealmForm[adminAction="); - sb.append(adminAction); + sb.append(getAdminAction()); sb.append(",debugLvl="); - sb.append(debugLvl); + sb.append(getDebugLvl()); sb.append(",pathname="); sb.append(pathName); sb.append("',objectName='"); - sb.append(objectName); + sb.append(getObjectName()); sb.append("',realmType="); - sb.append(realmType); + sb.append(getRealmType()); sb.append("]"); return (sb.toString()); 1.5 +12 -223 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm/UserDatabaseRealmForm.java Index: UserDatabaseRealmForm.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm/UserDatabaseRealmForm.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- UserDatabaseRealmForm.java 3 May 2002 07:19:23 -0000 1.4 +++ UserDatabaseRealmForm.java 3 May 2002 18:34:14 -0000 1.5 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm/UserDatabaseRealmForm.java,v 1.4 2002/05/03 07:19:23 manveen Exp $ - * $Revision: 1.4 $ - * $Date: 2002/05/03 07:19:23 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm/UserDatabaseRealmForm.java,v 1.5 2002/05/03 18:34:14 manveen Exp $ + * $Revision: 1.5 $ + * $Date: 2002/05/03 18:34:14 $ * * ==================================================================== * @@ -76,175 +76,20 @@ * Form bean for the User Database realm page. * * @author Manveen Kaur - * @version $Revision: 1.4 $ $Date: 2002/05/03 07:19:23 $ + * @version $Revision: 1.5 $ $Date: 2002/05/03 18:34:14 $ */ -public final class UserDatabaseRealmForm extends ActionForm { +public final class UserDatabaseRealmForm extends RealmForm { // ----------------------------------------------------- Instance Variables - - /** - * The administrative action represented by this form. - */ - private String adminAction = "Edit"; - - /** - * The object name of the Realm this bean refers to. - */ - private String objectName = null; - - /** - * The object name of the parent of this Realm. - */ - private String parentObjectName = null; /** - * The text for the debug level. - */ - private String debugLvl = "0"; - - /** - * The text for the realm type. - * Specifies if it is a JNDI, JDBC, Userdatabase or Memory Realm. - */ - private String realmType = null; - - /** - * Set of valid values for debug level. - */ - private List debugLvlVals = null; - - /** * The text for the resource name. */ private String resource = null; - - /** - * The text for the node label. - */ - private String nodeLabel = null; - - /** - * Set of valid values for realms. - */ - private List realmTypeVals = null; - - /** - * The text for whether "delete this realm" operation is allowed - * on the realm or not. - */ - private String allowDeletion = null; - - // ------------------------------------------------------------- Properties - - /** - * Return the administrative action represented by this form. - */ - public String getAdminAction() { - - return this.adminAction; - - } - - /** - * Set the administrative action represented by this form. - */ - public void setAdminAction(String adminAction) { - - this.adminAction = adminAction; - - } - - /** - * Return the Object Name. - */ - public String getObjectName() { - - return this.objectName; - - } - - /** - * Set the Object Name. - */ - public void setObjectName(String objectName) { - - this.objectName = objectName; - - } - - /** - * Return the parent object name of the Realm this bean refers to. - */ - public String getParentObjectName() { - - return this.parentObjectName; - - } - - - /** - * Set the parent object name of the Realm this bean refers to. - */ - public void setParentObjectName(String parentObjectName) { - - this.parentObjectName = parentObjectName; - - } - - /** - * Return the Realm type. - */ - public String getRealmType() { - return this.realmType; - - } - - /** - * Set the Realm type. - */ - public void setRealmType(String realmType) { - - this.realmType = realmType; - - } - - /** - * Return the debugVals. - */ - public List getDebugLvlVals() { - - return this.debugLvlVals; - - } - - /** - * Set the debugVals. - */ - public void setDebugLvlVals(List debugLvlVals) { - - this.debugLvlVals = debugLvlVals; - - } + // ------------------------------------------------------------- Properties - /** - * Return the Debug Level Text. - */ - public String getDebugLvl() { - - return this.debugLvl; - - } - - /** - * Set the Debug Level Text. - */ - public void setDebugLvl(String debugLvl) { - - this.debugLvl = debugLvl; - - } /** * Return the resource Name. @@ -263,62 +108,7 @@ this.resource = resource; } - - /** - * Return the label of the node that was clicked. - */ - public String getNodeLabel() { - - return this.nodeLabel; - } - - /** - * Set the node label. - */ - public void setNodeLabel(String nodeLabel) { - - this.nodeLabel = nodeLabel; - - } - - /** - * Return the realmTypeVals. - */ - public List getRealmTypeVals() { - - return this.realmTypeVals; - - } - - /** - * Set the realmTypeVals. - */ - public void setRealmTypeVals(List realmTypeVals) { - - this.realmTypeVals = realmTypeVals; - - } - - /** - * Return the allow deletion value. - */ - public String getAllowDeletion() { - - return this.allowDeletion; - - } - - /** - * Set the allow Deletion value. - */ - public void setAllowDeletion(String allowDeletion) { - - this.allowDeletion = allowDeletion; - - } - - // --------------------------------------------------------- Public Methods /** @@ -329,8 +119,7 @@ */ public void reset(ActionMapping mapping, HttpServletRequest request) { - this.objectName = null; - this.debugLvl = "0"; + super.reset(mapping, request); this.resource = null; } @@ -341,15 +130,15 @@ public String toString() { StringBuffer sb = new StringBuffer("UserDatabaseRealmForm[adminAction="); - sb.append(adminAction); + sb.append(getAdminAction()); sb.append(",debugLvl="); - sb.append(debugLvl); + sb.append(getDebugLvl()); sb.append(",resource="); - sb.append(resource); + sb.append(getResource()); sb.append("',objectName='"); - sb.append(objectName); + sb.append(getObjectName()); sb.append("',realmType="); - sb.append(realmType); + sb.append(getRealmType()); sb.append("]"); return (sb.toString()); 1.1 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm/RealmForm.java Index: RealmForm.java =================================================================== /* * $Header: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm/RealmForm.java,v 1.1 2002/05/03 18:34:14 manveen Exp $ * $Revision: 1.1 $ * $Date: 2002/05/03 18:34:14 $ * * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2001 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Struts", and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * */ package org.apache.webapp.admin.realm; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; import java.net.InetAddress; import java.util.List; import org.apache.webapp.admin.ApplicationServlet; import org.apache.webapp.admin.LabelValueBean; /** * Form bean for the generic realm page. * * @author Manveen Kaur * @version $Revision: 1.1 $ $Date: 2002/05/03 18:34:14 $ */ public class RealmForm extends ActionForm { // ----------------------------------------------------- Instance Variables /** * The administrative action represented by this form. */ private String adminAction = "Edit"; /** * The object name of the realm this bean refers to. */ private String objectName = null; /** * The text for the realm type. */ private String realmType = null; /** * The text for the node label. */ private String nodeLabel = null; /** * The text for the debug level. */ private String debugLvl = "0"; /** * The object name of the parent of this realm. */ private String parentObjectName = null; /** * Set of valid values for debug level. */ private List debugLvlVals = null; /** * Set of valid values for realms. */ private List realmTypeVals = null; /** * The text for whether "delete this realm" operation is allowed * on the realm or not. */ private String allowDeletion = null; // ------------------------------------------------------------- Properties /** * Return the administrative action represented by this form. */ public String getAdminAction() { return this.adminAction; } /** * Set the administrative action represented by this form. */ public void setAdminAction(String adminAction) { this.adminAction = adminAction; } /** * Return the Object Name. */ public String getObjectName() { return this.objectName; } /** * Set the Object Name. */ public void setObjectName(String objectName) { this.objectName = objectName; } /** * Return the realm type. */ public String getRealmType() { return this.realmType; } /** * Set the realm type. */ public void setRealmType(String realmType) { this.realmType = realmType; } /** * Return the label of the node that was clicked. */ public String getNodeLabel() { return this.nodeLabel; } /** * Set the node label. */ public void setNodeLabel(String nodeLabel) { this.nodeLabel = nodeLabel; } /** * Return the parent object name of the realm this bean refers to. */ public String getParentObjectName() { return this.parentObjectName; } /** * Set the parent object name of the realm this bean refers to. */ public void setParentObjectName(String parentObjectName) { this.parentObjectName = parentObjectName; } /** * Return the realmTypeVals. */ public List getRealmTypeVals() { return this.realmTypeVals; } /** * Set the realmTypeVals. */ public void setRealmTypeVals(List realmTypeVals) { this.realmTypeVals = realmTypeVals; } /** * Return the debugVals. */ public List getDebugLvlVals() { return this.debugLvlVals; } /** * Set the debugVals. */ public void setDebugLvlVals(List debugLvlVals) { this.debugLvlVals = debugLvlVals; } /** * Return the Debug Level Text. */ public String getDebugLvl() { return this.debugLvl; } /** * Set the Debug Level Text. */ public void setDebugLvl(String debugLvl) { this.debugLvl = debugLvl; } /** * Return the allow deletion value. */ public String getAllowDeletion() { return this.allowDeletion; } /** * Set the allow Deletion value. */ public void setAllowDeletion(String allowDeletion) { this.allowDeletion = allowDeletion; } // --------------------------------------------------------- Public Methods /** * Reset all properties to their default values. * * @param mapping The mapping used to select this instance * @param request The servlet request we are processing */ public void reset(ActionMapping mapping, HttpServletRequest request) { objectName = null; debugLvl = "0"; adminAction = "Edit"; } }
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>