org.jboss.services.deployment
Class DeploymentManager

java.lang.Object
  extended byorg.jboss.services.deployment.DeploymentManager

public class DeploymentManager
extends java.lang.Object

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


Field Summary
static java.lang.String CONTEXT_HELPER
          a helper object to pass in to the template
static java.lang.String TEMPLATE_CONFIG_FILE
          the filename to look for in template subdirectories
static java.lang.String TEMPLATE_ERROR_PARAM
          an object to pass back from the template to trigger an error
 
Constructor Summary
DeploymentManager(java.lang.String templateDir, java.lang.String undeployDir, java.lang.String deployDir, Logger (src)  log)
           
 
Method Summary
 java.lang.String createModule(java.lang.String module, java.lang.String template, java.util.HashMap properties)
           
 java.net.URL getDeployedURL(java.lang.String module)
           
 java.util.List getTemplatePropertyInfo(java.lang.String template)
          Get property metadata information for a particular template
 java.net.URL getUndeployedURL(java.lang.String module)
           
 java.util.Set listModuleTemplates()
          Return the list of available templates
 void moveToDeployDir(java.lang.String module)
           
 void moveToModuleDir(java.lang.String module)
           
 boolean removeModule(java.lang.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 java.lang.String TEMPLATE_CONFIG_FILE
the filename to look for in template subdirectories

See Also:
Constant Field Values (src)

TEMPLATE_ERROR_PARAM

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

See Also:
Constant Field Values (src)

CONTEXT_HELPER

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

See Also:
Constant Field Values (src)
Constructor Detail

DeploymentManager

public DeploymentManager(java.lang.String templateDir,
                         java.lang.String undeployDir,
                         java.lang.String deployDir,
                         Logger (src)  log)
                  throws java.lang.Exception
Parameters:
templateDir - the root dir where templates are stored
Method Detail

listModuleTemplates

public java.util.Set listModuleTemplates()
Return the list of available templates


getTemplatePropertyInfo

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

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

createModule

public java.lang.String createModule(java.lang.String module,
                                     java.lang.String template,
                                     java.util.HashMap properties)
                              throws java.lang.Exception
Throws:
java.lang.Exception

removeModule

public boolean removeModule(java.lang.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(java.lang.String module)
                     throws java.lang.Exception
Throws:
java.lang.Exception

moveToModuleDir

public void moveToModuleDir(java.lang.String module)
                     throws java.lang.Exception
Throws:
java.lang.Exception

getDeployedURL

public java.net.URL getDeployedURL(java.lang.String module)
                            throws java.lang.Exception
Throws:
java.lang.Exception

getUndeployedURL

public java.net.URL getUndeployedURL(java.lang.String module)
                              throws java.lang.Exception
Throws:
java.lang.Exception