org.sakaiproject.delegatedaccess.dao
Interface DelegatedAccessDao

All Known Implementing Classes:
DelegatedAccessDaoImpl

public interface DelegatedAccessDao


Method Summary
 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)
          Returns a subset of sites that are active.
 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>> 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[] siteRef, 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 removeAnonAndAuthRoles(String[] siteRefs)
          Deletes the .anon and .auth roles for all sites
 void removeSiteProperty(String[] siteIds, String propertyName)
           
 List<String[]> searchSites(String titleSearch, Map<String,String> propsMap, String[] instructorIds, 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)
           
 

Method Detail

getDistinctSiteTerms

List<String> getDistinctSiteTerms(String termField)

getSiteProperty

String getSiteProperty(String propertyName,
                       String siteId)

updateSiteProperty

void updateSiteProperty(String[] siteIds,
                        String propertyName,
                        String propertyValue)

removeSiteProperty

void removeSiteProperty(String[] siteIds,
                        String propertyName)

getNodesBySiteRef

Map<String,List<String>> getNodesBySiteRef(String[] siteRef,
                                           String hierarchyId)
returns a Map of -> {siteRef, {nodeId, nodeId ...}}

Parameters:
siteRef -
hierarchyId -
Returns:

getEmptyNonSiteNodes

List<String> getEmptyNonSiteNodes(String hierarchyId)

searchSites

List<String[]> searchSites(String titleSearch,
                           Map<String,String> propsMap,
                           String[] instructorIds,
                           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}

Parameters:
titleSearch -
propsMap -
instructorIds -
publishedOnly -
Returns:

searchSitesForProp

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

Parameters:
props -
siteIds -
Returns:

cleanupOrphanedPermissions

void cleanupOrphanedPermissions()
When a node is deleted or a hierarchy is destroyed, HierarchyService just orphans the permissions table data instead of deleting it. This is an issue in Shopping Period job since it destroys the Shopping Period Hierarchy every time its ran


getNodesAndPermsForUser

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

Parameters:
userId -
nodeIds -
Returns:

findActiveSites

List<String> findActiveSites(String[] siteIds)
Returns a subset of sites that are active. This requires an external feature that populates a tables named CMS_ACTIVATED DAC-40 Highlight Inactive Courses in site search requires the job "InactiveCoursesJob" attached in the jira

Parameters:
siteIds -
Returns:

removeAnonAndAuthRoles

void removeAnonAndAuthRoles(String[] siteRefs)
Deletes the .anon and .auth roles for all sites

Parameters:
siteRef -

copyRole

void copyRole(String fromRealm,
              String fromRole,
              String[] toRealm,
              String toRole)
Parameters:
fromRealm -
fromRole -
toRealm -
toRole -

getDelegatedAccessUsers

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

Returns:

getSitesWithDelegatedAccessTool

List<String> getSitesWithDelegatedAccessTool(String[] siteIds)
returns a list of site id which have have the Delegated Access tool

Parameters:
siteIds -
Returns:


Copyright © 2003-2012 Sakai Project. All Rights Reserved.