Cleaned up the WAYF javadoc somewhat.
authorwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Thu, 30 May 2002 16:40:43 +0000 (16:40 +0000)
committerwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Thu, 30 May 2002 16:40:43 +0000 (16:40 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@11 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/wayf/Origin.java
src/edu/internet2/middleware/shibboleth/wayf/OriginSet.java
src/edu/internet2/middleware/shibboleth/wayf/WayfConfig.java
src/edu/internet2/middleware/shibboleth/wayf/WayfConfigDigester.java
src/edu/internet2/middleware/shibboleth/wayf/WayfException.java
src/edu/internet2/middleware/shibboleth/wayf/WayfOrigins.java
src/edu/internet2/middleware/shibboleth/wayf/WayfService.java

index 28cc395..2f7bbb9 100755 (executable)
@@ -8,7 +8,8 @@ import java.util.StringTokenizer;
 
 /**
  * This class represents an Origin site in the shibboleth parlance.
- * @author             Walter Hoehn
+ * 
+ * @author Walter Hoehn wassa&#064;columbia.edu
  */
 
 public class Origin {
index 33df22e..d82666d 100755 (executable)
@@ -6,7 +6,7 @@ import java.util.ArrayList;
  * This class is used to create logical groupings of shibboleth Origin Sites.
  * Each grouping is associated with a textual name that might be displayed 
  * in a UI to accommodate user selection.
- * @author Walter Hoehn
+ * @author Walter Hoehn wassa&#064;columbia.edu
  */
 
 public class OriginSet {
index 0489c61..18715c4 100755 (executable)
@@ -7,7 +7,7 @@ import org.apache.log4j.Logger;
 /**
  * Class used by the  WAYF service to determine runtime options
  * Most of the fields of this class should have reasonable defaults set
- * @author        Walter Hoehn
+ * @author Walter Hoehn wassa&#064;columbia.edu
  */
 
 public class WayfConfig {
@@ -30,105 +30,54 @@ public class WayfConfig {
 
        private static String cache = "SESSION";
 
-       /**
-        * Constructor for WayfConfig.
-        */
        public WayfConfig() {
                super();
        }
 
-       /**
-        * Gets the wd.
-        * @return Returns a WayfOrigins
-        */
        public static WayfOrigins getWAYFData() {
                return wd;
        }
 
-       /**
-        * Sets the wd.
-        * @param wd The wd to set
-        */
        public void setWAYFData(WayfOrigins wd) {
                WayfConfig.wd = wd;
        }
 
-       /**
-        * Gets the searchResultEmptyText.
-        * @return Returns a String
-        */
        public static String getSearchResultEmptyText() {
                return searchResultEmptyText;
        }
 
-       /**
-        * Sets the searchResultEmptyText.
-        * @param searchResultEmptyText The searchResultEmptyText to set
-        */
        public void setSearchResultEmptyText(String searchResultEmptyText) {
                WayfConfig.searchResultEmptyText = searchResultEmptyText;
        }
 
-       /**
-        * Gets the helpText.
-        * @return Returns a String
-        */
        public static String getHelpText() {
                return helpText;
        }
 
-       /**
-        * Sets the helpText.
-        * @param helpText The helpText to set
-        */
        public void setHelpText(String helpText) {
                WayfConfig.helpText = helpText;
        }
 
-       /**
-        * Gets the supportContact.
-        * @return Returns a String
-        */
        public static String getSupportContact() {
                return supportContact;
        }
 
-       /**
-        * Sets the supportContact.
-        * @param supportContact The supportContact to set
-        */
        public void setSupportContact(String supportContact) {
                WayfConfig.supportContact = supportContact;
        }
 
-       /**
-        * Gets the logoLocation.
-        * @return Returns a String
-        */
        public static String getLogoLocation() {
                return logoLocation;
        }
 
-       /**
-        * Sets the logoLocation.
-        * @param logoLocation The logoLocation to set
-        */
        public void setLogoLocation(String logoLocation) {
                WayfConfig.logoLocation = logoLocation;
        }
 
-       /**
-        * Gets the location.
-        * @return Returns a String
-        */
        public static String getLocation() {
                return location;
        }
 
-       /**
-        * Sets the location.
-        * @param location The location to set
-        */
        public void setLocation(String location) {
                WayfConfig.location = location;
        }
@@ -155,18 +104,10 @@ public class WayfConfig {
                ignoredForMatch.add(s.toLowerCase());
        }
 
-       /**
-       * Gets the cache.
-       * @return Returns a String
-       */
        public static String getCache() {
                return cache;
        }
 
-       /**
-        * Sets the cache.
-        * @param cache The cache to set
-        */
        public void setCache(String cache) {
                if (cache.toUpperCase().equals("NONE")
                        || cache.toUpperCase().equals("SESSION")
index cf1be3c..dd25624 100755 (executable)
@@ -9,118 +9,116 @@ import org.xml.sax.XMLReader;
  * It should populate the WayfConfig object during WAYF initilization. NOTE: It is
  * assumed that the mutators of this class will only be called by a single thread during
  * servlet initilization only (NOT thread safe)
- * @author             Walter Hoehn
+ * 
+ * @author Walter Hoehn wassa&#064;columbia.edu
  */
 
 public class WayfConfigDigester extends Digester {
 
-    protected String originClass = "edu.internet2.middleware.shibboleth.wayf.Origin";
-    protected String wayfDataClass = "edu.internet2.middleware.shibboleth.wayf.WayfOrigins";
-    protected String originSetClass = "edu.internet2.middleware.shibboleth.wayf.OriginSet";
-    protected String wayfConfigClass = "edu.internet2.middleware.shibboleth.wayf.WayfConfig";
-    private boolean configured = false;
-
-    /**
-     * Constructor for ShibbolethConfigDigester.
-     */
-    public WayfConfigDigester() {
-        super();
-        configure();
-    }
-
-    /**
-     * Constructor for ShibbolethConfigDigester.
-     * @param parser
-     */
-    public WayfConfigDigester(SAXParser parser) {
-        super(parser);
-        configure();
-    }
-
-    /**
-     * Constructor for ShibbolethConfigDigester.
-     * @param reader
-     */
-    public WayfConfigDigester(XMLReader reader) {
-        super(reader);
-        configure();
-    }
-
-    /**
-     * Gets the originClass.
-     * @return Returns a String
-     */
-    public String getOriginClass() {
-        return originClass;
-    }
-
-    /**
-     * Sets the originClass.
-     * @param originClass The originClass to set
-     */
-    public void setOriginClass(String originClass) {
-        this.originClass = originClass;
-    }
-
-    protected void configure() {
-
-        if (configured == true) {
-            return;
-        }
-        addObjectCreate("ShibbolethConfig", wayfConfigClass);
-        addSetProperties("ShibbolethConfig/WayfConfig");
-        addCallMethod("ShibbolethConfig/WayfConfig/HelpText", "setHelpText", 0);
-        addCallMethod("ShibbolethConfig/WayfConfig/SearchResultEmptyText", "setSearchResultEmptyText", 0);
-        addCallMethod("ShibbolethConfig/WayfConfig/SearchIgnore/String", "addIgnoredForMatch", 0);
-
-        addObjectCreate("ShibbolethConfig/CommonConfig", wayfDataClass);
-        addSetNext("ShibbolethConfig/CommonConfig", "setWAYFData", wayfDataClass);
-
-        addObjectCreate("ShibbolethConfig/CommonConfig/OriginSet", originSetClass);
-        addSetNext("ShibbolethConfig/CommonConfig/OriginSet", "addOriginSet", originSetClass);
-        addSetProperties("ShibbolethConfig/CommonConfig/OriginSet");
-
-        addObjectCreate("ShibbolethConfig/CommonConfig/OriginSet/Origin", originClass);
-        addSetNext("ShibbolethConfig/CommonConfig/OriginSet/Origin", "addOrigin", originClass);
-        addSetProperties("ShibbolethConfig/CommonConfig/OriginSet/Origin");
-
-        addCallMethod("ShibbolethConfig/CommonConfig/OriginSet/Origin/Alias", "addAlias", 1);
-        addCallParam("ShibbolethConfig/CommonConfig/OriginSet/Origin/Alias", 0, "name");
-
-        configured = true;
-
-    }
-
-    /**
-     * Gets the originSetClass.
-     * @return Returns a String
-     */
-    public String getOriginSetClass() {
-        return originSetClass;
-    }
-
-    /**
-     * Sets the originSetClass.
-     * @param originSetClass The originSetClass to set
-     */
-    public void setOriginSetClass(String originSetClass) {
-        this.originSetClass = originSetClass;
-    }
-
-    /**
-     * Gets the wayfDataClass.
-     * @return Returns a String
-     */
-    public String getWayfDataClass() {
-        return wayfDataClass;
-    }
-
-    /**
-     * Sets the wayfDataClass.
-     * @param wayfDataClass The wayfDataClass to set
-     */
-    public void setWayfDataClass(String wayfDataClass) {
-        this.wayfDataClass = wayfDataClass;
-    }
-
-}
+       protected String originClass =
+               "edu.internet2.middleware.shibboleth.wayf.Origin";
+       protected String wayfDataClass =
+               "edu.internet2.middleware.shibboleth.wayf.WayfOrigins";
+       protected String originSetClass =
+               "edu.internet2.middleware.shibboleth.wayf.OriginSet";
+       protected String wayfConfigClass =
+               "edu.internet2.middleware.shibboleth.wayf.WayfConfig";
+       private boolean configured = false;
+
+       public WayfConfigDigester() {
+               super();
+               configure();
+       }
+
+       public WayfConfigDigester(SAXParser parser) {
+               super(parser);
+               configure();
+       }
+
+       public WayfConfigDigester(XMLReader reader) {
+               super(reader);
+               configure();
+       }
+
+       public String getOriginClass() {
+               return originClass;
+       }
+
+       public void setOriginClass(String originClass) {
+               this.originClass = originClass;
+       }
+
+       /**
+        * @see Digester#configure()
+        */
+       protected void configure() {
+
+               if (configured == true) {
+                       return;
+               }
+               addObjectCreate("ShibbolethConfig", wayfConfigClass);
+               addSetProperties("ShibbolethConfig/WayfConfig");
+               addCallMethod("ShibbolethConfig/WayfConfig/HelpText", "setHelpText", 0);
+               addCallMethod(
+                       "ShibbolethConfig/WayfConfig/SearchResultEmptyText",
+                       "setSearchResultEmptyText",
+                       0);
+               addCallMethod(
+                       "ShibbolethConfig/WayfConfig/SearchIgnore/String",
+                       "addIgnoredForMatch",
+                       0);
+
+               addObjectCreate("ShibbolethConfig/CommonConfig", wayfDataClass);
+               addSetNext(
+                       "ShibbolethConfig/CommonConfig",
+                       "setWAYFData",
+                       wayfDataClass);
+
+               addObjectCreate(
+                       "ShibbolethConfig/CommonConfig/OriginSet",
+                       originSetClass);
+               addSetNext(
+                       "ShibbolethConfig/CommonConfig/OriginSet",
+                       "addOriginSet",
+                       originSetClass);
+               addSetProperties("ShibbolethConfig/CommonConfig/OriginSet");
+
+               addObjectCreate(
+                       "ShibbolethConfig/CommonConfig/OriginSet/Origin",
+                       originClass);
+               addSetNext(
+                       "ShibbolethConfig/CommonConfig/OriginSet/Origin",
+                       "addOrigin",
+                       originClass);
+               addSetProperties("ShibbolethConfig/CommonConfig/OriginSet/Origin");
+
+               addCallMethod(
+                       "ShibbolethConfig/CommonConfig/OriginSet/Origin/Alias",
+                       "addAlias",
+                       1);
+               addCallParam(
+                       "ShibbolethConfig/CommonConfig/OriginSet/Origin/Alias",
+                       0,
+                       "name");
+
+               configured = true;
+
+       }
+
+       public String getOriginSetClass() {
+               return originSetClass;
+       }
+
+       public void setOriginSetClass(String originSetClass) {
+               this.originSetClass = originSetClass;
+       }
+
+       public String getWayfDataClass() {
+               return wayfDataClass;
+       }
+
+       public void setWayfDataClass(String wayfDataClass) {
+               this.wayfDataClass = wayfDataClass;
+       }
+
+}
\ No newline at end of file
index 311bfe0..3f7f1cf 100755 (executable)
@@ -1,7 +1,9 @@
 package edu.internet2.middleware.shibboleth.wayf;
 
 /**
- * @author             Walter Hoehn
+ * Signals that an error has occurred while processing a 
+ * Shibboleth WAYF request.
+ * @author Walter Hoehn wassa&#064;columbia.edu
  */
 
 public class WayfException extends Exception {
index 7dab51b..b0110b9 100755 (executable)
@@ -6,7 +6,8 @@ import java.util.Iterator;
 
 /**
  * This class is a container for OriginSets, allowing lookup and searching of the same.
- * @author             Walter Hoehn
+ * 
+ * @author Walter Hoehn wassa&#064;columbia.edu
  */
 
 public class WayfOrigins {
index a720412..a29a2db 100755 (executable)
@@ -15,11 +15,11 @@ import org.apache.log4j.Logger;
 import org.xml.sax.SAXException;
 
 /**
- * This is the main handler servlet for the WAYF service.  It configures itself, chooses among 
- * several handler methods for each request, populates some beans (model), and then passes to an
- * appropriate jsp page.
+ * A servlet implementation of the Shibboleth WAYF service.  Allows a browser user to 
+ * select from among a group of origin sites.  User selection is optionally cached 
+ * and the user is forwarded to the HandleService appropriate to his selection.
  *
- * @author             Walter Hoehn
+ * @author Walter Hoehn wassa&#064;columbia.edu
  */
 
 public class WayfService extends HttpServlet {
@@ -27,6 +27,9 @@ public class WayfService extends HttpServlet {
        private String wayfConfigFileLocation;
        private static Logger log = Logger.getLogger(WayfService.class.getName());
 
+       /**
+        * @see GenericServlet#init()
+        */
        public void init() throws ServletException {
 
                super.init();
@@ -71,6 +74,9 @@ public class WayfService extends HttpServlet {
                        WayfConfig.getLogoLocation());
        }
 
+       /**
+        * @see HttpServlet#doGet(HttpServletRequest, HttpServletResponse)
+        */
        public void doGet(HttpServletRequest req, HttpServletResponse res) {
 
                //Tell the browser not to cache the WAYF page