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, 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 objectSQLExceptionAuthorizeExceptionvoid addBitstream(Context context, Bundle bundle, Bitstream bitstream) throws SQLException, AuthorizeException
bitstream - the bitstream to addSQLExceptionAuthorizeExceptionvoid 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.
bitstream - the bitstream to removeAuthorizeExceptionSQLExceptionIOExceptionvoid inheritCollectionDefaultPolicies(Context context, Bundle bundle, Collection collection) throws SQLException, AuthorizeException
collection - CollectionSQLException - if an SQL error or if no default policies found. It's a bit
draconian, but default policies must be enforced.AuthorizeExceptionvoid replaceAllBitstreamPolicies(Context context, Bundle bundle, List<ResourcePolicy> newpolicies) throws SQLException, AuthorizeException
newpolicies - -
this will be all of the new policies for the bundle and
bitstream contentsSQLExceptionAuthorizeExceptionList<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
bitstreamIds - 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 © 2016 DuraSpace. All Rights Reserved.