org.sakaiproject.entitybroker.providers
Class SiteEntityProvider
java.lang.Object
org.sakaiproject.entitybroker.util.AbstractEntityProvider
org.sakaiproject.entitybroker.providers.SiteEntityProvider
- All Implemented Interfaces:
- ActionsExecutable, CollectionResolvable, Createable, CRUDable, Deleteable, Describeable, Inputable, Outputable, Redirectable, RequestStorable, Resolvable, RESTful, Sampleable, Saveable, Updateable, CoreEntityProvider, EntityProvider, Formats, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean
public class SiteEntityProvider
- extends AbstractEntityProvider
- implements CoreEntityProvider, RESTful, ActionsExecutable, Redirectable, RequestStorable
Creates a provider for dealing with sites
- Author:
- Aaron Zeckoski (azeckoski @ gmail.com)
| Fields inherited from interface org.sakaiproject.entitybroker.entityprovider.extension.Formats |
ALL_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 |
|
Method Summary |
boolean |
checkSiteExists(EntityView view)
|
String |
createEntity(EntityReference ref,
Object entity,
Map<String,Object> params)
|
void |
deleteEntity(EntityReference ref,
Map<String,Object> params)
|
boolean |
entityExists(String id)
|
List<?> |
getEntities(EntityReference ref,
Search search)
|
Object |
getEntity(EntityReference ref)
|
String |
getEntityPrefix()
|
String[] |
getHandledInputFormats()
|
String[] |
getHandledOutputFormats()
|
ActionReturn |
getPagesAndTools(EntityView view,
Search search)
|
Object |
getSampleEntity()
|
EntityGroup |
handleGroups(EntityView view,
Map<String,Object> params)
|
Map<String,Set<String>> |
handlePerms(EntityView view)
|
void |
handleRoles(EntityView view)
|
String |
handleSetPerms(EntityReference ref,
Map<String,Object> params)
|
Set<String> |
handleUserPerms(EntityView view)
|
void |
init()
|
protected boolean |
isAllowedAccessMembers(org.sakaiproject.site.api.Site site)
|
protected boolean |
isAllowedAccessSite(org.sakaiproject.site.api.Site site)
|
String |
redirectMemberships(Map<String,String> vars)
|
void |
setAuthzGroupService(org.sakaiproject.authz.api.AuthzGroupService authzGroupService)
|
void |
setFunctionManager(org.sakaiproject.authz.api.FunctionManager functionManager)
|
void |
setRequestStorage(RequestStorage requestStorage)
|
void |
setServerConfigurationService(org.sakaiproject.component.api.ServerConfigurationService serverConfigurationService)
|
void |
setSiteService(org.sakaiproject.site.api.SiteService siteService)
|
void |
setUserEntityProvider(UserEntityProvider userEntityProvider)
|
protected org.sakaiproject.site.api.Group |
trimGroupUsers(org.sakaiproject.site.api.Group grp)
Remove the users list from the group provided. |
void |
updateEntity(EntityReference ref,
Object entity,
Map<String,Object> params)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PREFIX
public static String PREFIX
PROP_SITE_PROVIDER_PAGESIZE_DEFAULT
public static final String PROP_SITE_PROVIDER_PAGESIZE_DEFAULT
- Property to set the default page size for lists of entities.
- See Also:
- Constant Field Values
PROP_SITE_PROVIDER_PAGESIZE_MAXIMUM
public static final String PROP_SITE_PROVIDER_PAGESIZE_MAXIMUM
- Property to set the maximum page size for lists of entities.
- See Also:
- Constant Field Values
SiteEntityProvider
public SiteEntityProvider()
setSiteService
public void setSiteService(org.sakaiproject.site.api.SiteService siteService)
setAuthzGroupService
public void setAuthzGroupService(org.sakaiproject.authz.api.AuthzGroupService authzGroupService)
setFunctionManager
public void setFunctionManager(org.sakaiproject.authz.api.FunctionManager functionManager)
setUserEntityProvider
public void setUserEntityProvider(UserEntityProvider userEntityProvider)
setServerConfigurationService
public void setServerConfigurationService(org.sakaiproject.component.api.ServerConfigurationService serverConfigurationService)
getEntityPrefix
public String getEntityPrefix()
- Specified by:
getEntityPrefix in interface EntityProvider
init
public void init()
redirectMemberships
public String redirectMemberships(Map<String,String> vars)
checkSiteExists
public boolean checkSiteExists(EntityView view)
handleRoles
public void handleRoles(EntityView view)
handlePerms
public Map<String,Set<String>> handlePerms(EntityView view)
handleSetPerms
public String handleSetPerms(EntityReference ref,
Map<String,Object> params)
handleGroups
public EntityGroup handleGroups(EntityView view,
Map<String,Object> params)
handleUserPerms
public Set<String> handleUserPerms(EntityView view)
getPagesAndTools
public ActionReturn getPagesAndTools(EntityView view,
Search search)
isAllowedAccessMembers
protected boolean isAllowedAccessMembers(org.sakaiproject.site.api.Site site)
- Parameters:
site - the site to check perms in
- Returns:
- true if the current user can view this site
- Throws:
SecurityException - if not allowed
entityExists
public boolean entityExists(String id)
- Specified by:
entityExists in interface CoreEntityProvider
createEntity
public String createEntity(EntityReference ref,
Object entity,
Map<String,Object> params)
- Specified by:
createEntity in interface Createable
getSampleEntity
public Object getSampleEntity()
- Specified by:
getSampleEntity in interface Sampleable
updateEntity
public void updateEntity(EntityReference ref,
Object entity,
Map<String,Object> params)
- Specified by:
updateEntity in interface Updateable
getEntity
public Object getEntity(EntityReference ref)
- Specified by:
getEntity in interface Resolvable
isAllowedAccessSite
protected boolean isAllowedAccessSite(org.sakaiproject.site.api.Site site)
- Parameters:
site - the site to check perms in
- Returns:
- true if the current user can view this site
- Throws:
SecurityException - if not allowed
deleteEntity
public void deleteEntity(EntityReference ref,
Map<String,Object> params)
- Specified by:
deleteEntity in interface Deleteable
getEntities
public List<?> getEntities(EntityReference ref,
Search search)
- Specified by:
getEntities in interface CollectionResolvable
getHandledInputFormats
public String[] getHandledInputFormats()
- Specified by:
getHandledInputFormats in interface Inputable
getHandledOutputFormats
public String[] getHandledOutputFormats()
- Specified by:
getHandledOutputFormats in interface Outputable
setRequestStorage
public void setRequestStorage(RequestStorage requestStorage)
- Specified by:
setRequestStorage in interface RequestStorable
trimGroupUsers
protected org.sakaiproject.site.api.Group trimGroupUsers(org.sakaiproject.site.api.Group grp)
- Remove the users list from the group provided. User memberships must be retrieved from the
Memberships Entity Provider
- Parameters:
grp - Group to trim
- Returns:
Copyright © 2007-2012 Sakai Project. All Rights Reserved.