public abstract class AbstractPackageDisseminator extends Object implements PackageDisseminator
First, implements recursive functionality in the disseminateAll() method of the PackageIngester interface. This method is setup to recursively call disseminate() method.
All Package disseminators should either extend this abstract class
or implement PackageDisseminator to better suit their needs.
WARNING: If you choose to extend this Abstract class, you must DISABLE
plugin instance caching for your new class in dspace.cfg. This will ensure
that "packageFileList" and any other global instance variables are RESET
for each package dissemination. To DISABLE plugin instance caching, just place
the following configuration in your dspace.cfg:
plugin.reusable.[full-class-name] = false
For more information see the org.dspace.core.PluginManager cacheMe() method,
which defaults to caching all plugin class instances.
PackageDisseminator,
PluginManager| Constructor and Description |
|---|
AbstractPackageDisseminator() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addToPackageList(File f)
Add File to list of successfully disseminated package files
|
List<File> |
disseminateAll(Context context,
DSpaceObject dso,
PackageParameters params,
File pkgFile)
Recursively export one or more DSpace Objects as a series of packages.
|
protected List<File> |
getPackageList()
Return List of all package Files which have been disseminated
this instance of the Disseminator.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdisseminate, getMIMEType, getParameterHelppublic List<File> disseminateAll(Context context, DSpaceObject dso, PackageParameters params, File pkgFile) throws PackageException, CrosswalkException, AuthorizeException, SQLException, IOException
Package is any serialized representation of the item, at the discretion
of the implementing class. It does not have to include content bitstreams.
Use the params parameter list to adjust the way the
package is made, e.g. including a "metadataOnly"
parameter might make the package a bare manifest in XML
instead of a Zip file including manifest and contents.
Throws an exception of the initial object is not acceptable or there is
a failure creating the package.
disseminateAll in interface PackageDisseminatorcontext - DSpace context.dso - initial DSpace objectparams - Properties-style list of options specific to this packagerpkgFile - File where initial package should be written. All other
packages will be written to the same directory as this File.PackageValidationException - if package cannot be created or there is
a fatal error in creating it.PackageExceptionCrosswalkExceptionAuthorizeExceptionSQLExceptionIOExceptionprotected void addToPackageList(File f)
f - added File.protected List<File> getPackageList()
This list can be useful in reporting back to the user what content has been disseminated as packages. It's used by disseminateAll() to report what packages were created.
Copyright © 2015 DuraSpace. All Rights Reserved.