Package be.personify.iam.scim.storage
Interface Storage
-
- All Known Implementing Classes:
ConnectorStorage,CouchBaseStorage,DatabaseConnectorStorage,LDAPConnectorStorage,MemoryStorage,MongoStorage,OrientDBStorage
public interface Storage
-
-
Method Summary
All Methods Instance Methods Abstract 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 entitybooleandelete(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 hereList<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 entitiesvoidupdate(String id, Map<String,Object> object)Updates a entity
-
-
-
Method Detail
-
initialize
void initialize(String type)
Bootstrap your storage here- Parameters:
type- the type
-
get
Map<String,Object> get(String id)
Gets a entity by id- Parameters:
id- the id of the entity- Returns:
- the entity
-
get
Map<String,Object> get(String id, String version)
Gets a antity by id and version- Parameters:
id- the id of the entityversion- the version of the entity- Returns:
- the entity
-
getVersions
List<String> getVersions(String id)
Gets the version of a specific entity- Parameters:
id- the id of the entity- Returns:
- a list containing the versions
-
delete
boolean delete(String id)
Deletes a entity by id- Parameters:
id- the id of the entity- Returns:
- boolean indicating success
-
deleteAll
boolean deleteAll()
Deletes all entities- Returns:
- boolean indicating success
-
create
void create(String id, Map<String,Object> object) throws ConstraintViolationException
Creates a entity- Parameters:
id- the id of the entityobject- the entity itself- Throws:
ConstraintViolationException- indicating if constraints are violated
-
update
void update(String id, Map<String,Object> object) throws ConstraintViolationException
Updates a entity- Parameters:
id- the id of the entityobject- the entity itself- Throws:
ConstraintViolationException- indicating if constraints are violated
-
search
List<Map> search(be.personify.util.SearchCriteria searchCriteria, int start, int count, String sortBy, String sortOrder, List<String> includeAttributes)
Searches entities- 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
-
search
List<Map> search(be.personify.util.SearchCriteria searchCriteria, int start, int count, String sortBy, String sortOrder)
-
count
long count(be.personify.util.SearchCriteria searchCriteria)
Counts the results giving a searchcrtieria- Parameters:
searchCriteria- the searchcriteria- Returns:
- a long indicating the number of results
-
flush
void flush()
Optional to implement : persist
-
-