public class FileContentDelegate extends Object
| Constructor and Description |
|---|
FileContentDelegate(File directory) |
| Modifier and Type | Method and Description |
|---|---|
void |
createContent(File destination,
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() |
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()
Getter for deployment directory.
|
File |
getPath(org.rhq.core.domain.content.PackageDetails details) |
String |
getSHA(File deploymentFile)
Retrieves the SHA256 for a deployed application.
|
public FileContentDelegate(File directory)
public File getDirectory()
public void createContent(File destination, File content, boolean unzip)
contentFile - the file to write the content tocontent - 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 the
content will be written to directly to a file using the package name as the file namepublic String getSHA(File deploymentFile)
deploymentFile - deployment filepublic 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()
Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.