public interface BundleService extends DSpaceObjectService<Bundle>, DSpaceObjectLegacySupportService<Bundle>
| Modifier and Type | Method and Description |
|---|---|
void |
addBitstream(Context context,
Bundle bundle,
Bitstream bitstream)
Add an existing bitstream to this bundle
|
int |
countTotal(Context context) |
Bundle |
create(Context context,
Item item,
String name)
Create a new bundle, with a new ID and link it to the provided item
|
Bitstream |
getBitstreamByName(Bundle bundle,
String name) |
List<ResourcePolicy> |
getBitstreamPolicies(Context context,
Bundle bundle) |
List<ResourcePolicy> |
getBundlePolicies(Context context,
Bundle bundle) |
void |
inheritCollectionDefaultPolicies(Context context,
Bundle bundle,
Collection collection)
remove all policies on the bundle and its contents, and replace them with
the DEFAULT_BITSTREAM_READ policies belonging to the collection.
|
void |
removeBitstream(Context context,
Bundle bundle,
Bitstream bitstream)
Remove a bitstream from this bundle - the bitstream is only deleted if
this was the last reference to it
|
void |
replaceAllBitstreamPolicies(Context context,
Bundle bundle,
List<ResourcePolicy> newpolicies)
remove all of the policies for the bundle and bitstream contents and replace
them with a new list of policies
|
void |
setOrder(Context context,
Bundle bundle,
UUID[] bitstreamIds)
Changes bitstream order according to the array
|
addMetadata, addMetadata, addMetadata, addMetadata, addMetadata, addMetadata, addMetadata, addMetadata, clearMetadata, delete, find, getAdminObject, getIdentifiers, getMetadata, getMetadata, getMetadata, getMetadata, getMetadataByMetadataString, getMetadataFirstValue, getName, getParentObject, getSupportsTypeConstant, getTypeText, removeMetadataValues, setMetadataSingleValue, update, updateLastModifiedfindByIdOrLegacyId, findByLegacyId, getSupportsTypeConstantBundle create(Context context, Item item, String name) throws SQLException, AuthorizeException
context - DSpace context objectitem - DSpace itemname - bundle nameAuthorizeException - if authorization errorSQLException - if database errorvoid addBitstream(Context context, Bundle bundle, Bitstream bitstream) throws SQLException, AuthorizeException
context - DSpace Contextbundle - the bitstream bundlebitstream - the bitstream to addAuthorizeException - if authorization errorSQLException - if database errorvoid removeBitstream(Context context, Bundle bundle, Bitstream bitstream) throws AuthorizeException, SQLException, IOException
If the bitstream in question is the primary bitstream recorded for the
bundle the primary bitstream field is unset in order to free the
bitstream from the foreign key constraint so that the
cleanup process can run normally.
context - DSpace Contextbundle - the bitstream bundlebitstream - the bitstream to removeIOException - if IO errorAuthorizeException - if authorization errorSQLException - if database errorvoid inheritCollectionDefaultPolicies(Context context, Bundle bundle, Collection collection) throws SQLException, AuthorizeException
context - DSpace Contextbundle - the bitstream bundlecollection - CollectionSQLException - if an SQL error or if no default policies found. It's a bit
draconian, but default policies must be enforced.AuthorizeException - if authorization errorvoid replaceAllBitstreamPolicies(Context context, Bundle bundle, List<ResourcePolicy> newpolicies) throws SQLException, AuthorizeException
context - DSpace Contextbundle - the bitstream bundlenewpolicies - -
this will be all of the new policies for the bundle and
bitstream contentsSQLException - if database errorAuthorizeException - if authorization errorList<ResourcePolicy> getBitstreamPolicies(Context context, Bundle bundle) throws SQLException
SQLExceptionList<ResourcePolicy> getBundlePolicies(Context context, Bundle bundle) throws SQLException
SQLExceptionvoid setOrder(Context context, Bundle bundle, UUID[] bitstreamIds) throws AuthorizeException, SQLException
context - DSpace Contextbundle - the bitstream bundlebitstreamIds - the identifiers in the order they are to be setSQLException - when an SQL error has occurred (querying DSpace)AuthorizeException - If the user can't make the changesint countTotal(Context context) throws SQLException
SQLExceptionCopyright © 2017 DuraSpace. All rights reserved.