public class PrivilegeGroupInheritanceSave extends Object
Use this class to add/edit/delete privileges on groups inside a folder for a subject
Sample call
SaveResultType saveResultType = new PrivilegeGroupInheritanceSave() .assignStem(stem) .assignStemScope(Scope.SUB) .assignSubject(subject) .addPrivilege(AccessPrivilege.ADMIN) .addPrivilege(AccessPrivilege.OPTIN) .save(); System.out.println(saveResultType); // INSERT, DELETE, NO_CHANGE, or UPDATE
Sample call to delete privileges on groups inside a folder for a subject
new PrivilegeGroupInheritanceSave() .assignStem(stem) .assignStemScope(Scope.SUB) .assignSubject(subject) .assignSaveMode(SaveMode.DELETE) .save();
Constructor and Description |
---|
PrivilegeGroupInheritanceSave() |
Modifier and Type | Method and Description |
---|---|
PrivilegeGroupInheritanceSave |
addField(Field theField)
field of privilege
|
PrivilegeGroupInheritanceSave |
addFieldId(String theFieldId)
field of privilege
|
PrivilegeGroupInheritanceSave |
addFieldName(String theFieldName)
field of privilege (could be privilege name too)
|
PrivilegeGroupInheritanceSave |
addPrivilege(Privilege privilege)
add privilege
|
PrivilegeGroupInheritanceSave |
addPrivilegeName(String thePrivilegeName)
field of privilege (could be privilege name too)
|
PrivilegeGroupInheritanceSave |
assignAttributeAssign(AttributeAssign theAttributeAssign)
rule attribute assign to delete
|
PrivilegeGroupInheritanceSave |
assignAttributeAssignId(String theAttributeAssignId)
rule attribute assign id to delete
|
PrivilegeGroupInheritanceSave |
assignMember(Member theMember)
member to add
|
PrivilegeGroupInheritanceSave |
assignMemberId(String theMemberId)
member id to add
|
PrivilegeGroupInheritanceSave |
assignNameMatchesSqlLikeString(String theNameMatchesSqlLikeString)
only do this for certain like strings
|
PrivilegeGroupInheritanceSave |
assignRunAsRoot(boolean runAsRoot)
set this to true to run as a root session
|
PrivilegeGroupInheritanceSave |
assignSaveMode(SaveMode theSaveMode)
save mode.
|
PrivilegeGroupInheritanceSave |
assignStem(Stem theStem)
assign a stem
|
PrivilegeGroupInheritanceSave |
assignStemId(String theStemId)
stem id to add to, mutually exclusive with stem name
|
PrivilegeGroupInheritanceSave |
assignStemName(String theStemName)
stem name to add to, mutually exclusive with stem id
|
PrivilegeGroupInheritanceSave |
assignStemScope(Stem.Scope theScope)
assign a stem scope, default to SUB
|
PrivilegeGroupInheritanceSave |
assignStemScopeName(String theScope)
assign a stemscope, default to SUB
|
PrivilegeGroupInheritanceSave |
assignSubject(Subject theSubject)
subject to add
|
PrivilegeGroupInheritanceSave |
assignSubjectId(String theSubjectId)
subject id to add, mutually exclusive and preferable to subject identifier
|
PrivilegeGroupInheritanceSave |
assignSubjectIdentifier(String theSubjectIdentifier)
subject identifier to add, mutually exclusive and not preferable to subject id
|
PrivilegeGroupInheritanceSave |
assignSubjectSourceId(String theSubjectSourceId)
subject source id to add
|
SaveResultType |
getSaveResultType()
get the save type
|
static void |
main(String[] args) |
SaveResultType |
save()
create or update or delete privileges on all groups under a stem for a subject
|
public static void main(String[] args)
args
- public PrivilegeGroupInheritanceSave assignAttributeAssignId(String theAttributeAssignId)
theAttributeAssignId
- public PrivilegeGroupInheritanceSave assignAttributeAssign(AttributeAssign theAttributeAssign)
theAttributeAssignId
- public PrivilegeGroupInheritanceSave addField(Field theField)
theFieldId
- public PrivilegeGroupInheritanceSave addFieldId(String theFieldId)
theFieldId
- public PrivilegeGroupInheritanceSave addFieldName(String theFieldName)
theFieldName
- public PrivilegeGroupInheritanceSave addPrivilege(Privilege privilege)
theFieldName
- public PrivilegeGroupInheritanceSave addPrivilegeName(String thePrivilegeName)
thePrivilegeName
- public PrivilegeGroupInheritanceSave assignMember(Member theMember)
member
- public PrivilegeGroupInheritanceSave assignMemberId(String theMemberId)
theMemberId
- public PrivilegeGroupInheritanceSave assignSaveMode(SaveMode theSaveMode)
theSaveMode
- public PrivilegeGroupInheritanceSave assignSubject(Subject theSubject)
theSubject
- public PrivilegeGroupInheritanceSave assignSubjectId(String theSubjectId)
theSubjectId
- public PrivilegeGroupInheritanceSave assignSubjectIdentifier(String theSubjectIdentifier)
thesubjectIdentifier
- public PrivilegeGroupInheritanceSave assignSubjectSourceId(String theSubjectSourceId)
theSubjectSourceId
- public SaveResultType getSaveResultType()
public PrivilegeGroupInheritanceSave assignNameMatchesSqlLikeString(String theNameMatchesSqlLikeString)
theNameMatchesSqlLikeString
- public PrivilegeGroupInheritanceSave assignRunAsRoot(boolean runAsRoot)
runAsRoot
- public SaveResultType save() throws InsufficientPrivilegeException, GroupNotFoundException
create or update or delete privileges on all groups under a stem for a subject
InsufficientPrivilegeException
GroupNotFoundException
public PrivilegeGroupInheritanceSave assignStem(Stem theStem)
theStem
- public PrivilegeGroupInheritanceSave assignStemScope(Stem.Scope theScope)
theStem
- public PrivilegeGroupInheritanceSave assignStemScopeName(String theScope)
theStem
- public PrivilegeGroupInheritanceSave assignStemId(String theStemId)
theStemId
- public PrivilegeGroupInheritanceSave assignStemName(String theStemName)
theStemName
- Copyright © 2016 Internet2. All rights reserved.