public interface Repository
RepositoryItem
obtained with methods of this
interface. This interface offers several CRUD operations to manage repository items.Modifier and Type | Method and Description |
---|---|
RepositoryItem |
createRepositoryItem()
Creates a new repository item with an autogenerated unique id.
|
RepositoryItem |
createRepositoryItem(java.lang.String id)
Creates a new repository item with the specified id.
|
RepositoryItem |
findRepositoryItemById(java.lang.String id)
Returns the repository item identified by the specified id.
|
java.util.List<RepositoryItem> |
findRepositoryItemsByAttRegex(java.lang.String attribute,
java.lang.String regex)
Returns the repository items with value that matches the specified regular expression in the
specified attribute of metadata's repository item.
|
java.util.List<RepositoryItem> |
findRepositoryItemsByAttValue(java.lang.String attribute,
java.lang.String value)
Returns the repository items with the specified value in the specified attribute of metadata's
repository item.
|
void |
remove(RepositoryItem item)
Removes the specified repository item.
|
RepositoryItem createRepositoryItem()
RepositoryItem createRepositoryItem(java.lang.String id)
DuplicateItemException
is thrown.id
- the identifier of the new repository item.RepositoryItem findRepositoryItemById(java.lang.String id)
id
- The id of the repository item that can be returnedjava.util.List<RepositoryItem> findRepositoryItemsByAttValue(java.lang.String attribute, java.lang.String value)
attribute
- attribute name of the metadatavalue
- expected value in the attributejava.util.List<RepositoryItem> findRepositoryItemsByAttRegex(java.lang.String attribute, java.lang.String regex)
attribute
- attribute name of the metadataregex
- regular expression to match the attribute's valuevoid remove(RepositoryItem item)
item
- that will be removed.