|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ProjectLogic
Delegated Access's logic interface
| Method Summary | |
|---|---|
boolean |
addChildrenNodes(Object node,
String userId,
List<ListOptionSerialized> blankRestrictedTools,
List<ListOptionSerialized> blankTerms,
boolean onlyAccessNodes,
List<String> accessAdminNodes)
Adds children node to a node that hasn't had it's children populated. |
void |
clearNodeCache()
clears DelegatedAccess's own node cache |
TreeModel |
createAccessTreeModelForUser(String userId,
boolean addDirectChildren,
boolean cascade)
returns the tree model of a user's delegated access. |
TreeModel |
createEntireTreeModelForUser(String userId,
boolean addDirectChildren,
boolean cascade)
This returns a full tree model for a user. |
TreeModel |
createTreeModelForShoppingPeriod(String userId)
returns the tree model that looks up the shopping period information for the sites the user has access to |
void |
deleteEmptyNonSiteNodes(String hierarchyId)
Deletes empty non sites nodes in a hierarchy (nodes that doesn't start with /site/ and has no children) |
Set<HierarchyNodeSerialized> |
getAccessAdminNodesForUser(String userId)
Returns a set of hierarchy nodes that the user has been assigned accessAdmin privileges for. |
List<ListOptionSerialized> |
getAuthorizationOptions()
returns a map of the authorization options ex: .anon => Public |
String[] |
getCurrentUsersAccessToSite(String siteRef)
This returns an array of {realm, role} for which the user has delegated access to. |
List<ListOptionSerialized> |
getEntireTermsList()
returns a blank (unselected) list of all the term options for restricting terms |
List<ListOptionSerialized> |
getEntireToolsList()
returns a blank (unselected) list of all the tool options for restricting tools |
TreeModel |
getEntireTreePlusUserPerms(String userId)
This returns the entire tree plus any permissions set for a user |
Date |
getHierarchyJobLastRunDate(String nodeId)
returns the hierarchyjoblastrundate date for the node Id and hierarchy user |
HierarchyNodeSerialized |
getNode(String id)
returns a HierarchyNodeSerialized node |
NodeModel |
getNodeModel(String nodeId,
String userId)
This will return a fully instantiated NodeModel for that user and id. |
Map<String,List<String>> |
getNodesBySiteRef(String[] siteRef,
String hierarchyId)
Returns a map of {siteRef, nodeId} |
Map<String,String> |
getRealmRoleDisplay(boolean shopping)
returns a map of all role options and their realm/role ids separated by a ':'. |
TreeModel |
getTreeModelForShoppingPeriod(boolean includePerms)
This returns the shopping tree model in the shopping period hierarchy. |
boolean |
hasAccessAdminNodes(String userId)
returns whether the user has any "access admin" permission |
boolean |
hasDelegatedAccessNodes(String userId)
returns whether the user has any delegated access |
boolean |
hasShoppingPeriodAdminNodes(String userId)
Returns whether the user has any shopping period admin access |
void |
initializeDelegatedAccessSession()
updates the user's Session adding all of the user's site and role access to the delegatedaccess.accessmap Session attribute. |
boolean |
isShoppingPeriodOpenForSite(Date startDate,
Date endDate,
String[] nodeAccessRealmRole,
String auth,
String[] terms,
String siteTerm)
Call this function to determine if the shopping period is available for a set of settings |
void |
removeNode(org.sakaiproject.hierarchy.model.HierarchyNode node)
Removes this node and all permissions and children nodes |
void |
removeNode(String nodeId)
Removes this node an all permissions and children nodes |
void |
saveHierarchyJobLastRunDate(Date runDate,
String nodeId)
Saves the date for the last time the hierarchy job ran successfully |
List<SearchResult> |
searchUsers(String search)
Returns a list of SearchResults for the user search |
List<SiteSearchResult> |
searchUserSites(String search,
Map<String,String> advancedOptions,
boolean shoppingPeriod,
boolean activeShoppingData)
Searches user access sites by siteId and siteTitle and props |
void |
updateNodePermissionsForUser(NodeModel nodeModel,
String userId)
Removes old user permissions and replaces it with the passed in information. |
| Method Detail |
|---|
String[] getCurrentUsersAccessToSite(String siteRef)
siteRef -
List<SearchResult> searchUsers(String search)
search - first - last -
void updateNodePermissionsForUser(NodeModel nodeModel,
String userId)
nodeModel - userId - void initializeDelegatedAccessSession()
List<SiteSearchResult> searchUserSites(String search,
Map<String,String> advancedOptions,
boolean shoppingPeriod,
boolean activeShoppingData)
search - advancedOptions - shoppingPeriod - activeShoppingData -
TreeModel createAccessTreeModelForUser(String userId,
boolean addDirectChildren,
boolean cascade)
userId - addDirectChildren - cascade -
TreeModel getTreeModelForShoppingPeriod(boolean includePerms)
includePerms -
TreeModel createEntireTreeModelForUser(String userId,
boolean addDirectChildren,
boolean cascade)
userId - addDirectChildren - cascade -
TreeModel createTreeModelForShoppingPeriod(String userId)
userId -
boolean addChildrenNodes(Object node,
String userId,
List<ListOptionSerialized> blankRestrictedTools,
List<ListOptionSerialized> blankTerms,
boolean onlyAccessNodes,
List<String> accessAdminNodes)
node - userId - blankRestrictedTools - blankTerms - onlyAccessNodes - accessAdminNodes -
List<ListOptionSerialized> getEntireToolsList()
List<ListOptionSerialized> getEntireTermsList()
NodeModel getNodeModel(String nodeId,
String userId)
nodeId - userId -
HierarchyNodeSerialized getNode(String id)
id -
TreeModel getEntireTreePlusUserPerms(String userId)
userId -
boolean hasShoppingPeriodAdminNodes(String userId)
userId -
boolean hasDelegatedAccessNodes(String userId)
userId -
boolean hasAccessAdminNodes(String userId)
userId -
Map<String,List<String>> getNodesBySiteRef(String[] siteRef,
String hierarchyId)
siteRef - hierarchyId -
void saveHierarchyJobLastRunDate(Date runDate,
String nodeId)
runDate - nodeId - Date getHierarchyJobLastRunDate(String nodeId)
nodeId -
void removeNode(String nodeId)
nodeId - void removeNode(org.sakaiproject.hierarchy.model.HierarchyNode node)
node - void deleteEmptyNonSiteNodes(String hierarchyId)
hierarchyId - void clearNodeCache()
Map<String,String> getRealmRoleDisplay(boolean shopping)
shopping -
List<ListOptionSerialized> getAuthorizationOptions()
Set<HierarchyNodeSerialized> getAccessAdminNodesForUser(String userId)
userId -
boolean isShoppingPeriodOpenForSite(Date startDate,
Date endDate,
String[] nodeAccessRealmRole,
String auth,
String[] terms,
String siteTerm)
startDate - endDate - nodeAccessRealmRole - auth - terms - siteTerm -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||