DeleteXACML.java revision 9d652bb883e4c215dbdcab006aaf1941c3f412ba
/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2009 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: DeleteXACML.java,v 1.1 2009/11/25 18:54:08 dillidorai Exp $
*
* Portions Copyrighted 2014-2015 ForgeRock AS
*/
/**
* Deletes policies in a realm.
*/
public class DeleteXACML extends AuthenticatedCommand {
/**
* Services a Commandline Request.
*
* @param rc Request Context.
* @throws CLIException if the request cannot serviced.
*/
throws CLIException {
super.handleRequest(rc);
ldapLogin();
// FIXME: change to use entitlementService.xacmlPrivilegEnabled()
adminSubject, "/");
if(!ec.migratedToEntitlementService()) {
"list-xacml not supported in legacy policy mode"};
debugError("DeleteXACML.handleRequest(): "
+ "delete-xacml not supported in legacy policy mode");
"FAILED_DELETE_POLICY_IN_REALM",
args);
throw new CLIException(
"delete-xacml-not-supported-in-legacy-policy-mode"),
"delete-xacml");
}
if (policyNames == null) {
policyNames = new ArrayList();
}
}
if (policyNames.isEmpty()) {
}
try {
"ATTEMPT_DELETE_POLICY_IN_REALM", params);
"SUCCEED_DELETE_POLICY_IN_REALM", params);
}
getResourceString("delete-policy-in-realm-succeed"),
} catch (EntitlementException e) {
debugError("DeleteXACML.handleRequest", e);
"FAILED_DELETE_POLICY_IN_REALM", args);
}
}
}