public class RecordServiceClient extends Object
| Constructor and Description |
|---|
RecordServiceClient(String baseUrl)
Creates instance of RecordServiceClient.
|
RecordServiceClient(String baseUrl,
String username,
String password)
Creates instance of RecordServiceClient.
|
| Modifier and Type | Method and Description |
|---|---|
URI |
copyRepresentation(String cloudId,
String representationName,
String version)
Copies all information from one representation version to another.
|
URI |
createRepresentation(String cloudId,
String representationName,
String providerId)
Creates new representation version.
|
void |
deleteRecord(String cloudId)
Deletes record with all its representations in all versions.
|
void |
deleteRepresentation(String cloudId,
String representationName)
Deletes representation with all versions.
|
void |
deleteRepresentation(String cloudId,
String representationName,
String version)
Deletes representation in specified version.
|
Record |
getRecord(String cloudId)
Returns record with all its latest persistent representations.
|
Representation |
getRepresentation(String cloudId,
String representationName)
Returns latest persistent version of representation.
|
Representation |
getRepresentation(String cloudId,
String representationName,
String version)
Returns representation in specified version.
|
List<Representation> |
getRepresentations(String cloudId)
Lists all latest persistent versions of record representation.
|
List<Representation> |
getRepresentations(String cloudId,
String representationName)
Lists all versions of record representation.
|
URI |
persistRepresentation(String cloudId,
String representationName,
String version)
Makes specified temporary representation version persistent.
|
public RecordServiceClient(String baseUrl)
baseUrl - URL of the MCS Rest Servicepublic RecordServiceClient(String baseUrl, String username, String password)
RecordServiceClient(String)
but includes username and password to perform authenticated requests.baseUrl - URL of the MCS Rest Servicepublic Record getRecord(String cloudId) throws RecordNotExistsException, MCSException
cloudId - id of the record (required)RecordNotExistsException - when id is not known UIS ServiceMCSException - on unexpected situationspublic void deleteRecord(String cloudId) throws RecordNotExistsException, MCSException
cloudId - id of deleted record (required)RecordNotExistsException - if cloudId is not known UIS ServiceMCSException - on unexpected situationspublic List<Representation> getRepresentations(String cloudId) throws RecordNotExistsException, MCSException
cloudId - id of record from which to get representations (required)RecordNotExistsException - if cloudId is not known UIS ServiceMCSException - on unexpected situationspublic Representation getRepresentation(String cloudId, String representationName) throws RepresentationNotExistsException, MCSException
cloudId - id of record from which to get representations (required)representationName - name of the representation (required)RepresentationNotExistsException - representation does not exist or
no persistent version of this representation existsMCSException - on unexpected situationspublic URI createRepresentation(String cloudId, String representationName, String providerId) throws ProviderNotExistsException, RecordNotExistsException, MCSException
cloudId - id of the record in which to create the representation
(required)representationName - name of the representation to be created
(required)providerId - provider of this representation version (required)ProviderNotExistsException - when no provider with given id existsRecordNotExistsException - when cloud id is not known to UIS
ServiceMCSException - on unexpected situationspublic void deleteRepresentation(String cloudId, String representationName) throws RepresentationNotExistsException, MCSException
cloudId - id of the record to delete representation from (required)representationName - representation name of deleted representation
(required)RepresentationNotExistsException - if specified Representation does
not existMCSException - on unexpected situationspublic List<Representation> getRepresentations(String cloudId, String representationName) throws RepresentationNotExistsException, MCSException
cloudId - id of the record to get representation from (required)representationName - name of the representation (required)RepresentationNotExistsException - if specified Representation does
not existMCSException - on unexpected situationspublic Representation getRepresentation(String cloudId, String representationName, String version) throws RepresentationNotExistsException, MCSException
cloudId - id of the record to get representation from (required)representationName - name of the representation (required)version - version of the representation to be obtained; if
version==LATEST function will return latest persistent version (required)RepresentationNotExistsException - if specified representation does
not existMCSException - on unexpected situationspublic void deleteRepresentation(String cloudId, String representationName, String version) throws RepresentationNotExistsException, CannotModifyPersistentRepresentationException, MCSException
cloudId - id of the record to delete representation version from
(required)representationName - name of the representation (required)version - the deleted version of the representation (required)RepresentationNotExistsException - if specified representation does
not existCannotModifyPersistentRepresentationException - if specified
representation is persistent and thus cannot be removedMCSException - on unexpected situationspublic URI copyRepresentation(String cloudId, String representationName, String version) throws RepresentationNotExistsException, MCSException
cloudId - id of the record that holds representation (required)representationName - name of the copied representation (required)version - version of the copied representation (required)RepresentationNotExistsException - if specified representation
version does not existMCSException - on unexpected situationspublic URI persistRepresentation(String cloudId, String representationName, String version) throws RepresentationNotExistsException, CannotModifyPersistentRepresentationException, CannotPersistEmptyRepresentationException, MCSException
cloudId - id of the record that holds representation (required)representationName - name of the representation to be persisted
(required)version - version that should be made persistent (required)RepresentationNotExistsException - when representation does not
exist in specified versionCannotModifyPersistentRepresentationException - when representation
version is already persistentCannotPersistEmptyRepresentationException - when representation
version has no file attached and thus cannot be made persistentMCSException - on unexpected situationsCopyright © 2013–2014 Europeana Cloud Development Team. All rights reserved.