Class PersonStore

java.lang.Object
com.sodius.oslc.server.core.PersonStore

public abstract class PersonStore extends Object
Manages persistence of Person.
Since:
3.1.0
See Also:
  • Constructor Details

    • PersonStore

      public PersonStore()
  • Method Details

    • getInstance

      public static PersonStore getInstance()
      Returns the current store instance.
      Returns:
      the current instance.
      See Also:
    • 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