Reworked so that location of Handle Service is read from request instead of from...
[java-idp.git] / src / edu / internet2 / middleware / shibboleth / hs / HandleServiceConfig.java
1 package edu.internet2.middleware.shibboleth.hs;
2
3 /**
4  * Class used by the  WAYF service to determine runtime options.  
5  * Most of the fields of this class should have reasonable defaults.
6  * 
7  * @author Walter Hoehn wassa@columbia.edu
8  */
9
10 public class HandleServiceConfig {
11
12         private static String logoLocation = "images/internet2.gif";
13         private static String supportContact = "mailto:shib-support@internet2.org";
14         private static String helpText =
15                 "In order to fulfill the request for the web"
16                         + " resource you have just chosen, information must be sent from your home institution to the "
17                         + "provider of the resource.  The web resource should load automatically.  If it does not load within "
18                         + "five seconds, click on the Transmit button.";
19         private static String detailedHelpURL = "http://blah";
20         private static String handleRepositoryImplementation =
21                 "edu.internet2.middleware.shibboleth.common.provider.MemoryHandleRepository";
22         private static String validityPeriod = "1400000";
23         private static String domain = "internet2.edu";
24         private static String issuer = "shib2.internet2.edu";
25         private static String aaURL = "https://shib2.internet2.edu/shibb/servlet/AAServlet";
26         private static String secretKey;
27
28         /**
29          * Constructor for HandleServiceConfig.
30          */
31         public HandleServiceConfig() {
32                 super();
33         }
34
35         /**
36          * Gets the logoLocation.
37          * @return Returns a String
38          */
39         public static String getLogoLocation() {
40                 return logoLocation;
41         }
42
43         /**
44          * Sets the logoLocation.
45          * @param logoLocation The logoLocation to set
46          */
47         public static void setLogoLocation(String logoLocation) {
48                 HandleServiceConfig.logoLocation = logoLocation;
49         }
50
51         /**
52          * Gets the supportContact.
53          * @return Returns a String
54          */
55         public static String getSupportContact() {
56                 return supportContact;
57         }
58
59         /**
60          * Sets the supportContact.
61          * @param supportContact The supportContact to set
62          */
63         public static void setSupportContact(String supportContact) {
64                 HandleServiceConfig.supportContact = supportContact;
65         }
66
67         /**
68          * Gets the helpText.
69          * @return Returns a String
70          */
71         public static String getHelpText() {
72                 return helpText;
73         }
74
75         /**
76          * Sets the helpText.
77          * @param helpText The helpText to set
78          */
79         public static void setHelpText(String hs_helpText) {
80                 HandleServiceConfig.helpText = hs_helpText;
81         }
82
83         /**
84          * Gets the handleRepositoryImplementation.
85          * @return Returns a String
86          */
87         public static String getHandleRepositoryImplementation() {
88                 return handleRepositoryImplementation;
89         }
90
91         /**
92          * Sets the handleRepositoryImplementation.
93          * @param handleRepositoryImplementation The handleRepositoryImplementation to set
94          */
95         public static void setHandleRepositoryImplementation(String handleRepositoryImplementation) {
96                 HandleServiceConfig.handleRepositoryImplementation = handleRepositoryImplementation;
97         }
98
99         /**
100          * Gets the detailedHelpURL.
101          * @return Returns a String
102          */
103         public static String getDetailedHelpURL() {
104                 return detailedHelpURL;
105         }
106
107         /**
108          * Sets the detailedHelpURL.
109          * @param detailedHelpURL The detailedHelpURL to set
110          */
111         public static void setDetailedHelpURL(String hs_detailedHelpURL) {
112                 HandleServiceConfig.detailedHelpURL = hs_detailedHelpURL;
113         }
114
115         /**
116          * Gets the ticket.
117          * @return Returns a String
118          */
119         public static String getValidityPeriod() {
120                 return validityPeriod;
121         }
122
123         /**
124          * Sets the ticket.
125          * @param ticket The ticket to set
126          */
127         public static void setValidityPeriod(String validityPeriod) {
128                 HandleServiceConfig.validityPeriod = validityPeriod;
129         }
130
131         /**
132          * Gets the domain.
133          * @return Returns a String
134          */
135         public static String getDomain() {
136                 return domain;
137         }
138
139         /**
140          * Sets the domain.
141          * @param domain The domain to set
142          */
143         public static void setDomain(String domain) {
144                 HandleServiceConfig.domain = domain;
145         }
146
147         /**
148          * Gets the issuer.
149          * @return Returns a String
150          */
151         public static String getIssuer() {
152                 return issuer;
153         }
154
155         /**
156          * Sets the issuer.
157          * @param issuer The issuer to set
158          */
159         public static void setIssuer(String issuer) {
160                 HandleServiceConfig.issuer = issuer;
161         }
162
163         /**
164          * Gets the aaURL.
165          * @return Returns a String
166          */
167         public static String getAaURL() {
168                 return aaURL;
169         }
170
171         /**
172          * Sets the aaURL.
173          * @param aaURL The aaURL to set
174          */
175         public static void setAaURL(String aaURL) {
176                 HandleServiceConfig.aaURL = aaURL;
177         }
178
179         /**
180          * Gets the secretKey.  Can only be retrieved one time.
181          * @return Returns a String
182          */
183         public static String getSecretKey() {
184                 String cacheKey = secretKey;
185                 secretKey = null;
186                 return cacheKey;
187         }
188
189         /**
190          * Sets the secretKey.
191          * @param secretKey The secretKey to set
192          */
193         public static void setSecretKey(String secretKey) {
194                 HandleServiceConfig.secretKey = secretKey;
195         }
196
197 }