public class RepositoryService
extends java.lang.Object
Constructor and Description |
---|
RepositoryService() |
Modifier and Type | Method and Description |
---|---|
RepositoryItemRecorder |
createRepositoryItem(java.util.Map<java.lang.String,java.lang.String> metadata)
Creates a new repository item with the provided metadata and its associated recorder endpoint.
|
java.util.Set<java.lang.String> |
findItems(java.util.Map<java.lang.String,java.lang.String> metadata,
boolean regex)
Searches for repository items by each pair of attributes and their values.
|
RepositoryItemPlayer |
getReadEndpoint(java.lang.String itemId)
Obtains a new endpoint for reading (playing multimedia) from the repository item.
|
java.util.Map<java.lang.String,java.lang.String> |
getRepositoryItemMetadata(java.lang.String itemId)
Returns the metadata from a repository item.
|
void |
removeRepositoryItem(java.lang.String itemId)
Removes the repository item associated to the provided id.
|
void |
setRepositoryItemMetadata(java.lang.String itemId,
java.util.Map<java.lang.String,java.lang.String> metadata)
Replaces the metadata of a repository item.
|
public RepositoryItemRecorder createRepositoryItem(java.util.Map<java.lang.String,java.lang.String> metadata)
metadata
- key-value pairs, can be nullRepositoryItemRecorder
containing the item's id and the recorder URLpublic void removeRepositoryItem(java.lang.String itemId) throws ItemNotFoundException
itemId
- the id of an existing repository itemItemNotFoundException
- if the object is not foundpublic RepositoryItemPlayer getReadEndpoint(java.lang.String itemId) throws ItemNotFoundException
itemId
- the id of an existing repository itemItemNotFoundException
- if the object is not foundpublic java.util.Set<java.lang.String> findItems(java.util.Map<java.lang.String,java.lang.String> metadata, boolean regex)
metadata
- pairs of attributes and their values (can be regexes)regex
- if true, will activate search by attribute regexSet
<String
> with identifiers of the repository items that were
foundpublic java.util.Map<java.lang.String,java.lang.String> getRepositoryItemMetadata(java.lang.String itemId) throws ItemNotFoundException
itemId
- the id of an existing repository itemItemNotFoundException
- if the object is not foundpublic void setRepositoryItemMetadata(java.lang.String itemId, java.util.Map<java.lang.String,java.lang.String> metadata) throws ItemNotFoundException
itemId
- the id of an existing repository itemmetadata
- the new metadataItemNotFoundException
- if the object is not found