/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2007 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: ClientConfiguratorFilter.java,v 1.7 2009/12/05 02:33:36 222713 Exp $
*
*/
/**
* This filter brings user to a configuration page when client sample WAR
* is not configured yeti, it will set the configuration properties if
* the WAR is already configured.
*/
// see if the configure.jsp page is executed
public static boolean isConfigured = false;
private boolean passThrough = false;
/**
* Redirects request to configuration page if the product is not yet
* configured.
*
* @param request Servlet Request.
* @param response Servlet Response.
* @param filterChain Filter Chain.
* @throws ServletException if there are errors in the servlet space.
*/
public void doFilter(
) throws IOException, ServletException {
try {
// pass through on Configurator page
passThrough = true;
} else if (passThrough) {
} else if (!isConfigured) {
passThrough = true;
} else {
}
}
}
/**
* Destroy the filter config on sever shutdowm
*/
public void destroy() {
}
/**
* Initializes the filter.
*
* @param filterConfig Filter Configuration.
*/
}
}
}
/**
* Initializes the filter configuration.
*
* @param fconfig Filter Configuration.
*/
}
/**
* Sets properties from AMConfig.properties
* @param configFile path to the AMConfig.properties file
* @throws ServletException when error occurs
*/
throws ServletException {
try {
isConfigured = true;
} else {
}
} catch (FileNotFoundException fexp) {
} catch (IOException ioexp) {
} finally {
try {
} catch (IOException ioe) {
}
}
}
}
}