public class StemCopy extends Object
Use this class to copy a stem to another stem.
Sample call to copy everything from source to target
StemCopy stemCopy = new StemCopy(stem_copy_source, stem_copy_target); Stem newStem = stemCopy.copyPrivilegesOfStem(true).copyPrivilegesOfGroup(true) .copyGroupAsPrivilege(true).copyListMembersOfGroup(true) .copyListGroupAsMember(true).copyAttributes(true).save();
Constructor and Description |
---|
StemCopy(Stem stemToCopy,
Stem destinationStem)
Create a new instance of this class if you would like to specify
specific options for a stem copy.
|
Modifier and Type | Method and Description |
---|---|
StemCopy |
copyAttributes(boolean value)
Whether to copy attributes.
|
StemCopy |
copyGroupAsPrivilege(boolean value)
Whether to copy privileges where groups are a member.
|
StemCopy |
copyListGroupAsMember(boolean value)
Whether to copy list memberships where groups are a member.
|
StemCopy |
copyListMembersOfGroup(boolean value)
Whether to copy the list memberships of groups.
|
StemCopy |
copyPrivilegesOfGroup(boolean value)
Whether to copy privileges of groups.
|
StemCopy |
copyPrivilegesOfStem(boolean value)
Whether to copy privileges of stems.
|
Stem |
save()
Copy the stem using the options set in this class.
|
public StemCopy copyPrivilegesOfStem(boolean value)
value
- public StemCopy copyPrivilegesOfGroup(boolean value)
value
- public StemCopy copyGroupAsPrivilege(boolean value)
value
- public StemCopy copyListMembersOfGroup(boolean value)
value
- public StemCopy copyListGroupAsMember(boolean value)
value
- public StemCopy copyAttributes(boolean value)
value
- public Stem save() throws StemAddException, InsufficientPrivilegeException
StemAddException
InsufficientPrivilegeException
Copyright © 2016 Internet2. All rights reserved.