org.jboss.services.deployment
Class DeploymentManager

java.lang.Object
  extended by org.jboss.services.deployment.DeploymentManager

public class DeploymentManager
extends Object

Class handling JBoss module generation. Uses apache velocity for generating deployment descriptors.

Version:
$Revision: 57210 $
Author:
Dimitris Andreadis

Field Summary
static String CONTEXT_HELPER
          a helper object to pass in to the template
static String TEMPLATE_CONFIG_FILE
          the filename to look for in template subdirectories
static String TEMPLATE_ERROR_PARAM
          an object to pass back from the template to trigger an error
 
Constructor Summary
DeploymentManager(String templateDir, String undeployDir, String deployDir, org.jboss.logging.Logger log)
           
 
Method Summary
 String createModule(String module, String template, HashMap properties)
           
 URL getDeployedURL(String module)
           
 List getTemplatePropertyInfo(String template)
          Get property metadata information for a particular template
 URL getUndeployedURL(String module)
           
 Set listModuleTemplates()
          Return the list of available templates
 void moveToDeployDir(String module)
           
 void moveToModuleDir(String module)
           
 boolean removeModule(String module)
          Remove a module if exists
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEMPLATE_CONFIG_FILE

public static final String TEMPLATE_CONFIG_FILE
the filename to look for in template subdirectories

See Also:
Constant Field Values

TEMPLATE_ERROR_PARAM

public static final String TEMPLATE_ERROR_PARAM
an object to pass back from the template to trigger an error

See Also:
Constant Field Values

CONTEXT_HELPER

public static final String CONTEXT_HELPER
a helper object to pass in to the template

See Also:
Constant Field Values
Constructor Detail

DeploymentManager

public DeploymentManager(String templateDir,
                         String undeployDir,
                         String deployDir,
                         org.jboss.logging.Logger log)
                  throws Exception
Parameters:
templateDir - the root dir where templates are stored
packageDir - the directory to store generated packages
Throws:
Exception
Method Detail

listModuleTemplates

public Set listModuleTemplates()
Return the list of available templates


getTemplatePropertyInfo

public List getTemplatePropertyInfo(String template)
                             throws Exception
Get property metadata information for a particular template

Parameters:
template -
Returns:
list with PropertyInfo objects associated with the template
Throws:
Exception - if the template does not exist

createModule

public String createModule(String module,
                           String template,
                           HashMap properties)
                    throws Exception
Throws:
Exception

removeModule

public boolean removeModule(String module)
Remove a module if exists

Parameters:
module - the module to remove
Returns:
true if removed, false if module does not exist or an error occurs

moveToDeployDir

public void moveToDeployDir(String module)
                     throws Exception
Throws:
Exception

moveToModuleDir

public void moveToModuleDir(String module)
                     throws Exception
Throws:
Exception

getDeployedURL

public URL getDeployedURL(String module)
                   throws Exception
Throws:
Exception

getUndeployedURL

public URL getUndeployedURL(String module)
                     throws Exception
Throws:
Exception


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.