ServerXMLBase.java revision 8f2e32e3c8f43b9b84cfd30b36477d4fb69acb71
/**
* 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: ServerXMLBase.java,v 1.2 2008/11/28 12:36:22 saueree Exp $
*/
/*
* Portions Copyrighted 2011-2013 ForgeRock AS
*/
public ServerXMLBase() {
}
boolean status = false;
try {
// remove the realm
} catch (Exception e) {
"ServerXMLBase.unconfigureServerXML(): "
+ " encountered exception " + e.getMessage());
}
return status;
}
private boolean unconfigureRealm(
boolean result = false;
try {
.getChildElements();
if (serviceElement.getName()
int count = 0;
int index = 0;
.getChildElements();
count++) {
count);
if (engineElement.getName()
ELEMENT_ENGINE)) {
boolean realmExists = false;
.getChildElements();
index++) {
if (engineChild.getName()
ELEMENT_REALM)) {
{
"ServerXMLBase.unconfigureRealm():"
+ " Found and removing " +
"Agent Realm!");
realmExists = true;
break;
}
}
}
if (realmExists) {
.get(
"name"));
if ((previousRealm != null)
"ServerXMLBase.unconfigureRealm(): "
+ "restoring previous realm "
+ previousRealm);
index);
}
result = true;
}
}
}
}
}
"ServerXMLbase.unconfigureRealm(): encountered exception "
+ ex.getMessage(),
ex);
result = false;
}
return result;
}
}
}