|
||||||||||
| 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,
boolean onlyAccessNodes,
List<String> accessAdminNodes,
boolean shopping,
boolean shoppingPeriodTool)
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. |
String |
getAddDAMyworkspaceJobStatus()
returns the status of the job for adding delegated access tool to user's my workspace. |
String[] |
getCurrentUsersAccessToSite(String siteRef)
This returns an array of {realm, role} for which the user has delegated access to. |
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 ':'. |
Map<String,AccessNode> |
getUserAccessForSite(String siteRef)
Returns a map of UserId -> AccessNode |
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[] restrictedAuthTools,
String[] restrictedPublicTools)
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 |
void |
scheduleAddDAMyworkspaceJobStatus()
Schedules the AddDAMyworkspace job to run immediately |
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 |
syncMyworkspaceToolForUser(String userId)
This will ensure the Delegated Access tool is synced with the user's MyWorkspace. |
void |
updateAddDAMyworkspaceJobStatus(String status)
removes the old status and updates it with the string passed in |
void |
updateNodePermissionsForUser(DefaultMutableTreeNode node,
String userId)
Removes old user permissions and replaces it with the passed in information. |
Map<String,String> |
updateShoppingPeriodSettings(DefaultMutableTreeNode node)
Call this method if you want to update a node and all it's children it will only update nodes that start with /site/ |
| Method Detail |
|---|
String[] getCurrentUsersAccessToSite(String siteRef)
siteRef -
List<SearchResult> searchUsers(String search)
search - first - last -
void updateNodePermissionsForUser(DefaultMutableTreeNode node,
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 createEntireTreeModelForUser(String userId,
boolean addDirectChildren,
boolean cascade)
userId - addDirectChildren - cascade -
TreeModel createTreeModelForShoppingPeriod(String userId)
userId -
boolean addChildrenNodes(Object node,
String userId,
List<ListOptionSerialized> blankRestrictedTools,
boolean onlyAccessNodes,
List<String> accessAdminNodes,
boolean shopping,
boolean shoppingPeriodTool)
node - userId - blankRestrictedTools - onlyAccessNodes - accessAdminNodes - shopping - shoppingPeriodTool -
List<ListOptionSerialized> getEntireToolsList()
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 -
Set<HierarchyNodeSerialized> getAccessAdminNodesForUser(String userId)
userId -
boolean isShoppingPeriodOpenForSite(Date startDate,
Date endDate,
String[] nodeAccessRealmRole,
String[] restrictedAuthTools,
String[] restrictedPublicTools)
startDate - endDate - nodeAccessRealmRole - restrictedAuthTools - restrictedPublicTools -
void syncMyworkspaceToolForUser(String userId)
userId - Map<String,AccessNode> getUserAccessForSite(String siteRef)
siteRef -
Map<String,String> updateShoppingPeriodSettings(DefaultMutableTreeNode node)
node -
String getAddDAMyworkspaceJobStatus()
void updateAddDAMyworkspaceJobStatus(String status)
status - void scheduleAddDAMyworkspaceJobStatus()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||