public class FileContentDelegate extends Object
| Constructor and Description |
|---|
FileContentDelegate(File directory,
String fileEnding,
String packageTypeName) |
| Modifier and Type | Method and Description |
|---|---|
void |
createContent(org.rhq.core.domain.content.PackageDetails details,
File sourceContentFile,
boolean unzip,
boolean createBackup)
Creates a new package described by the specified details.
|
void |
createContent(org.rhq.core.domain.content.PackageDetails details,
InputStream content,
boolean unzip,
boolean createBackup)
Deprecated.
Method deprecated because of SHA256 computations. Method added only for backwards compatibility with SOA-P plugin.
Replaced by
createContent(PackageDetails, File, boolean, boolean) |
void |
deleteContent(org.rhq.core.domain.content.PackageDetails details)
Deletes the underlying file for the specified package.
|
Set<org.rhq.core.domain.content.transfer.ResourcePackageDetails> |
discoverDeployedPackages() |
InputStream |
getContent(org.rhq.core.domain.content.PackageDetails details)
Returns a stream from which the content of the specified package can be read.
|
File |
getDirectory() |
String |
getFileEnding() |
String |
getPackageTypeName() |
File |
getPath(org.rhq.core.domain.content.PackageDetails details) |
String |
getSHA(File deploymentFile)
Retrieves the SHA256 for a deployed application.
|
protected File directory
public String getFileEnding()
public String getPackageTypeName()
public File getDirectory()
public void createContent(org.rhq.core.domain.content.PackageDetails details,
File sourceContentFile,
boolean unzip,
boolean createBackup)
details - describes the package being createdsourceContentFile - content file to be written for the package.unzip - if true, the content stream will be treated like a ZIP file and be unzipped as
it is written, using the package name as the base directory; if false thecreateBackup - If true, the original file will be backed up to file.bak@Deprecated public void createContent(org.rhq.core.domain.content.PackageDetails details, InputStream content, boolean unzip, boolean createBackup)
createContent(PackageDetails, File, boolean, boolean)details - describes the package being createdcontent - content to be written for the package. NOTE this Stream will be closed by this method.unzip - if true, the content stream will be treated like a ZIP file and be unzipped as
it is written, using the package name as the base directory; if false thecreateBackup - If true, the original file will be backed up to file.bakpublic File getPath(org.rhq.core.domain.content.PackageDetails details)
public InputStream getContent(org.rhq.core.domain.content.PackageDetails details)
details - package being loadednull, an
exception is thrown if the content cannot be loadedpublic void deleteContent(org.rhq.core.domain.content.PackageDetails details)
details - package to deletepublic Set<org.rhq.core.domain.content.transfer.ResourcePackageDetails> discoverDeployedPackages()
public String getSHA(File deploymentFile)
deploymentFile - deployment fileCopyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.