public class UserEntityProvider
extends org.sakaiproject.entitybroker.util.AbstractEntityProvider
implements org.sakaiproject.entitybroker.entityprovider.CoreEntityProvider, org.sakaiproject.entitybroker.entityprovider.capabilities.RESTful, org.sakaiproject.entitybroker.entityprovider.capabilities.Describeable
| Modifier and Type | Field and Description |
|---|---|
static String |
PREFIX |
SEARCH_LOCATION_REFERENCE, SEARCH_TAGS, SEARCH_USER_REFERENCEALL_KNOWN_FORMATS, ATOM, ATOM_EXTENSIONS, ATOM_MIME_TYPE, FORM, FORM_EXTENSIONS, FORM_MIME_TYPE, HTML, HTML_EXTENSIONS, HTML_MIME_TYPE, JSON, JSON_EXTENSIONS, JSON_MIME_TYPE, JSONP, JSONP_EXTENSIONS, JSONP_MIME_TYPE, RSS, RSS_EXTENSIONS, RSS_MIME_TYPE, TXT, TXT_EXTENSIONS, TXT_MIME_TYPE, UTF_8, XML, XML_EXTENSIONS, XML_MIME_TYPE| Constructor and Description |
|---|
UserEntityProvider() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkUserExists(org.sakaiproject.entitybroker.EntityView view) |
EntityUser |
convertUser(org.sakaiproject.user.api.User user) |
String |
createEntity(org.sakaiproject.entitybroker.EntityReference ref,
Object entity,
Map<String,Object> params) |
void |
deleteEntity(org.sakaiproject.entitybroker.EntityReference ref,
Map<String,Object> params) |
boolean |
entityExists(String id) |
String |
findAndCheckUserId(String currentUserId,
String currentUserEid)
Will check that a userId/eid is valid and will produce a valid userId from the check
|
EntityUser |
findUserFromSearchValue(String userSearchValue) |
EntityUser |
getCurrentUser(org.sakaiproject.entitybroker.EntityView view) |
List<?> |
getEntities(org.sakaiproject.entitybroker.EntityReference ref,
org.sakaiproject.entitybroker.entityprovider.search.Search search)
WARNING: The search results may be drawn from different populations depending on the
search parameters specified.
|
Object |
getEntity(org.sakaiproject.entitybroker.EntityReference ref) |
String |
getEntityPrefix() |
String[] |
getHandledInputFormats() |
String[] |
getHandledOutputFormats() |
Object |
getSampleEntity() |
EntityUser |
getUserById(String userId)
Allows for easy retrieval of the user object
|
void |
setDeveloperHelperService(org.sakaiproject.entitybroker.DeveloperHelperService developerHelperService) |
void |
setServerConfigurationService(org.sakaiproject.component.api.ServerConfigurationService serverConfigurationService) |
void |
setUserDirectoryService(org.sakaiproject.user.api.UserDirectoryService userDirectoryService) |
void |
updateEntity(org.sakaiproject.entitybroker.EntityReference ref,
Object entity,
Map<String,Object> params) |
org.sakaiproject.entitybroker.entityprovider.extension.ActionReturn |
validatePassword(org.sakaiproject.entitybroker.EntityView view,
Map<String,Object> params) |
public static String PREFIX
public void setUserDirectoryService(org.sakaiproject.user.api.UserDirectoryService userDirectoryService)
public void setDeveloperHelperService(org.sakaiproject.entitybroker.DeveloperHelperService developerHelperService)
setDeveloperHelperService in class org.sakaiproject.entitybroker.util.AbstractEntityProviderpublic void setServerConfigurationService(org.sakaiproject.component.api.ServerConfigurationService serverConfigurationService)
public String getEntityPrefix()
getEntityPrefix in interface org.sakaiproject.entitybroker.entityprovider.EntityProviderpublic EntityUser getCurrentUser(org.sakaiproject.entitybroker.EntityView view)
public boolean checkUserExists(org.sakaiproject.entitybroker.EntityView view)
public org.sakaiproject.entitybroker.entityprovider.extension.ActionReturn validatePassword(org.sakaiproject.entitybroker.EntityView view,
Map<String,Object> params)
public boolean entityExists(String id)
entityExists in interface org.sakaiproject.entitybroker.entityprovider.CoreEntityProviderpublic String createEntity(org.sakaiproject.entitybroker.EntityReference ref, Object entity, Map<String,Object> params)
createEntity in interface org.sakaiproject.entitybroker.entityprovider.capabilities.Createablepublic Object getSampleEntity()
getSampleEntity in interface org.sakaiproject.entitybroker.entityprovider.capabilities.Sampleablepublic void updateEntity(org.sakaiproject.entitybroker.EntityReference ref,
Object entity,
Map<String,Object> params)
updateEntity in interface org.sakaiproject.entitybroker.entityprovider.capabilities.Updateablepublic void deleteEntity(org.sakaiproject.entitybroker.EntityReference ref,
Map<String,Object> params)
deleteEntity in interface org.sakaiproject.entitybroker.entityprovider.capabilities.Deleteablepublic Object getEntity(org.sakaiproject.entitybroker.EntityReference ref)
getEntity in interface org.sakaiproject.entitybroker.entityprovider.capabilities.Resolvablepublic List<?> getEntities(org.sakaiproject.entitybroker.EntityReference ref, org.sakaiproject.entitybroker.entityprovider.search.Search search)
getEntities in interface org.sakaiproject.entitybroker.entityprovider.capabilities.CollectionResolvablepublic String[] getHandledInputFormats()
getHandledInputFormats in interface org.sakaiproject.entitybroker.entityprovider.capabilities.Inputablepublic String[] getHandledOutputFormats()
getHandledOutputFormats in interface org.sakaiproject.entitybroker.entityprovider.capabilities.Outputablepublic EntityUser getUserById(String userId)
userId - a user ID (must be internal ID only and not EID)IllegalArgumentException - if the user Id is invalidpublic String findAndCheckUserId(String currentUserId, String currentUserEid)
currentUserId - user id (can be eid)currentUserEid - user eid (can be id)public EntityUser findUserFromSearchValue(String userSearchValue)
userSearchValue - either a user ID, a user EID, or a user email addresspublic EntityUser convertUser(org.sakaiproject.user.api.User user)
Copyright © 2007-2015 Sakai Project. All Rights Reserved.