All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ow2.util.plan.deployer.api.IDeploymentPlanDeployer Maven / Gradle / Ivy

The newest version!
/**
 * OW2 Util
 * Copyright (C) 2008-2012
 * Contact: [email protected]
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
* USA
*
* --------------------------------------------------------------------------
* $Id: IDeploymentPlanDeployer.java 6238 2012-04-18 11:02:59Z sauthieg $
* --------------------------------------------------------------------------
*/

package org.ow2.util.plan.deployer.api;

import java.util.List;

import org.ow2.util.ee.deploy.api.deployer.IDeployer;
import org.ow2.util.ee.deploy.api.deployer.IDeployerManager;
import org.ow2.util.ee.deploy.api.deployer.UnsupportedDeployerException;
import org.ow2.util.plan.bindings.deploymentplan.Deployment;
import org.ow2.util.plan.deploy.deployable.api.DeploymentPlanDeployable;
import org.ow2.util.plan.fetcher.api.IResourceFetcherFactoryManager;
import org.ow2.util.plan.monitor.api.IResourceMonitor;
import org.ow2.util.plan.reader.plan.IPlanReader;

/**
 * Interface for deployment plans deployer.
 * @author mleduque
 */
public interface IDeploymentPlanDeployer extends IDeployer {
    /**
     * Sets the planReader.
     * @param planReader the new planReader.
     */
    void setPlanReader(IPlanReader planReader);

    /**
     * Gets the planReader.
     * @return the PlanReader.
     */
    IPlanReader getPlanReader();

    /**
     * Sets the fetcher factories manager.
     * @param factoryManager the new fetcher factories manager.
     */
    void setFetcherFactoryManager(IResourceFetcherFactoryManager factoryManager);

    /**
     * Returns the fetcher factories manager.
     * @return the the fetcher factories manager.
     */
    IResourceFetcherFactoryManager getFetcherFactoryManager();

    /**
     * Sets the deployer manager.
     * @param deployerManager the new deployer manager.
     */
    void setDeployerManager(IDeployerManager deployerManager);

    /**
     * Returns the deployer manager.
     * @return the deployer manager.
     */
    IDeployerManager getDeployerManager();

    /**
     * Gives the number of deployed deployment plans.
     * @return the number of deployed deployment plans.
     */
    Integer getDeploymentPlansCount();

    /**
     * Gives the path of the deployed deployment plans.
     * @return the path of the deployed deployment plans.
     */
    List getDeploymentPlansUrls();

    /**
     * Returns the list of deployed deployment plans Ids.
     * @return the list of deployed deployment plans Ids.
     */
    List getDeploymentPlansIds();

    /**
     * Sets the resource monitor.
     * @param resourceMonitor the new resource monitor.
     */
    void setResourceMonitor(IResourceMonitor resourceMonitor);

    /**
     * Returns the resource monitor.
     * @return the resource monitor.
     */
    IResourceMonitor getResourceMonitor();

    /**
     * Deploys a deployment.
     * @param deployment the deployment.
     * @throws FragmentDeploymentException if deployment was not successful.
     * @throws UnsupportedDeployerException any.
     */
    void deployDeployment(Deployment deployment) throws FragmentDeploymentException, UnsupportedDeployerException;

    /**
     * Undeploy a deployment.
     * @param deployment the deployment.
     * @throws FragmentUndeploymentException if undeployment was not successful.
     */
    void undeployDeployment(Deployment deployment) throws FragmentUndeploymentException;

    /**
     * Returns the deployment plan deployable that owns the deployment, or null if none could be found.
     * @param deployment the deployment.
     * @return the owner deployment plan deployable.
     */
    DeploymentPlanDeployable getOwnerDeploymentPlanDeployable(Deployment deployment);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy