47ff84d4220f3d1fdc7f102b5663ed1fc4955505
[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 hsURL = "http://shib2.internet2.edu/shibboleth/HS";
15         private static String helpText =
16                 "In order to fulfill the request for the web"
17                         + " resource you have just chosen, information must be sent from your home institution to the "
18                         + "provider of the resource.  The web resource should load automatically.  If it does not load within "
19                         + "five seconds, click on the Transmit button.";
20         private static String detailedHelpURL = "http://blah";
21         private static String handleRepositoryImplementation =
22                 "edu.internet2.middleware.shibboleth.common.provider.MemoryHandleRepository";
23         private static String validityPeriod = "1400000";
24         private static String domain = "internet2.edu";
25         private static String issuer = "shib2.internet2.edu";
26         private static String aaURL = "https://shib2.internet2.edu/shibb/servlet/AAServlet";
27         private static String secretKey;
28
29         /**
30          * Constructor for HandleServiceConfig.
31          */
32         public HandleServiceConfig() {
33                 super();
34         }
35
36         /**
37          * Gets the logoLocation.
38          * @return Returns a String
39          */
40         public static String getLogoLocation() {
41                 return logoLocation;
42         }
43
44         /**
45          * Sets the logoLocation.
46          * @param logoLocation The logoLocation to set
47          */
48         public static void setLogoLocation(String logoLocation) {
49                 HandleServiceConfig.logoLocation = logoLocation;
50         }
51
52         /**
53          * Gets the supportContact.
54          * @return Returns a String
55          */
56         public static String getSupportContact() {
57                 return supportContact;
58         }
59
60         /**
61          * Sets the supportContact.
62          * @param supportContact The supportContact to set
63          */
64         public static void setSupportContact(String supportContact) {
65                 HandleServiceConfig.supportContact = supportContact;
66         }
67
68         /**
69          * Gets the helpText.
70          * @return Returns a String
71          */
72         public static String getHelpText() {
73                 return helpText;
74         }
75
76         /**
77          * Sets the helpText.
78          * @param helpText The helpText to set
79          */
80         public static void setHelpText(String hs_helpText) {
81                 HandleServiceConfig.helpText = hs_helpText;
82         }
83
84         /**
85          * Gets the handleRepositoryImplementation.
86          * @return Returns a String
87          */
88         public static String getHandleRepositoryImplementation() {
89                 return handleRepositoryImplementation;
90         }
91
92         /**
93          * Sets the handleRepositoryImplementation.
94          * @param handleRepositoryImplementation The handleRepositoryImplementation to set
95          */
96         public static void setHandleRepositoryImplementation(String handleRepositoryImplementation) {
97                 HandleServiceConfig.handleRepositoryImplementation = handleRepositoryImplementation;
98         }
99
100         /**
101          * Gets the detailedHelpURL.
102          * @return Returns a String
103          */
104         public static String getDetailedHelpURL() {
105                 return detailedHelpURL;
106         }
107
108         /**
109          * Sets the detailedHelpURL.
110          * @param detailedHelpURL The detailedHelpURL to set
111          */
112         public static void setDetailedHelpURL(String hs_detailedHelpURL) {
113                 HandleServiceConfig.detailedHelpURL = hs_detailedHelpURL;
114         }
115
116         /**
117          * Gets the hsURL.
118          * @return Returns a String
119          */
120         public static String getHsURL() {
121                 return hsURL;
122         }
123
124         /**
125          * Sets the hsURL.
126          * @param hsURL The hsURL to set
127          */
128         public static void setHsURL(String hs_location) {
129                 HandleServiceConfig.hsURL = hs_location;
130         }
131
132         /**
133          * Gets the ticket.
134          * @return Returns a String
135          */
136         public static String getValidityPeriod() {
137                 return validityPeriod;
138         }
139
140         /**
141          * Sets the ticket.
142          * @param ticket The ticket to set
143          */
144         public static void setValidityPeriod(String validityPeriod) {
145                 HandleServiceConfig.validityPeriod = validityPeriod;
146         }
147
148         /**
149          * Gets the domain.
150          * @return Returns a String
151          */
152         public static String getDomain() {
153                 return domain;
154         }
155
156         /**
157          * Sets the domain.
158          * @param domain The domain to set
159          */
160         public static void setDomain(String domain) {
161                 HandleServiceConfig.domain = domain;
162         }
163
164         /**
165          * Gets the issuer.
166          * @return Returns a String
167          */
168         public static String getIssuer() {
169                 return issuer;
170         }
171
172         /**
173          * Sets the issuer.
174          * @param issuer The issuer to set
175          */
176         public static void setIssuer(String issuer) {
177                 HandleServiceConfig.issuer = issuer;
178         }
179
180         /**
181          * Gets the aaURL.
182          * @return Returns a String
183          */
184         public static String getAaURL() {
185                 return aaURL;
186         }
187
188         /**
189          * Sets the aaURL.
190          * @param aaURL The aaURL to set
191          */
192         public static void setAaURL(String aaURL) {
193                 HandleServiceConfig.aaURL = aaURL;
194         }
195
196         /**
197          * Gets the secretKey.  Can only be retrieved one time.
198          * @return Returns a String
199          */
200         public static String getSecretKey() {
201                 String cacheKey = secretKey;
202                 secretKey = null;
203                 return cacheKey;
204         }
205
206         /**
207          * Sets the secretKey.
208          * @param secretKey The secretKey to set
209          */
210         public static void setSecretKey(String secretKey) {
211                 HandleServiceConfig.secretKey = secretKey;
212         }
213
214 }