public class DelegatedAccessDaoImpl extends org.springframework.jdbc.core.support.JdbcDaoSupport implements DelegatedAccessDao
| Constructor and Description |
|---|
DelegatedAccessDaoImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanupOrphanedPermissions()
When a node is deleted or a hierarchy is destroyed, HierarchyService just orphans the permissions table data
instead of deleting it.
|
void |
copyRole(String fromRealm,
String fromRole,
String[] toRealm,
String toRole) |
List<String> |
findActiveSites(String[] siteIds)
DAC-40 Highlight Inactive Courses in site search
requires the job "InactiveCoursesJob" attached in the jira
|
List<String> |
getDelegatedAccessUsers()
returns a list of user ids for users who have at least one of the following permissions in any node:
site.visit, accessAdmin, or shoppingAdmin
|
List<String> |
getDistinctSiteTerms(String termField) |
List<String> |
getEmptyNonSiteNodes(String hierarchyId) |
Map<String,Set<String>> |
getHierarchySearchOptions(Map<String,String> hierarchySearchMap)
Given a map of hierarchy key->value, it will return the list of available options for all hierarchy levels
for example:
hierarchy = School, Dept, Subj
params: {School=>"", Dept=>"Dept1", Subj=>""}
return: {School=>{"school1", "school2"}, Dept=>{"Dept1"}, Subj=>{"Subj1", Subj2", "Subj3"}}
|
Map<String,Set<String>> |
getNodesAndPermsForUser(String userId,
String[] nodeIds)
returns a map of {nodeId -> {permission, permission...}) for the given user
if a user doesn't have permissions for a node, it won't show up in the map
|
Map<String,List<String>> |
getNodesBySiteRef(String[] siteRefs,
String hierarchyId)
returns a Map of -> {siteRef, {nodeId, nodeId ...}}
|
String |
getSiteProperty(String propertyName,
String siteId) |
List<String> |
getSitesWithDelegatedAccessTool(String[] siteIds)
returns a list of site id which have have the Delegated Access tool
|
void |
init()
init
|
void |
removeAnonAndAuthRoles(String[] siteRefs)
Deletes the .anon and .auth roles for all sites
|
void |
removeSiteProperty(String[] siteIds,
String propertyName) |
List<Object[]> |
searchSites(String titleSearch,
Map<String,String> propsMap,
String[] instructorIds,
String insturctorType,
boolean publishedOnly)
returns a list of {siteId, title} for sites returned in search
if you search for instructorsIds as well, then the results will be {siteId, title, userId}
|
Map<String,Map<String,String>> |
searchSitesForProp(String[] props,
String[] siteIds)
returns a list of {siteId, map{name->value}} for the site ids and properties searched
|
void |
updateSiteProperty(String[] siteIds,
String propertyName,
String propertyValue) |
public void init()
public List<String> getDistinctSiteTerms(String termField)
getDistinctSiteTerms in interface DelegatedAccessDaopublic String getSiteProperty(String propertyName, String siteId)
getSiteProperty in interface DelegatedAccessDaopublic Map<String,List<String>> getNodesBySiteRef(String[] siteRefs, String hierarchyId)
DelegatedAccessDaogetNodesBySiteRef in interface DelegatedAccessDaopublic List<String> getEmptyNonSiteNodes(String hierarchyId)
getEmptyNonSiteNodes in interface DelegatedAccessDaopublic void updateSiteProperty(String[] siteIds, String propertyName, String propertyValue)
updateSiteProperty in interface DelegatedAccessDaopublic void removeSiteProperty(String[] siteIds, String propertyName)
removeSiteProperty in interface DelegatedAccessDaopublic List<Object[]> searchSites(String titleSearch, Map<String,String> propsMap, String[] instructorIds, String insturctorType, boolean publishedOnly)
DelegatedAccessDaosearchSites in interface DelegatedAccessDaopublic Map<String,Map<String,String>> searchSitesForProp(String[] props, String[] siteIds)
DelegatedAccessDaosearchSitesForProp in interface DelegatedAccessDaopublic void cleanupOrphanedPermissions()
DelegatedAccessDaocleanupOrphanedPermissions in interface DelegatedAccessDaopublic Map<String,Set<String>> getNodesAndPermsForUser(String userId, String[] nodeIds)
DelegatedAccessDaogetNodesAndPermsForUser in interface DelegatedAccessDaopublic List<String> findActiveSites(String[] siteIds)
findActiveSites in interface DelegatedAccessDaopublic void removeAnonAndAuthRoles(String[] siteRefs)
DelegatedAccessDaoremoveAnonAndAuthRoles in interface DelegatedAccessDaopublic void copyRole(String fromRealm, String fromRole, String[] toRealm, String toRole)
copyRole in interface DelegatedAccessDaopublic List<String> getDelegatedAccessUsers()
DelegatedAccessDaogetDelegatedAccessUsers in interface DelegatedAccessDaopublic List<String> getSitesWithDelegatedAccessTool(String[] siteIds)
DelegatedAccessDaogetSitesWithDelegatedAccessTool in interface DelegatedAccessDaopublic Map<String,Set<String>> getHierarchySearchOptions(Map<String,String> hierarchySearchMap)
DelegatedAccessDaogetHierarchySearchOptions in interface DelegatedAccessDaoCopyright © 2003–2016 Sakai Project. All rights reserved.