/**
* 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@columbia.edu
*/
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;
}
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")
* 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@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