public class FileSystemRepository extends java.lang.Object implements RepositoryWithHttp
Constructor and Description |
---|
FileSystemRepository() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
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 attributeName,
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 attributeName,
java.lang.String value)
Returns the repository items with the specified value in the specified attribute of metadata's
repository item.
|
RepositoryHttpManager |
getRepositoryHttpManager() |
void |
init() |
void |
remove(RepositoryItem item)
Removes the specified repository item.
|
void |
setMetadataForItem(FileRepositoryItem fileRepositoryItem,
java.util.Map<java.lang.String,java.lang.String> metadata) |
@PostConstruct public void init()
@PreDestroy public void close()
public RepositoryItem findRepositoryItemById(java.lang.String id)
Repository
findRepositoryItemById
in interface Repository
id
- The id of the repository item that can be returnedpublic RepositoryItem createRepositoryItem()
Repository
createRepositoryItem
in interface Repository
public RepositoryItem createRepositoryItem(java.lang.String id)
Repository
DuplicateItemException
is thrown.createRepositoryItem
in interface Repository
id
- the identifier of the new repository item.public java.util.List<RepositoryItem> findRepositoryItemsByAttValue(java.lang.String attributeName, java.lang.String value)
Repository
findRepositoryItemsByAttValue
in interface Repository
attributeName
- attribute name of the metadatavalue
- expected value in the attributepublic java.util.List<RepositoryItem> findRepositoryItemsByAttRegex(java.lang.String attributeName, java.lang.String regex)
Repository
findRepositoryItemsByAttRegex
in interface Repository
attributeName
- attribute name of the metadataregex
- regular expression to match the attribute's valuepublic RepositoryHttpManager getRepositoryHttpManager()
getRepositoryHttpManager
in interface RepositoryWithHttp
public void remove(RepositoryItem item)
Repository
remove
in interface Repository
item
- that will be removed.public void setMetadataForItem(FileRepositoryItem fileRepositoryItem, java.util.Map<java.lang.String,java.lang.String> metadata)