/*
 * JBoss, the OpenSource J2EE webOS
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package org.jboss.services.deployment;

/**
 * MBean interface.
 */
public interface DeploymentServiceMBean extends org.jboss.system.ListenerServiceMBean
{

   void setTemplateDir(java.lang.String templateDir);

   java.lang.String getTemplateDir();

   java.lang.String getUndeployDir();

   void setUndeployDir(java.lang.String undeployDir);

   java.lang.String getDeployDir();

   void setDeployDir(java.lang.String deployDir);

   java.util.Set listModuleTemplates();

   java.util.List getTemplatePropertyInfo(java.lang.String template) throws java.lang.Exception;

   java.lang.String createModule(java.lang.String module, java.lang.String template, java.util.HashMap properties)
         throws java.lang.Exception;

   /**
    * Used primarily for testing through the jmx-console
    */
   java.lang.String createModule(java.lang.String module, java.lang.String template, java.lang.String[] properties)
         throws java.lang.Exception;

   boolean removeModule(java.lang.String module);

   void deployModuleAsynch(java.lang.String module) throws java.lang.Exception;

   java.net.URL getDeployedURL(java.lang.String module) throws java.lang.Exception;

   void undeployModuleAsynch(java.lang.String module) throws java.lang.Exception;

   java.net.URL getUndeployedURL(java.lang.String module) throws java.lang.Exception;

   /**
    * Upload a new library to server lib dir. A different filename may be specified, when writing the library. If the target filename exists, upload is not performed.
    * @param src the source url to copy
    * @param filename the filename to use when copying (optional)
    * @return true if upload was succesful, false otherwise    */
   boolean uploadLibrary(java.net.URL src, java.lang.String filename);

}
