/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: InteractionConfig.java,v 1.5 2008/08/06 17:28:10 exu Exp $
*
*/
/**
* Class that provides access to configuration settings of interaction
* service and redirect based user interactions.
*
*/
class InteractionConfig {
= "com.sun.identity.liberty.interaction.wscSpecifiedInteractionChoice";
= "interactIfNeeded";
= "doNotInteract";
= "doNotInteractForData";
= "com.sun.identity.liberty.interaction." +
"wscWillInlcudeUserInteractionHeader";
= "com.sun.identity.liberty.interaction." +
"wscWillIncludeUserInteractionHeader";
= "com.sun.identity.liberty.interaction.wscWillRedirect";
= "com.sun.identity.liberty.interaction.wscSpecifiedMaxInteractionTime";
= "com.sun.identity.liberty.interaction.wscWillEnforceHttpsCheck";
= "com.sun.identity.liberty.interaction.wspWillRedirect";
= "com.sun.identity.liberty.interaction.wspWillRedirectForData";
= "com.sun.identity.liberty.interaction.wspRedirectTime";
= "com.sun.identity.liberty.interaction.wspRedirectHandler";
= "com.sun.identity.liberty.interaction.interactionConfigClass";
= "com.sun.identity.liberty.interaction.lbWspRedirectHandler";
= "com.sun.identity.liberty.interaction.trustedWspRedirectHandlers";
= "com.sun.identity.liberty.interaction.wspWillEnforceHttpsCheck";
static final String
= "com.sun.identity.liberty.interaction." +
"wspWillEnforceReturnToHostEqualsRequestHost";
= "com.sun.identity.liberty.interaction.htmlStyleSheetLocation";
= "com.sun.identity.liberty.interaction.wmlStyleSheetLocation";
private boolean wscWillIncludeUserInteractionHeader = true;
private boolean wscWillRedirect = true;
private int wscSpecifiedMaxInteractionTime
private boolean wscWillEnforceHttpsCheck = false;
private boolean wspWillRedirect = true;
private boolean wspWillRedirectForData = true;
private int wspRedirectTime
private boolean wspWillEnforceHttpsCheck = false;
private boolean wspWillEnforceReturnToHostEqualsRequestHost = false;
if (interactionConfig == null) {
if (debug.messageEnabled()) {
+ "interactionConfigClassName:"
}
if (interactionConfigClassName == null) {
if (debug.messageEnabled()) {
+ " interactionConfigClassName not specified,"
+ " defaulting to "
+ " federation library InteractionConfig");
}
interactionConfig = new InteractionConfig();
} else {
try {
.newInstance();
} catch (InstantiationException ie) {
+ " Can not instantiate class:"
} catch (IllegalAccessException iae) {
+ " Illegal access to class:"
} catch (ClassNotFoundException cnfe) {
+ " class not found :"
} finally {
if (interactionConfig == null ) {
if (debug.warningEnabled()) {
+ "did not find configured class, "
+ " would use config class:"
+ "com.sun.identity.liberty.ws."
+ "interaction.InteractionConfig");
}
interactionConfig = new InteractionConfig();
}
}
}
if (debug.messageEnabled()) {
}
}
return interactionConfig;
}
protected InteractionConfig() {
initialize();
if (debug.messageEnabled()) {
+ "with Values="+toString());
}
}
boolean wscIncludesUserInteractionHeader() {
}
boolean wscSupportsRedirect() {
return wscWillRedirect;
}
return wscSpecifiedInteractionChoice;
}
return wscSpecifiedMaxInteractionTime;
}
return wscSpecifiedConnectTo;
}
boolean wscEnforcesHttpsCheck() {
return wscWillEnforceHttpsCheck;
}
int getWSPRedirectTime() {
return wspRedirectTime;
}
return wspRedirectHandler;
}
return lbWspRedirectHandler;
}
return trustedWspRedirectHandlers;
}
return localServerId;
}
boolean wspSupportsRedirect() {
return wspWillRedirect;
}
boolean wspRedirectsForData() {
return wspWillRedirectForData;
}
boolean wspEnforcesHttpsCheck() {
return wspWillEnforceHttpsCheck;
}
boolean wspEnforcesReturnToHostEqualsRequestHost() {
}
return htmlStyleSheetLocation;
}
return wmlStyleSheetLocation;
}
+ wspWillRedirect);
+ wspRedirectTime);
+ localServerId);
}
protected void initialize() {
if (s != null) {
if (s.equals(INTERACT_IF_NEEDED)) {
} else if(s.equals(DO_NOT_INTERACT)) {
} else if (s.equals(DO_NOT_INTERACT_FOR_DATA)) {
} else {
//default
if (debug.warningEnabled()) {
+ "invalid wscSpecifiedInteractionChoice=" + s
+ ":defaulting to = " + INTERACT_IF_NEEDED);
}
}
} else {
//default
if (debug.warningEnabled()) {
+ "wscSpecifiedInteractionChoice not specified "
+ ":defaulting to = " + INTERACT_IF_NEEDED);
}
}
if ( s == null) {
}
if (s != null) {
if (s.equalsIgnoreCase(YES)) {
} else {
wscWillIncludeUserInteractionHeader = false;
}
} else {
//default
if (debug.warningEnabled()) {
+ "wscWillIncludeUerInteractionHeader not specified"
+ ":defaulting to = " + "true");
}
}
if (s != null) {
if (s.equalsIgnoreCase(YES)) {
wscWillRedirect = true;
} else {
wscWillRedirect = false;
}
} else {
//default
if (debug.warningEnabled()) {
+ "wscWillRedirect not specified"
+ ":defaulting to = " + "true");
}
wscWillRedirect = true;
}
if (s != null) {
try {
} catch (NumberFormatException nfe) {
+ "invalid wscSpecifiedMaxInteractionTime=" + s, nfe);
+ "defaulting wscSpecifiedMaxInteractionTimeto="
}
} else {
//default
if (debug.warningEnabled()) {
+ "wscSpecifiedMaxInteractionTime not specified"
+ ":defaulting to = "
}
}
if (s != null) {
if (s.equalsIgnoreCase(YES)) {
wscWillEnforceHttpsCheck = true;
} else {
wscWillEnforceHttpsCheck = false;
}
} else {
//default
if (debug.warningEnabled()) {
+ "wscWillEnforceHttpsCheck not specified"
+ ":defaulting to = " + "true");
}
wscWillEnforceHttpsCheck = true;
}
if (s != null) {
if (s.equalsIgnoreCase(YES)) {
wspWillRedirect = true;
} else {
wspWillRedirect = false;
}
} else {
//default
if (debug.warningEnabled()) {
+ "wspWillRedirect not specified"
+ ":defaulting to = " + "true");
}
wspWillRedirect = true;
}
if (s != null) {
if (s.equalsIgnoreCase(YES)) {
wspWillRedirectForData = true;
} else {
wspWillRedirectForData = false;
}
} else {
//default
if (debug.warningEnabled()) {
+ "wspWillRedirectForData not specified"
+ ":defaulting to = " + "true");
}
wspWillRedirectForData = true;
}
if (s != null) {
try {
} catch (NumberFormatException nfe) {
+ "invalid wspRedirectTime=" + s, nfe);
+ "defaulting wspRedirectTime="
}
} else {
//default
if (debug.warningEnabled()) {
+ "wspRedirectTime not specified"
+ ":defaulting to = "
}
}
if (s != null) {
if (s.equalsIgnoreCase(YES)) {
wspWillEnforceHttpsCheck = true;
} else {
wspWillEnforceHttpsCheck = false;
}
} else {
//default
if (debug.warningEnabled()) {
+ "wspWillEnforceHttpsCheck not specified"
+ ":defaulting to = " + "true");
}
wspWillEnforceHttpsCheck = true;
}
if (s != null) {
if (s.equalsIgnoreCase(YES)) {
} else {
}
} else {
//default
if (debug.warningEnabled()) {
+ "wspWillEnforceReturnToHostEqualsRequestHost not "
+ " specified:defaulting to = " + "true");
}
}
if (wspRedirectHandler == null) {
+ "wspRedirectHandler is null");
}
if (lbWspRedirectHandler == null) {
if(debug.messageEnabled()) {
+ "lbWspRedirectHandler is null");
}
}
if (trustedRedirectHandlersString == null) {
if(debug.messageEnabled()) {
+ "trustedRedirectHandlersString is null");
}
} else {
int handlerId = 1;
while (st.hasMoreTokens()) {
handlerId++;
}
}
localServerId = key;
break;
}
}
if (localServerId == null) {
+ "local serverId is null for wspRedirectHandler:"
}
if (htmlStyleSheetLocation == null) {
+ "htmlStyleSheetLocation is null");
}
if (wmlStyleSheetLocation == null) {
+ "wmlStyleSheetLocation is null");
}
}
}