edu.internet2.middleware.grouper
Class StemCopy

java.lang.Object
  extended by edu.internet2.middleware.grouper.StemCopy

public class StemCopy
extends Object

Use this class to copy a stem to another stem.

Author:
shilen $Id: StemCopy.java,v 1.2 2009-03-29 21:17:21 shilen Exp $

Constructor Summary
StemCopy(Stem stemToCopy, Stem destinationStem)
          Create a new instance of this class if you would like to specify specific options for a stem copy.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StemCopy

public StemCopy(Stem stemToCopy,
                Stem destinationStem)
Create a new instance of this class if you would like to specify specific options for a stem copy. After setting the options, call save().

Parameters:
stemToCopy - the stem to copy
destinationStem - the destination stem for the copy
Method Detail

copyPrivilegesOfStem

public StemCopy copyPrivilegesOfStem(boolean value)
Whether to copy privileges of stems. Default is true.

Parameters:
value -
Returns:
StemCopy

copyPrivilegesOfGroup

public StemCopy copyPrivilegesOfGroup(boolean value)
Whether to copy privileges of groups. Default is true.

Parameters:
value -
Returns:
StemCopy

copyGroupAsPrivilege

public StemCopy copyGroupAsPrivilege(boolean value)
Whether to copy privileges where groups are a member. Default is true.

Parameters:
value -
Returns:
StemCopy

copyListMembersOfGroup

public StemCopy copyListMembersOfGroup(boolean value)
Whether to copy the list memberships of groups. Default is true.

Parameters:
value -
Returns:
StemCopy

copyListGroupAsMember

public StemCopy copyListGroupAsMember(boolean value)
Whether to copy list memberships where groups are a member. Default is true.

Parameters:
value -
Returns:
StemCopy

copyAttributes

public StemCopy copyAttributes(boolean value)
Whether to copy attributes. Default is true.

Parameters:
value -
Returns:
StemCopy

save

public Stem save()
          throws StemAddException,
                 InsufficientPrivilegeException
Copy the stem using the options set in this class.

Returns:
Stem the new stem
Throws:
StemAddException
InsufficientPrivilegeException