80c77071c6700660c39046da32a0d7953620f608Mark de Reeper * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper * Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper * The contents of this file are subject to the terms
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper * of the Common Development and Distribution License
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper * (the License). You may not use this file except in
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper * compliance with the License.
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper * You can obtain a copy of the License at
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper * https://opensso.dev.java.net/public/CDDLv1.0.html or
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper * See the License for the specific language governing
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper * permission and limitations under the License.
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper * When distributing Covered Code, include this CDDL
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper * Header Notice in each file and include the License file
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper * If applicable, add the following below the CDDL Header,
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper * with the fields enclosed by brackets [] replaced by
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper * your own identifying information:
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper * "Portions Copyrighted [year] [name of copyright owner]"
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper * $Id: GrantJavaPermissionsTask.java,v 1.2 2008/06/25 05:52:02 qcheng Exp $
80c77071c6700660c39046da32a0d7953620f608Mark de Reeperpackage com.sun.identity.agents.install.appserver;
80c77071c6700660c39046da32a0d7953620f608Mark de Reeperimport com.sun.identity.install.tools.configurator.IStateAccess;
80c77071c6700660c39046da32a0d7953620f608Mark de Reeperimport com.sun.identity.install.tools.configurator.ITask;
80c77071c6700660c39046da32a0d7953620f608Mark de Reeperimport com.sun.identity.install.tools.configurator.InstallConstants;
80c77071c6700660c39046da32a0d7953620f608Mark de Reeperimport com.sun.identity.install.tools.configurator.InstallException;
80c77071c6700660c39046da32a0d7953620f608Mark de Reeperimport com.sun.identity.install.tools.util.LocalizedMessage;
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper * The class grants Java Permissions for Agent
80c77071c6700660c39046da32a0d7953620f608Mark de Reeperpublic class GrantJavaPermissionsTask extends JavaPermissionsBase
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper public boolean execute(String name, IStateAccess stateAccess,
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper public LocalizedMessage getExecutionMessage(IStateAccess stateAccess,
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper String serverPolicyFile = getServerPolicyFile(stateAccess);
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper LocalizedMessage message = LocalizedMessage.get(
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper LOC_TSK_MSG_GRANT_JAVA_PERMS_EXECUTE, STR_AS_GROUP, args);
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper public LocalizedMessage getRollBackMessage(IStateAccess stateAccess,
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper String serverPolicyFile = getServerPolicyFile(stateAccess);
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper LocalizedMessage message = LocalizedMessage.get(
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper LOC_TSK_MSG_GRANT_JAVA_PERMS_ROLLBACK, STR_AS_GROUP, args);
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper public boolean rollBack(String name, IStateAccess stateAccess,
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper public static final String LOC_TSK_MSG_GRANT_JAVA_PERMS_EXECUTE =
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper "TSK_MSG_GRANT_JAVA_PERMS_EXECUTE";
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper public static final String LOC_TSK_MSG_GRANT_JAVA_PERMS_ROLLBACK =
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper "TSK_MSG_GRANT_JAVA_PERMS_ROLLBACK";
80c77071c6700660c39046da32a0d7953620f608Mark de Reeper private static final String STR_AS_GROUP = "asTools";