J2EEAgentConfigValidator.java revision 8af80418ba1ec431c8027fa9668e5678658d3611
/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2008 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: J2EEAgentConfigValidator.java,v 1.1 2008/11/22 02:41:19 ak138937 Exp $
*
*/
/*
* Portions Copyrighted [2011] [ForgeRock AS]
*/
/**
* This is a supporting class to validate the J2EE agent configuration
* properties.
*/
public class J2EEAgentConfigValidator extends AgentBase implements
private IToolOutput toolOutWriter;
public J2EEAgentConfigValidator() {
}
/**
* Validate the configuration.
*/
} else {
}
} else {
}
}
private String getAppSSOTokenStr() {
try {
"/identity/authenticate";
// authenticate
} else {
}
} catch (Exception e) {
}
return token;
}
boolean loaded = true;
try {
} catch (Exception e) {
loaded = false;
}
return loaded;
}
private boolean validateBootProperties() {
boolean valid = false;
//At this point the properties are already initilized
if (ValidateServer(nURLStr)) {
if (ValidateConnectToServer(nURLStr)) {
valid = true;
} else {
//Fatal error cannot proceed: Naming URL
}
} else {
}
}
return valid;
}
boolean valid = false;
//entry is not swapped
} else {
valid = true;
}
return valid;
}
boolean valid = false;
try {
} else {
if (canConnectToServer(nURLStr)) {
if (isServerURLUp(url)) {
valid = true;
}
}
}
} catch (Exception e) {
"J2EEAgentConfigValidator.ValidateConnectToServer: " +
"Server connection Exception", e);
}
return valid;
}
boolean valid = true;
if (isServerRunning(sURL)) {
new String[] {"OK"});
} else {
new String[] {"FAILED"});
valid = false;
}
return valid;
}
boolean connect = true;
try {
if (connectToServer(svrName)) {
new String[] {"OK"});
} else {
connect = false;
}
connect = false;
} catch (Exception e) {
connect = false;
}
if (!connect) {
new String[] {"FAILED"});
}
return connect;
}
try {
"&attributes_names=objecttype" +
"&attributes_values_objecttype=Agent"
} else {
}
"J2EEAgentConfigValidator.processAgents: " +
"Exception", ex);
}
}
}
boolean valid = true;
if (enable) {
valid = false;
}
}
}
private void checkServerTime() {
try {
new String[] {getLocalDateAsGMTString()});
} catch (Exception e) {
"J2EEAgentConfigValidator.checkServerTime: " +
"Getting server time Exception", e);
}
}
}