public class GrouperNonDbNamingAdapter extends BaseNamingAdapter
| Modifier and Type | Field and Description |
|---|---|
protected static Map<Privilege,String> |
priv2list |
| Constructor and Description |
|---|
GrouperNonDbNamingAdapter() |
| Modifier and Type | Method and Description |
|---|---|
Set<NamingPrivilege> |
getPrivs(GrouperSession s,
Stem ns,
Subject subj)
Get all privileges held by this subject on this stem.
|
Set<Stem> |
getStemsWhereSubjectDoesHavePrivilege(GrouperSession grouperSession,
String stemId,
Stem.Scope scope,
Subject subject,
Privilege privilege,
boolean considerAllSubject,
String sqlLikeString)
Get all stems where this subject does have this privilege.
|
Set<Stem> |
getStemsWhereSubjectDoesntHavePrivilege(GrouperSession grouperSession,
String stemId,
Stem.Scope scope,
Subject subject,
Privilege privilege,
boolean considerAllSubject,
String sqlLikeString)
Get all stems where this subject doesnt have this privilege.
|
Set |
getStemsWhereSubjectHasPriv(GrouperSession s,
Subject subj,
Privilege priv)
Get all stems where this subject has this privilege.
|
Set |
getSubjectsWithPriv(GrouperSession s,
Stem ns,
Privilege priv)
Get all subjects with this privilege on this stem.
|
void |
grantPriv(GrouperSession s,
Stem ns,
Subject subj,
Privilege priv,
String uuid)
Grant the privilege to the subject on this stem.
|
boolean |
hasPriv(GrouperSession s,
Stem ns,
Subject subj,
Privilege priv)
Check whether the subject has this privilege on this stem.
|
void |
privilegeCopy(GrouperSession s,
Stem stem1,
Stem stem2,
Privilege priv)
Copies privileges for subjects that have the specified privilege on stem1 to stem2.
|
void |
privilegeCopy(GrouperSession s,
Subject subj1,
Subject subj2,
Privilege priv)
Copies privileges of type priv on any subject for the given Subject subj1 to the given Subject subj2.
|
void |
revokeAllPrivilegesForSubject(GrouperSession grouperSession,
Subject subject)
Revoke all naming privileges that this subject has.
|
void |
revokePriv(GrouperSession s,
Stem ns,
Privilege priv)
Revoke this privilege from everyone on this stem.
|
void |
revokePriv(GrouperSession s,
Stem ns,
Subject subj,
Privilege priv)
Revoke the privilege from the subject on this stem.
|
hqlFilterStemsNotWithPrivWhereClause, hqlFilterStemsWhereClause, hqlFilterStemsWithPrivWhereClause, postHqlFilterStemspublic Set<Stem> getStemsWhereSubjectDoesntHavePrivilege(GrouperSession grouperSession, String stemId, Stem.Scope scope, Subject subject, Privilege privilege, boolean considerAllSubject, String sqlLikeString)
grouperSession - stemId - scope - subject - privilege - considerAllSubject - sqlLikeString - public Set getSubjectsWithPriv(GrouperSession s, Stem ns, Privilege priv) throws SchemaException
NamingAdapterSet stemmers = np.getSubjectsWithPriv(s, ns, NamingPrivilege.STEM_ADMIN);
s - Get privileges within this session context.ns - Get privileges on this stem.priv - Get this privilege.Subject objects.SchemaExceptionNamingAdapter.getSubjectsWithPriv(edu.internet2.middleware.grouper.GrouperSession, edu.internet2.middleware.grouper.Stem, edu.internet2.middleware.grouper.privs.Privilege)public Set getStemsWhereSubjectHasPriv(GrouperSession s, Subject subj, Privilege priv) throws SchemaException
try {
Set isStemAdmin = np.getStemsWhereSubjectHasPriv(
s, subj, NamingPrivilege.STEM_ADMIN
);
}
catch (SchemaException e0) {
// Invalid priv
}
s - Get privileges within this session context.subj - Get privileges for this subject.priv - Get this privilege.Stem objects.SchemaExceptionpublic Set<NamingPrivilege> getPrivs(GrouperSession s, Stem ns, Subject subj)
Set privs = np.getPrivs(s, ns, subj);
s - Get privileges within this session context.ns - Get privileges on this stem.subj - Get privileges for this subject.NamingPrivilege objects.public void grantPriv(GrouperSession s, Stem ns, Subject subj, Privilege priv, String uuid) throws GrantPrivilegeException, InsufficientPrivilegeException, SchemaException
NamingAdapter
try {
np.grantPriv(s, ns, subj, NamingPrivilege.STEM_ADMIN);
}
catch (GrantPrivilegeException e0) {
// Unable to grant the privilege
}
catch (InsufficientPrivilegeException e1) {
// Not privileged to grant the privilege
}
s - Grant privilege in this session context.ns - Grant privilege on this stem.subj - Grant privilege to this subject.priv - Grant this privilege.uuid - is uuid if known or null if assign oneGrantPrivilegeExceptionInsufficientPrivilegeExceptionSchemaExceptionNamingAdapter.grantPriv(edu.internet2.middleware.grouper.GrouperSession, edu.internet2.middleware.grouper.Stem, edu.internet2.middleware.subject.Subject, edu.internet2.middleware.grouper.privs.Privilege, String)public boolean hasPriv(GrouperSession s, Stem ns, Subject subj, Privilege priv) throws SchemaException
try {
np.hasPriv(s, ns, subj, NamingPrivilege.STEM_ADMIN);
}
catch (SchemaException e) {
// Invalid privilege
}
s - Check privilege in this session context.ns - Check privilege on this stem.subj - Check privilege for this subject.priv - Check this privilege.SchemaExceptionpublic void privilegeCopy(GrouperSession s, Stem stem1, Stem stem2, Privilege priv) throws InsufficientPrivilegeException, GrantPrivilegeException, SchemaException
s - stem1 - stem2 - priv - InsufficientPrivilegeExceptionGrantPrivilegeExceptionSchemaExceptionpublic void privilegeCopy(GrouperSession s, Subject subj1, Subject subj2, Privilege priv) throws InsufficientPrivilegeException, GrantPrivilegeException, SchemaException
s - subj1 - subj2 - priv - InsufficientPrivilegeExceptionGrantPrivilegeExceptionSchemaExceptionpublic void revokePriv(GrouperSession s, Stem ns, Privilege priv) throws InsufficientPrivilegeException, RevokePrivilegeException, SchemaException
try {
np.revokePriv(s, ns, NamingPrivilege.STEM_ADMIN);
}
catch (InsufficientPrivilegeException eIP) {
// Not privileged to revoke the privilege
}
catch (RevokePrivilegeException eRP) {
// Unable to revoke the privilege
}
s - Revoke privilege in this session context.ns - Revoke privilege on this stem.priv - Revoke this privilege.InsufficientPrivilegeExceptionRevokePrivilegeExceptionSchemaExceptionpublic void revokePriv(GrouperSession s, Stem ns, Subject subj, Privilege priv) throws InsufficientPrivilegeException, RevokePrivilegeException, SchemaException
try {
np.revokePriv(s, ns, subj, NamingPrivilege.STEM_ADMIN);
}
catch (InsufficientPrivilegeException e0) {
// Not privileged to grant the privilege
}
catch (RevokePrivilegeException e2) {
// Unable to revoke the privilege
}
s - Revoke privilege in this session context.ns - Revoke privilege on this stem.subj - Revoke privilege from this subject.priv - Revoke this privilege.InsufficientPrivilegeExceptionRevokePrivilegeExceptionSchemaExceptionpublic void revokeAllPrivilegesForSubject(GrouperSession grouperSession, Subject subject)
NamingAdapterpublic Set<Stem> getStemsWhereSubjectDoesHavePrivilege(GrouperSession grouperSession, String stemId, Stem.Scope scope, Subject subject, Privilege privilege, boolean considerAllSubject, String sqlLikeString)
grouperSession - stemId - scope - subject - privilege - considerAllSubject - sqlLikeString - Copyright © 2016 Internet2. All rights reserved.