Class MongoStorage
- java.lang.Object
-
- be.personify.iam.scim.storage.impl.MongoStorage
-
-
Constructor Summary
Constructors Constructor Description MongoStorage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longcount(be.personify.util.SearchCriteria searchCriteria)Counts the results giving a searchcrtieriavoidcreate(String id, Map<String,Object> object)Creates a new entrybooleandelete(String id)Deletes a entity by idbooleandeleteAll()Deletes all entitiesvoidflush()Optional to implement : persistMap<String,Object>get(String id)Gets a entity by idMap<String,Object>get(String id, String version)Gets a antity by id and versionList<String>getVersions(String id)Gets the version of a specific entityvoidinitialize(String type)Bootstrap your storage hereMap<String,Object>safetyfyAttributes(Map<String,Object> map)List<Map>search(be.personify.util.SearchCriteria searchCriteria, int start, int count, String sortBy, String sortOrder)List<Map>search(be.personify.util.SearchCriteria searchCriteria, int start, int count, String sortBy, String sortOrder, List<String> includeAttributes)Searches entitiesorg.bson.DocumentunsafetyfyAttributes(org.bson.Document map)voidupdate(String id, Map<String,Object> object)Updates a entity
-
-
-
Method Detail
-
get
public Map<String,Object> get(String id)
Description copied from interface:StorageGets a entity by id
-
get
public Map<String,Object> get(String id, String version)
Description copied from interface:StorageGets a antity by id and version
-
getVersions
public List<String> getVersions(String id)
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
-
delete
public boolean delete(String id)
Description copied from interface:StorageDeletes a entity by id
-
deleteAll
public boolean deleteAll()
Description copied from interface:StorageDeletes all entities
-
create
public void create(String id, Map<String,Object> object) throws ConstraintViolationException
Creates a new entry- 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)
Description copied from interface:StorageUpdates a entity
-
search
public List<Map> search(be.personify.util.SearchCriteria searchCriteria, int start, int count, String sortBy, String sortOrder)
-
search
public List<Map> search(be.personify.util.SearchCriteria searchCriteria, int start, int count, String sortBy, String sortOrder, List<String> includeAttributes)
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 commasortOrder- the sortorder ( ascending or descending )- Returns:
- a list containing the entities
-
count
public long count(be.personify.util.SearchCriteria searchCriteria)
Description copied from interface:StorageCounts the results giving a searchcrtieria
-
flush
public void flush()
Description copied from interface:StorageOptional to implement : persist
-
initialize
public void initialize(String type)
Description copied from interface:StorageBootstrap your storage here- Specified by:
initializein interfaceStorage- Parameters:
type- the type
-
unsafetyfyAttributes
public org.bson.Document unsafetyfyAttributes(org.bson.Document map)
-
-