dlestrat 2004/06/12 09:39:24
Modified: applications/security/src/java/org/apache/jetspeed/portlets/security
AddUserAction.java AddUserForm.java
Log:
Javadoc + copyright.
Revision Changes Path
1.2 +39 -10
jakarta-jetspeed-2/applications/security/src/java/org/apache/jetspeed/portlets/security/AddUserAction.java
Index: AddUserAction.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/applications/security/src/java/org/apache/jetspeed/portlets/security/AddUserAction.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AddUserAction.java 12 Jun 2004 04:14:11 -0000 1.1
+++ AddUserAction.java 12 Jun 2004 16:39:24 -0000 1.2
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
package org.apache.jetspeed.portlets.security;
import javax.servlet.http.HttpServletRequest;
@@ -5,23 +20,37 @@
import org.apache.jetspeed.portlets.security.AddUserForm;
+import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
-public class AddUserAction extends org.apache.struts.action.Action {
-
+public class AddUserAction extends Action
+{
+
// Local Forwards
public static final String FORWARD_EDITUSER = "editUser";
-
- public AddUserAction() {
+
+ /**
+ * <p>Default constructor.</p>
+ */
+ public AddUserAction()
+ {
}
-
- public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception {
-
- String username = ((AddUserForm)form).getUsername();
- String password = ((AddUserForm)form).getPassword();
-
+
+ /**
+ * @see
org.apache.struts.action.Action#execute(org.apache.struts.action.ActionMapping,
+ * org.apache.struts.action.ActionForm,
+ * javax.servlet.http.HttpServletRequest,
+ * javax.servlet.http.HttpServletResponse)
+ */
+ public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
+ HttpServletResponse response) throws Exception
+ {
+
+ String username = ((AddUserForm) form).getUsername();
+ String password = ((AddUserForm) form).getPassword();
+
return mapping.findForward(FORWARD_EDITUSER);
}
1.2 +54 -0
jakarta-jetspeed-2/applications/security/src/java/org/apache/jetspeed/portlets/security/AddUserForm.java
Index: AddUserForm.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/applications/security/src/java/org/apache/jetspeed/portlets/security/AddUserForm.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AddUserForm.java 12 Jun 2004 04:14:11 -0000 1.1
+++ AddUserForm.java 12 Jun 2004 16:39:24 -0000 1.2
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
package org.apache.jetspeed.portlets.security;
import javax.servlet.http.HttpServletRequest;
@@ -10,30 +25,69 @@
private String username = "";
private String password = "";
+ /**
+ * <p>Default constructor.</p>
+ */
public AddUserForm() {
}
+ /**
+ * <p>Resets the form.</p>
+ *
+ * @param actionMapping The mapping used to select this instance
+ * @param request The servlet request we are processing
+ */
public void reset(ActionMapping actionMapping, HttpServletRequest request) {
this.username = "";
}
+ /**
+ * Validate the properties that have been set from this HTTP request,
+ * and return an <code>ActionErrors</code> object that encapsulates any
+ * validation errors that have been found. If no errors are found, return
+ * <code>null</code> or an <code>ActionErrors</code> object with no
+ * recorded error messages.
+ *
+ * @param actionMapping The mapping used to select this instance
+ * @param request The servlet request we are processing
+ */
public ActionErrors validate(ActionMapping actionMapping, HttpServletRequest
request) {
ActionErrors errs = new ActionErrors();
return errs;
}
+ /**
+ * <p>Getter for the username.</p>
+ *
+ * @return The username.
+ */
public String getUsername(){
return this.username;
}
+ /**
+ * <p>Setter for the username.</p>
+ *
+ * @param username The username.
+ */
public void setUsername(String username){
this.username = (username == null ? "" : username);
}
+ /**
+ * <p>Getter for the password.</p>
+ *
+ * @return The password.
+ */
public String getPassword(){
return this.password;
}
+ /**
+ * <p>Setter for the password.</p>
+ *
+ * @param password The password.
+ */
public void setPassword(String password){
this.password = (password == null ? "" : password);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]