org.rhq.core.util.updater
Class DeploymentData

java.lang.Object
  extended by org.rhq.core.util.updater.DeploymentData

public class DeploymentData
extends Object

Data that describes a particular deployment. In effect, this provides the data needed to fully deploy something.

Author:
John Mazzitelli

Constructor Summary
DeploymentData(DeploymentProperties deploymentProps, Set<File> zipFiles, Map<File,File> rawFiles, File sourceDir, File destinationDir, Map<File,Pattern> zipEntriesToRealizeRegex, Set<File> rawFilesToRealize, TemplateEngine templateEngine, Pattern ignoreRegex, boolean manageRootDir, Map<File,Boolean> zipsExploded)
          Constructors that prepares this object with the data that is necessary in order to deploy archive/file content a destination directory.
 
Method Summary
 DeploymentProperties getDeploymentProps()
           
 File getDestinationDir()
           
 Pattern getIgnoreRegex()
           
 Map<File,File> getRawFiles()
           
 Set<File> getRawFilesToRealize()
           
 File getSourceDir()
           
 TemplateEngine getTemplateEngine()
           
 Map<File,Pattern> getZipEntriesToRealizeRegex()
           
 Set<File> getZipFiles()
           
 Map<File,Boolean> getZipsExploded()
           
 boolean isManageRootDir()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeploymentData

public DeploymentData(DeploymentProperties deploymentProps,
                      Set<File> zipFiles,
                      Map<File,File> rawFiles,
                      File sourceDir,
                      File destinationDir,
                      Map<File,Pattern> zipEntriesToRealizeRegex,
                      Set<File> rawFilesToRealize,
                      TemplateEngine templateEngine,
                      Pattern ignoreRegex,
                      boolean manageRootDir,
                      Map<File,Boolean> zipsExploded)
Constructors that prepares this object with the data that is necessary in order to deploy archive/file content a destination directory.

Parameters:
deploymentProps - metadata about this deployment
zipFiles - the archives containing the content to be deployed
rawFiles - files that are to be copied into the destination directory - the keys are the current locations of the files, the values are where the files should be copied (the values may be relative in which case they are relative to destDir and can have subdirectories and/or a different filename than what the file is named currently)
destinationDir - the root directory where the content is to be deployed
sourceDir - the root directory where the source files (zips and raw files) are located
zipEntriesToRealizeRegex - the patterns of files (whose paths are relative to destDir) that must have replacement variables within them replaced with values obtained via the given template engine. The key is the name of the zip file that the regex must be applied to - in other words, the regex value is only applied to relative file names as found in their associated zip file.
rawFilesToRealize - identifies the raw files that need to be realized; note that each item in this set must match a key to a rawFiles entry
templateEngine - if one or more filesToRealize are specified, this template engine is used to determine the values that should replace all replacement variables found in those files
ignoreRegex - the files/directories to ignore when updating an existing deployment
manageRootDir - if false, the top directory where the files will be deployed (i.e. the destinationDir) will be left alone. That is, if files already exist there, they will not be removed or otherwise merged with this deployment's root files. If true, this top root directory will be managed just as any subdirectory within the deployment will be managed. The purpose of this is to be able to write files to an existing directory that has other unrelated files in it that need to remain intact. e.g. the deploy/ directory of JBossAS. Note: regardless of this setting, all subdirectories under the root dir will be managed.
zipsExploded - if not null, this is a map keyed on zip files whose values indicate if the zips should be exploded (true) or remain compressed after the deployment is finished (false). If a zip file is not found in this map, true is the default.
Method Detail

getDeploymentProps

public DeploymentProperties getDeploymentProps()

getZipFiles

public Set<File> getZipFiles()

getRawFiles

public Map<File,File> getRawFiles()

getDestinationDir

public File getDestinationDir()

getSourceDir

public File getSourceDir()

getZipEntriesToRealizeRegex

public Map<File,Pattern> getZipEntriesToRealizeRegex()

getRawFilesToRealize

public Set<File> getRawFilesToRealize()

getTemplateEngine

public TemplateEngine getTemplateEngine()

getIgnoreRegex

public Pattern getIgnoreRegex()

isManageRootDir

public boolean isManageRootDir()

getZipsExploded

public Map<File,Boolean> getZipsExploded()


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.