2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeper * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeper * Copyright (c) 2008 Sun Microsystems Inc. All Rights Reserved
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeper * The contents of this file are subject to the terms
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeper * of the Common Development and Distribution License
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeper * (the License). You may not use this file except in
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeper * compliance with the License.
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeper * You can obtain a copy of the License at
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeper * https://opensso.dev.java.net/public/CDDLv1.0.html or
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeper * See the License for the specific language governing
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeper * permission and limitations under the License.
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeper * When distributing Covered Code, include this CDDL
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeper * Header Notice in each file and include the License file
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeper * If applicable, add the following below the CDDL Header,
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeper * with the fields enclosed by brackets [] replaced by
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeper * your own identifying information:
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeper * "Portions Copyrighted [year] [name of copyright owner]"
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeper * $Id: AgentAppBase.java,v 1.1 2009/01/21 18:43:52 kanduls Exp $
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeperpackage com.sun.identity.agents.tools.jetty.v61;
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeperimport com.sun.identity.install.tools.configurator.IStateAccess;
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeperimport com.sun.identity.install.tools.util.ConfigUtil;
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeperimport com.sun.identity.install.tools.util.Debug;
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeperimport com.sun.identity.install.tools.util.FileUtils;
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeperpublic class AgentAppBase implements IConstants, IConfigKeys {
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeper protected boolean copyAgentAppWarFile(IStateAccess stateAccess) {
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeper boolean status = false;
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeper String destDir = (String)stateAccess.get(STR_KEY_JETTY_INST_DEPLOY_DIR);
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeper FileUtils.copyJarFile(srcDir, destDir, STR_AGENT_APP_WAR_FILE);
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeper Debug.log("ConfigureAgentAppTask.copyAgentAppWarFile() - copy "
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeper + STR_AGENT_APP_WAR_FILE + " from " + srcDir + " to "
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeper "copyAgentAppWarFile() - Error occured while copying "
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeper protected boolean removeAgentAppWar(IStateAccess stateAccess) {
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeper boolean status = false;
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeper String destDir = (String)stateAccess.get(STR_KEY_JETTY_INST_DEPLOY_DIR);
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeper String agentAppWar = destDir + STR_FORWARD_SLASH +
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeper Debug.log("ConfigureAgentAppTask.removeAgentAppWar(): "
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeper Debug.log("ConfigureAgentAppTask.removeAgentAppWar(): "
2be3e935b5cdea10ddcaf8afff4790d7ce09e950Mark de Reeper + " Failed to remove file " + agentAppWar, e);