|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.rhq.core.pluginapi.content.FileContentDelegate
public class FileContentDelegate
Delegate class used for manipulating artifacts in a JON plugin.
Constructor Summary | |
---|---|
FileContentDelegate()
Default constructor. |
|
FileContentDelegate(File directory,
String fileEnding)
|
Method Summary | |
---|---|
void |
createContent(PackageDetails details,
File content,
boolean unzip)
Creates a new package described by the specified details. |
void |
deleteContent(PackageDetails details)
Deletes the underlying file for the specified package. |
Set<ResourcePackageDetails> |
discoverDeployedPackages()
This is a stub implementation, you need to implement a discovery for artifacts of your particular content type. |
InputStream |
getContent(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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileContentDelegate()
public FileContentDelegate(File directory, String fileEnding)
Method Detail |
---|
public String getFileEnding()
public File getDirectory()
public void createContent(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(PackageDetails details)
details
- package being loaded
null
, an
exception is thrown if the content cannot be loadedpublic void deleteContent(PackageDetails details)
details
- package to deletepublic Set<ResourcePackageDetails> discoverDeployedPackages()
public String retrieveDeploymentSHA(File deployment, File resourceDataDirectory)
deployment
- deployment locationresourceId
- resource iddataDirectory
- data directory
public String saveDeploymentSHA(File originalArchive, File deployment, File resourceDataDirectory)
originalArchive
- deployment
- resourceId
- dataDirectory
-
public String saveDeploymentSHA(File deployment, File resourceDataDirectory)
deployment
- deploymentresourceId
- resource iddataDirectory
- data directory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |