Package com.sodius.oslc.server.core
Class PersonStore
- java.lang.Object
-
- com.sodius.oslc.server.core.PersonStore
-
-
Constructor Summary
Constructors Constructor Description PersonStore()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static PersonStore
getInstance()
Returns the current store instance.abstract Optional<Person>
getPerson(String identifier)
Returns existing Person for the given identifier.abstract Collection<Person>
getPersons(String filter, int limit)
Gets OSLC persons applying a filter.static void
setInstance(PersonStore store)
Replaces the current store instance with the given one.
-
-
-
Method Detail
-
getInstance
public static PersonStore getInstance()
Returns the current store instance.- Returns:
- the current instance.
- See Also:
setInstance(PersonStore)
-
setInstance
public static void setInstance(PersonStore store)
Replaces the current store instance with the given one.- Parameters:
store
- the new store.
-
getPerson
public abstract Optional<Person> getPerson(String identifier) throws PersonStoreException
Returns existing Person for the given identifier.- Parameters:
identifier
- the person identifier- Returns:
- the stored person
- Throws:
PersonStoreException
- if an error occurs while querying the store
-
getPersons
public abstract Collection<Person> getPersons(String filter, int limit) throws PersonStoreException
Gets OSLC persons applying a filter.- Parameters:
filter
- the filter to apply on OSLC persons.limit
- maximum number of OSLC persons retrieved.- Returns:
- all filtered persons.
- Throws:
PersonStoreException
- if an error occurs while querying the store
-
-