/**
* 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: TestInstaller.java,v 1.5 2008/08/19 19:09:34 veiming Exp $
*
*/
/**
* This class is the first class to get loaded by the Servlet container.
* It has helper methods to determine the status of OpenSSO
* configuration when deployed as a single web-application. If
* OpenSSO server is not deployed as single web-application then the
* configured status returned is always true.
*/
public class TestInstaller {
void install() {
try {
} catch (FileNotFoundException e) {
"File not found Exception occured");
e.printStackTrace();
} catch (SecurityException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} catch (SMSException e) {
e.printStackTrace();
} catch (PolicyException e) {
e.printStackTrace();
} catch (SSOException e) {
e.printStackTrace();
}
}
private static void setServiceDefaultValues() {
"/openssounittest";
if (platformLocale != null) {
}
}
private static void reInitConfigProperties()
throws FileNotFoundException, IOException {
reInitConfigProperties(basedir, true);
}
/**
* Reinitializes the system with the new properties values.
*
* @throws FileNotFoundException if config file is missing.
* @throws IOException if config file cannot be read.
*/
private static void reInitConfigProperties(
boolean initAMConfig
) throws FileNotFoundException, IOException
{
if (initAMConfig) {
}
}
throws FileNotFoundException, IOException
{
// Read config file and initialize
try {
} else {
"TestInstaller.reInitAMConfigProperties: Unable to open: " +
fileName);
}
} catch (FileNotFoundException e) {
"Unable to re-initialize properties");
throw e;
} catch (IOException e) {
"Unable to load properties");
throw e;
}
}
/**
* Helper method to return Admin token
* @return Admin Token
*/
if (adminToken == null) {
}
return adminToken;
}
/**
* Initialize AMConfig.propeties with host specific values
*/
private static void initializeConfigProperties()
throws SecurityException, IOException {
try {
} catch (SecurityException e){
throw e;
}
new FileInputStream(file));
char[] cbuf = new char[1024];
int len;
}
try {
} catch (IOException e) {
throw e;
} finally {
try {
//No handling requried
}
}
try {
//No handling requried
}
}
}
}
}
throws MissingResourceException
{
while (st.hasMoreTokens()) {
}
return fileNames;
}
}
}