Class MemoryStorage
java.lang.Object
be.personify.iam.scim.storage.impl.MemoryStorage
- All Implemented Interfaces:
Storage
Sample storage implementation that stores data into a volatile memory store
- Author:
- vanderw
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongCounts the results giving a searchcrtieriavoidCreates a entitybooleanDeletes a entity by idbooleanDeletes all entitiesvoidflush()Optional to implement : persistGets a entity by idGets a antity by id and versiongetVersions(String id, Consumer consumer) Gets the version of a specific entityvoidinitialize(String type) Bootstrap your storage heresearch(be.personify.util.SearchCriteria searchCriteria, int start, int count, String sortBy, String sortOrderString, Consumer consumer) search(be.personify.util.SearchCriteria searchCriteria, int start, int count, String sortBy, String sortOrderString, List<String> includeAttributes, Consumer consumer) Searches entitiesbooleanvoidUpdates a entity
-
Constructor Details
-
MemoryStorage
public MemoryStorage()
-
-
Method Details
-
get
Description copied from interface:StorageGets a entity by id -
get
Description copied from interface:StorageGets a antity by id and version -
getVersions
Description copied from interface:StorageGets the version of a specific entity- Specified by:
getVersionsin interfaceStorage- Parameters:
id- the id of the entity- Returns:
- a list containing the versions
-
create
public void create(String id, Map<String, Object> object, Consumer consumer) throws ConstraintViolationExceptionDescription copied from interface:StorageCreates a entity- Specified by:
createin interfaceStorage- Parameters:
id- the id of the entityobject- the entity itself- Throws:
ConstraintViolationException- indicating if constraints are violated
-
update
public void update(String id, Map<String, Object> object, Consumer consumer) throws ConstraintViolationExceptionDescription copied from interface:StorageUpdates a entity- Specified by:
updatein interfaceStorage- Parameters:
id- the id of the entityobject- the entity itself- Throws:
ConstraintViolationException- indicating if constraints are violated
-
delete
Description copied from interface:StorageDeletes a entity by id -
search
-
search
public List<Map> search(be.personify.util.SearchCriteria searchCriteria, int start, int count, String sortBy, String sortOrderString, List<String> includeAttributes, Consumer consumer) Description copied from interface:StorageSearches entities- Specified by:
searchin interfaceStorage- Parameters:
searchCriteria- the searchcriteriastart- the start positioncount- the number of results to returmsortBy- the sortby attributes separated by a commasortOrderString- the sortorder ( ascending or descending )- Returns:
- a list containing the entities
-
count
Description copied from interface:StorageCounts the results giving a searchcrtieria -
initialize
Description copied from interface:StorageBootstrap your storage here- Specified by:
initializein interfaceStorage- Parameters:
type- the type
-
flush
public void flush()Description copied from interface:StorageOptional to implement : persist -
deleteAll
Description copied from interface:StorageDeletes all entities -
tenantCompatible
public boolean tenantCompatible()- Specified by:
tenantCompatiblein interfaceStorage
-