BEAWeblogicPoliciesValidator.java revision b87033953be26b0dc7dead8febd499b666a54126
/**
* 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: BEAWeblogicPoliciesValidator.java,v 1.1 2008/11/22 02:41:23 ak138937 Exp $
*
*/
/*
* Portions Copyrighted [2011] [ForgeRock AS]
*/
public class BEAWeblogicPoliciesValidator implements IWebContainerValidate {
private IToolOutput toolOutWriter;
/** Creates a new instance of SunAppSvrPoliciesValidator */
public BEAWeblogicPoliciesValidator() {
}
public void validate(
) throws DTException {
if (domainPath != null) {
toolOutWriter.printStatusMsg(true,
"webcontainer-instance-dir-check");
toolOutWriter.printStatusMsg(true,
"webcontainer-instance-lib-dir-check");
if (policiesPatternFile.exists() &&
try {
} catch (IOException ex) {
} finally {
try {
} catch (IOException ignored) {}
}
}
}
try {
boolean policiesStarted = false;
if (!policiesStarted) {
buffer = new StringBuffer();
policiesStarted = true;
}
} else {
policiesStarted = false;
POLICY_GRANT_START_PATTERN + "[{]");
for (Enumeration e =
e.hasMoreElements();) {
e.nextElement();
if (name.startsWith(
POLICIES_PATTERN)) {
policies))) {
name);
length(),
}
}
}
}
}
}
}
boolean passed = true;
for (Enumeration e =
e.hasMoreElements();) {
if (name.startsWith(
if (passed) {
"webcontainer-policies-invalid");
}
passed = false;
}
}
if (passed) {
toolOutWriter.printStatusMsg(true,
"webcontainer-policies-check");
} else {
toolOutWriter.printStatusMsg(false,
"webcontainer-policies-check");
}
} catch (IOException ex) {
} finally {
try {
} catch (IOException ignored) {}
}
}
} else {
"webcontainer-instance-lib-dir-invalid");
toolOutWriter.printStatusMsg(false,
"webcontainer-instance-lib-dir-check");
}
} else {
toolOutWriter.printStatusMsg(false,
"webcontainer-instance-dir-check");
}
}
}
}