|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sakaiproject.util.storage.BaseDbFlatStorage
org.sakaiproject.component.legacy.authzGroup.DbAuthzGroupService.DbStorage
Covers for the BaseXmlFileStorage, providing AuthzGroup and RealmEdit parameters
Nested Class Summary | |
class |
DbAuthzGroupService.DbStorage.RealmAndProvider
|
class |
DbAuthzGroupService.DbStorage.RealmAndRole
|
class |
DbAuthzGroupService.DbStorage.UserAndRole
|
Field Summary |
Fields inherited from class org.sakaiproject.util.storage.BaseDbFlatStorage |
m_caseInsensitive, m_locking, m_locks, m_locksAreInTable, m_reader, m_resourcePropertyTableName, m_resourceTableDbidField, m_resourceTableIdField, m_resourceTableInsertFields, m_resourceTableInsertValues, m_resourceTableName, m_resourceTableReadFields, m_resourceTableSortField1, m_resourceTableSortField2, m_resourceTableUpdateFields, m_sql |
Constructor Summary | |
DbAuthzGroupService.DbStorage()
Construct. |
Method Summary | |
void |
cancel(AuthzGroup edit)
|
boolean |
check(String id)
Check if an AuthzGroup by this id exists. |
void |
completeGet(BaseAuthzGroup realm)
Complete the read process once the basic realm info has been read |
protected void |
completeGet(Connection conn,
BaseAuthzGroup realm,
boolean updateProvider)
Complete the read process once the basic realm info has been read |
int |
countAuthzGroups(String criteria)
Count the AuthzGroup objets that meet specified criteria. |
AuthzGroup |
edit(String id)
|
protected Object[] |
fields(String id,
BaseAuthzGroup edit,
boolean idAgain)
Get the fields for the database from the edit for this id, and the id again at the end if needed |
protected AuthzGroup |
get(Connection conn,
String id)
|
AuthzGroup |
get(String id)
Get the AuthzGroup with this id, or null if not found. |
Set |
getAllowedFunctions(String role,
Collection realms)
Get the set of functions that users with this role in these AuthzGroups are allowed to perform. |
List |
getAuthzGroups(String criteria,
PagingPosition page)
Access a list of AuthzGroups that meet specified criteria, naturally sorted. |
Set |
getAuthzGroupsIsAllowed(String userId,
String lock,
Collection azGroups)
Get the set of AuthzGroup ids in which this user is allowed to perform this function. |
String |
getUserRole(String userId,
String azGroupId)
Get the role name for this user in this AuthzGroup. |
Set |
getUsersIsAllowed(String lock,
Collection realms)
Get the set of user ids of users who are allowed to perform the function in the named AuthzGroups. |
Map |
getUsersRole(Collection userIds,
String azGroupId)
Get the role name for each user in the userIds Collection in this AuthzGroup. |
boolean |
isAllowed(String userId,
String lock,
Collection realms)
Test if this user is allowed to perform the function in the named AuthzGroups. |
boolean |
isAllowed(String userId,
String lock,
String realmId)
Test if this user is allowed to perform the function in the named AuthzGroup. |
AuthzGroup |
put(String id)
Add a new AuthzGroup with this id. |
Object |
readSqlResultRecord(ResultSet result)
Read from the result one set of fields to create a Resource. |
void |
refreshAuthzGroup(BaseAuthzGroup realm)
Refresh the external user - role membership for this AuthzGroup |
void |
refreshUser(String userId,
Map providerGrants)
Refresh this user's roles in any AuthzGroup that has an entry in the map; the user's new role is in the map. |
void |
remove(AuthzGroup edit)
Remove this AuthzGroup. |
void |
save(AuthzGroup edit)
Save the changes to the AuthzGroup |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.sakaiproject.component.legacy.authzGroup.BaseAuthzGroupService.Storage |
close, open |
Constructor Detail |
public DbAuthzGroupService.DbStorage()
Method Detail |
public boolean check(String id)
BaseAuthzGroupService.Storage
check
in interface BaseAuthzGroupService.Storage
id
- The AuthzGroup id.
public AuthzGroup get(String id)
BaseAuthzGroupService.Storage
get
in interface BaseAuthzGroupService.Storage
id
- The AuthzGroup id.
protected AuthzGroup get(Connection conn, String id)
public void completeGet(BaseAuthzGroup realm)
completeGet
in interface BaseAuthzGroupService.Storage
realm
- The real to completeprotected void completeGet(Connection conn, BaseAuthzGroup realm, boolean updateProvider)
conn
- optional SQL connection to use.realm
- The real to complete.updateProvider
- if true, update and store the provider info.public List getAuthzGroups(String criteria, PagingPosition page)
getAuthzGroups
in interface BaseAuthzGroupService.Storage
criteria
- Selection criteria: AuthzGroups returned will match this string somewhere in their id, or provider group id.page
- The PagePosition subset of items to return.
public int countAuthzGroups(String criteria)
countAuthzGroups
in interface BaseAuthzGroupService.Storage
criteria
- Selection criteria: realms returned will match this string somewhere in their id, or provider group id.
public Set getAuthzGroupsIsAllowed(String userId, String lock, Collection azGroups)
getAuthzGroupsIsAllowed
in interface BaseAuthzGroupService.Storage
userId
- The user id.lock
- The function to check.azGroups
- The Collection of AuthzGroup ids to search; if null, search them all.
public AuthzGroup put(String id)
BaseAuthzGroupService.Storage
put
in interface BaseAuthzGroupService.Storage
id
- The AuthzGroup id.
public AuthzGroup edit(String id)
public void save(AuthzGroup edit)
BaseAuthzGroupService.Storage
save
in interface BaseAuthzGroupService.Storage
edit
- The AuthzGroup to save.public void cancel(AuthzGroup edit)
public void remove(AuthzGroup edit)
BaseAuthzGroupService.Storage
remove
in interface BaseAuthzGroupService.Storage
edit
- The azGroup to remove.protected Object[] fields(String id, BaseAuthzGroup edit, boolean idAgain)
id
- The resource idedit
- The edit (may be null in a new)idAgain
- If true, include the id field again at the end, else don't.
public Object readSqlResultRecord(ResultSet result)
readSqlResultRecord
in interface SqlReader
result
- The Sql query result.
public boolean isAllowed(String userId, String lock, String realmId)
isAllowed
in interface BaseAuthzGroupService.Storage
userId
- The user id.lock
- The function to open.realmId
- The AuthzGroup id to consult, if it exists.
public boolean isAllowed(String userId, String lock, Collection realms)
isAllowed
in interface BaseAuthzGroupService.Storage
userId
- The user id.lock
- The function to open.
public Set getUsersIsAllowed(String lock, Collection realms)
getUsersIsAllowed
in interface BaseAuthzGroupService.Storage
lock
- The function to check.realms
- A collection of the ids of AuthzGroups to consult.
public Set getAllowedFunctions(String role, Collection realms)
getAllowedFunctions
in interface BaseAuthzGroupService.Storage
role
- The role name.realms
- A collection of AuthzGroup ids to consult.
public void refreshUser(String userId, Map providerGrants)
refreshUser
in interface BaseAuthzGroupService.Storage
userId
- The user idproviderGrants
- The Map of external group id -> role id.public void refreshAuthzGroup(BaseAuthzGroup realm)
refreshAuthzGroup
in interface BaseAuthzGroupService.Storage
realm
- The azGroup to refresh.public String getUserRole(String userId, String azGroupId)
getUserRole
in interface BaseAuthzGroupService.Storage
userId
- The user id.azGroupId
- The AuthzGroup id to consult, if it exists.
public Map getUsersRole(Collection userIds, String azGroupId)
getUsersRole
in interface BaseAuthzGroupService.Storage
azGroupId
- The AuthzGroup id to consult, if it exists.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |