@Component @Path(value="/cloudIds") @Scope(value="request") public class UniqueIdentifierResource extends Object
| Constructor and Description |
|---|
UniqueIdentifierResource() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
createCloudId(String providerId,
String localId)
Invokes the generation of a cloud identifier using the provider
identifier and a record identifier.
|
javax.ws.rs.core.Response |
deleteCloudId(String cloudId)
Remove a cloud identifier and all the associations to its record
identifiers
Required permissions:
Admin role
|
javax.ws.rs.core.Response |
getCloudId(String providerId,
String recordId)
Retrieves cloud identifier based on given provider identifier and record
identifier
|
javax.ws.rs.core.Response |
getLocalIds(String cloudId)
Retrieves list of record Identifiers associated with the cloud
identifier.
|
@POST
@Produces(value={"application/json","application/xml"})
@PreAuthorize(value="isAuthenticated()")
public javax.ws.rs.core.Response createCloudId(@QueryParam(value="providerId")
String providerId,
@QueryParam(value="recordId")
String localId)
throws eu.europeana.cloud.service.uis.exception.DatabaseConnectionException,
eu.europeana.cloud.service.uis.exception.RecordExistsException,
eu.europeana.cloud.common.exceptions.ProviderDoesNotExistException,
eu.europeana.cloud.service.uis.exception.RecordDatasetEmptyException,
eu.europeana.cloud.service.uis.exception.CloudIdDoesNotExistException,
eu.europeana.cloud.service.uis.exception.CloudIdAlreadyExistException
providerId - REQUIRED identifier of data-provider for
which new cloud identifier will be created.localId - record identifier which will be binded to the newly created
cloud identifier. If not provided, random value will be
generated.eu.europeana.cloud.service.uis.exception.DatabaseConnectionException - database erroreu.europeana.cloud.service.uis.exception.RecordExistsException - Record already exists in repositoryeu.europeana.cloud.common.exceptions.ProviderDoesNotExistException - Supplied Data-provider does not existeu.europeana.cloud.service.uis.exception.RecordDatasetEmptyException - dataset is emptyeu.europeana.cloud.service.uis.exception.CloudIdDoesNotExistException - cloud identifier does not existeu.europeana.cloud.service.uis.exception.CloudIdAlreadyExistException - Cloud identifier was created previously@GET
@Produces(value={"application/json","application/xml"})
public javax.ws.rs.core.Response getCloudId(@QueryParam(value="providerId")
String providerId,
@QueryParam(value="recordId")
String recordId)
throws eu.europeana.cloud.service.uis.exception.DatabaseConnectionException,
eu.europeana.cloud.service.uis.exception.RecordDoesNotExistException,
eu.europeana.cloud.common.exceptions.ProviderDoesNotExistException,
eu.europeana.cloud.service.uis.exception.RecordDatasetEmptyException
providerId - REQUIRED provider identifierrecordId - REQUIRED record identifiereu.europeana.cloud.service.uis.exception.DatabaseConnectionException - database erroreu.europeana.cloud.service.uis.exception.RecordDoesNotExistException - record does not existeu.europeana.cloud.common.exceptions.ProviderDoesNotExistException - provider does not existeu.europeana.cloud.service.uis.exception.RecordDatasetEmptyException - dataset is empty@GET
@Path(value="{cloudId}")
@Produces(value={"application/json","application/xml"})
public javax.ws.rs.core.Response getLocalIds(@PathParam(value="cloudId")
String cloudId)
throws eu.europeana.cloud.service.uis.exception.DatabaseConnectionException,
eu.europeana.cloud.service.uis.exception.CloudIdDoesNotExistException,
eu.europeana.cloud.common.exceptions.ProviderDoesNotExistException,
eu.europeana.cloud.service.uis.exception.RecordDatasetEmptyException
cloudId - REQUIRED cloud identifier for which list of
all record identifiers will be retrievedeu.europeana.cloud.service.uis.exception.DatabaseConnectionException - database erroreu.europeana.cloud.service.uis.exception.CloudIdDoesNotExistException - cloud identifier does not existeu.europeana.cloud.common.exceptions.ProviderDoesNotExistException - provider does not existeu.europeana.cloud.service.uis.exception.RecordDatasetEmptyException - datset is empty@DELETE
@Path(value="{cloudId}")
@Produces(value={"application/json","application/xml"})
@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')")
public javax.ws.rs.core.Response deleteCloudId(@PathParam(value="cloudId")
String cloudId)
throws eu.europeana.cloud.service.uis.exception.DatabaseConnectionException,
eu.europeana.cloud.service.uis.exception.CloudIdDoesNotExistException,
eu.europeana.cloud.common.exceptions.ProviderDoesNotExistException,
eu.europeana.cloud.service.uis.exception.RecordIdDoesNotExistException
cloudId - REQUIRED cloud identifier which will be
removedeu.europeana.cloud.service.uis.exception.DatabaseConnectionException - database erroreu.europeana.cloud.service.uis.exception.CloudIdDoesNotExistException - cloud identifier does not existeu.europeana.cloud.common.exceptions.ProviderDoesNotExistException - provider does not existeu.europeana.cloud.service.uis.exception.RecordIdDoesNotExistException - record identifier does not existCopyright © 2013–2016 Europeana Cloud Development Team. All rights reserved.