public class FileContentDelegate extends Object
| Constructor and Description |
|---|
FileContentDelegate()
Default constructor.
|
FileContentDelegate(File directory,
String fileEnding) |
| Modifier and Type | Method and Description |
|---|---|
void |
createContent(org.rhq.core.domain.content.PackageDetails details,
File content,
boolean unzip)
Creates a new package described by the specified details.
|
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()
This is a stub implementation, you need to implement a
discovery for artifacts of your particular content type.
|
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 |
retrieveDeploymentSHA(File deployment,
File resourceDataDirectory)
Retrieves SHA256 for the deployment.
|
String |
saveDeploymentSHA(File deployment,
File resourceDataDirectory)
Save the SHA256 for a deployment without knowing its original archived content.
|
String |
saveDeploymentSHA(File originalArchive,
File deployment,
File resourceDataDirectory)
Save the SHA256 for a deployment with knowledge of the original archived content.
|
public String getFileEnding()
public File getDirectory()
public void createContent(org.rhq.core.domain.content.PackageDetails details,
File content,
boolean unzip)
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 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 retrieveDeploymentSHA(File deployment, File resourceDataDirectory)
deployment - deployment locationresourceId - resource iddataDirectory - data directorypublic String saveDeploymentSHA(File originalArchive, File deployment, File resourceDataDirectory)
originalArchive - deployment - resourceId - dataDirectory - public String saveDeploymentSHA(File deployment, File resourceDataDirectory)
deployment - deploymentresourceId - resource iddataDirectory - data directoryCopyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.