Class Stem

java.lang.Object
edu.internet2.middleware.grouper.GrouperAPI
edu.internet2.middleware.grouper.Stem
All Implemented Interfaces:
AttributeAssignable, GrouperSetElement, HibGrouperLifecycle, Hib3GrouperVersioned, GrouperCloneable, GrouperHasContext, GrouperId, GrouperObject, Owner, GrouperUtil.FieldValuable, XmlImportable<Stem>, XmlImportableBase<Stem>, Serializable, Comparable<GrouperObject>, org.hibernate.classic.Lifecycle

A namespace within the Groups Registry.

Version:
$Id: Stem.java,v 1.209 2009-12-15 06:47:06 mchyzer Exp $
See Also:
  • Field Details

  • Constructor Details

    • Stem

      public Stem()
  • Method Details

    • getParentStemName

      public String getParentStemName()
      get the name of the parent stem
      Returns:
      the name of the parent stem
    • getId

      public String getId()
      id is same as uuid
      Specified by:
      getId in interface GrouperId
      Returns:
      id
    • compareTo

      public int compareTo(GrouperObject that)
      Specified by:
      compareTo in interface Comparable<GrouperObject>
      See Also:
    • getAttributeDelegate

      public AttributeAssignStemDelegate getAttributeDelegate()
      Description copied from interface: AttributeAssignable
      get the logic delegate
      Specified by:
      getAttributeDelegate in interface AttributeAssignable
      Returns:
      the delegate
    • getAttributeValueDelegate

      public AttributeValueDelegate getAttributeValueDelegate()
      this delegate works on attributes and values at the same time
      Specified by:
      getAttributeValueDelegate in interface AttributeAssignable
      Returns:
      the delegate
    • getContextId

      public String getContextId()
      context id of the transaction
      Returns:
      context id
    • setContextId

      public void setContextId(String contextId1)
      context id of the transaction
      Specified by:
      setContextId in interface GrouperHasContext
      Parameters:
      contextId1 -
    • addChildGroup

      public Group addChildGroup(String extension, String displayExtension) throws GroupAddException, InsufficientPrivilegeException
      Add a new group to the registry.
       // Add a group with the extension "edu" beneath this stem.
       try {
         Group edu = ns.addChildGroup("edu", "edu domain");
       }
       catch (GroupAddException eGA) {
         // Group not added
       }
       catch (InsufficientPrivilegeException eIP) {
         // Not privileged to add group
       }
       
      Parameters:
      extension - Group's extension
      displayExtension - Groups' displayExtension
      Returns:
      The added Group
      Throws:
      GroupAddException
      InsufficientPrivilegeException
    • addChildAttributeDef

      public AttributeDef addChildAttributeDef(String extension, AttributeDefType attributeDefType) throws InsufficientPrivilegeException
      Add a new attribute def to the registry.
      Parameters:
      extension - attributeDef's extension
      attributeDefType -
      Returns:
      The added AttributeDef
      Throws:
      InsufficientPrivilegeException
    • addChildAttributeDefName

      public AttributeDefName addChildAttributeDefName(AttributeDef attributeDef, String extension, String displayExtension) throws InsufficientPrivilegeException
      Add a new attribute def to the registry.
      Parameters:
      attributeDef - is the definition of this attribute
      extension - attributeDef's extension
      displayExtension -
      Returns:
      The added AttributeDef
      Throws:
      InsufficientPrivilegeException
    • addChildAttributeDefName

      public AttributeDefName addChildAttributeDefName(AttributeDef attributeDef, String extension, String displayExtension, String uuid) throws InsufficientPrivilegeException
      Add a new attribute def to the registry.
      Parameters:
      attributeDef - is the definition of this attribute
      extension - attributeDef's extension
      displayExtension -
      uuid -
      Returns:
      The added AttributeDef
      Throws:
      InsufficientPrivilegeException
    • addChildStem

      public Stem addChildStem(String extension, String displayExtension, String uuid, boolean failIfExists) throws InsufficientPrivilegeException, StemAddException
      Add a new stem to the registry.
       // Add a stem with the extension "edu" beneath this stem.
       try {
         Stem edu = ns.addChildStem("edu", "edu domain");
       }
       catch (StemAddException e) {
         // Stem not added
       }
       
      Parameters:
      extension - Stem's extension
      displayExtension - Stem' displayExtension
      uuid - if creating this is the uuid
      failIfExists - throws StemAddException if exists, else just return the existing stem
      Returns:
      The added Stem
      Throws:
      InsufficientPrivilegeException
      StemAddException
    • addChildStem

      public Stem addChildStem(String extension, String displayExtension) throws InsufficientPrivilegeException, StemAddException
      Add a new stem to the registry.
       // Add a stem with the extension "edu" beneath this stem.
       try {
         Stem edu = ns.addChildStem("edu", "edu domain");
       }
       catch (StemAddException e) {
         // Stem not added
       }
       
      Parameters:
      extension - Stem's extension
      displayExtension - Stem' displayExtension
      Returns:
      The added Stem
      Throws:
      InsufficientPrivilegeException
      StemAddException
    • deleteOccuring

      public static boolean deleteOccuring()
      see if we are in the middle of a delete (e.g. for hook)
      Returns:
      true if delete is occurring
    • delete

      Delete this stem from the Groups Registry.
       try {
         ns.delete();
       }
       catch (InsufficientPrivilegeException eIP) {
         // not privileged to delete stem
       }
       catch (StemDeleteException eSD) {
         // unable to delete stem
       }
       
      Throws:
      InsufficientPrivilegeException
      StemDeleteException
    • getChildGroups

      public Set getChildGroups()
      Get groups that are immediate children of this stem.
      Returns:
      Set of Group objects.
      See Also:
    • getChildGroups

      public Set<Group> getChildGroups(Stem.Scope scope) throws IllegalArgumentException
      Get groups that are children of this stem.
      Parameters:
      scope - of search: Scope.ONE or Scope.SUB
      Returns:
      Child groups.
      Throws:
      IllegalArgumentException - if null scope.
      Since:
      1.2.1
    • getChildGroups

      public Set<Group> getChildGroups(Stem.Scope scope, Set<Privilege> inPrivSet, QueryOptions queryOptions)
      Get groups that are children of this stem.
      Parameters:
      scope - of search: Scope.ONE or Scope.SUB
      inPrivSet - set of privileges that the grouper session needs one of for the row to be returned. AccessPrivilege has some pre-baked constant sets for use here
      queryOptions -
      Returns:
      Child groups.
      Throws:
      IllegalArgumentException - if null scope.
      Since:
      1.2.1
    • getChildGroups

      public Set<Group> getChildGroups(Stem.Scope scope, Set<Privilege> inPrivSet, QueryOptions queryOptions, Set<TypeOfGroup> typeOfGroups) throws IllegalArgumentException
      Get groups that are children of this stem.
      Parameters:
      scope - of search: Scope.ONE or Scope.SUB
      inPrivSet - set of privileges that the grouper session needs one of for the row to be returned. AccessPrivilege has some pre-baked constant sets for use here
      typeOfGroups - is the type of groups to get, or null for all
      queryOptions -
      Returns:
      Child groups.
      Throws:
      IllegalArgumentException - if null scope.
      Since:
      1.2.1
    • getChildGroups

      public Set<Group> getChildGroups(Stem.Scope scope, Set<Privilege> inPrivSet, QueryOptions queryOptions, Set<TypeOfGroup> typeOfGroups, Boolean enabled) throws IllegalArgumentException
      Get groups that are children of this stem.
      Parameters:
      scope - of search: Scope.ONE or Scope.SUB
      inPrivSet - set of privileges that the grouper session needs one of for the row to be returned. AccessPrivilege has some pre-baked constant sets for use here
      typeOfGroups - is the type of groups to get, or null for all
      queryOptions -
      enabled - true if enabled only, false if disabled only, null if everything
      Returns:
      Child groups.
      Throws:
      IllegalArgumentException - if null scope.
      Since:
      1.2.1
    • getChildMembershipGroups

      public Set<Group> getChildMembershipGroups(Stem.Scope scope, Set<Privilege> inPrivSet, QueryOptions queryOptions) throws IllegalArgumentException
      Get groups that are children of this stem and there is a list membership.
      Parameters:
      scope - of search: Scope.ONE or Scope.SUB
      inPrivSet - set of privileges that the grouper session needs one of for the row to be returned. AccessPrivilege has some pre-baked constant sets for use here
      queryOptions -
      Returns:
      Child groups.
      Throws:
      IllegalArgumentException - if null scope.
      Since:
      1.2.1
    • getChildStems

      public Set<Stem> getChildStems(Stem.Scope scope, Set<Privilege> inPrivSet, QueryOptions queryOptions) throws IllegalArgumentException
      Get groups that are children of this stem.
      Parameters:
      scope - of search: Scope.ONE or Scope.SUB
      inPrivSet - set of privileges that the grouper session needs one of for the row to be returned. AccessPrivilege has some pre-baked constant sets for use here
      queryOptions -
      Returns:
      Child groups.
      Throws:
      IllegalArgumentException - if null scope.
      Since:
      1.2.1
    • getChildGroups

      @Deprecated public Set<Group> getChildGroups(Privilege[] privileges, Stem.Scope scope) throws IllegalArgumentException
      Deprecated.
      use the overload
      get child groups
      Parameters:
      privileges - privs
      scope - all or direct
      Returns:
      Child groups where current subject has any of the specified privileges.
      Throws:
      IllegalArgumentException - if any parameter is null.
      Since:
      1.2.1
    • getChildStems

      public Set<Stem> getChildStems()
      Get stems that are immediate children of this stem.
      Returns:
      Set of Stem objects.
      See Also:
    • getChildStems

      public Set<Stem> getChildStems(Stem.Scope scope)
      Get stems that are children of this stem.
      Parameters:
      scope - of search: Scope.ONE or Scope.SUB
      Returns:
      Child stems.
      Throws:
      IllegalArgumentException - if null scope.
      Since:
      1.2.1
    • getChildStems

      public Set<Stem> getChildStems(Stem.Scope scope, QueryOptions queryOptions) throws IllegalArgumentException
      Get stems that are children of this stem.
      Parameters:
      scope - of search: Scope.ONE or Scope.SUB
      queryOptions -
      Returns:
      Child stems.
      Throws:
      IllegalArgumentException - if null scope.
      Since:
      1.2.1
    • getChildStems

      public Set<Stem> getChildStems(Privilege[] privileges, Stem.Scope scope) throws IllegalArgumentException
      get child stems
      Parameters:
      privileges - privs
      scope - all or direct
      Returns:
      Child (or deeper) stems where current subject has any of the specified privileges. Parent stems of grandchild (or deeper) groups where the current subject has any of the specified privileges.
      Throws:
      IllegalArgumentException - if any parameter is null.
      Since:
      1.2.1
    • getCreateSubject

      public Subject getCreateSubject() throws SubjectNotFoundException
      Get subject that created this stem.
       // Get creator of this stem.
       try {
         Subject creator = ns.getCreateSubject();
       }
       catch (SubjectNotFoundException e) {
         // Couldn't find subject
       }
       
      Returns:
      Subject that created this stem.
      Throws:
      SubjectNotFoundException
    • getCreateTime

      public Date getCreateTime()
      Get creation time for this stem.
       // Get create time.
       Date created = ns.getCreateTime();
       
      Returns:
      Date that this stem was created.
    • getCreators

      public Set getCreators() throws GrouperException
      Get subjects with CREATE privilege on this stem.
       Set creators = ns.getCreators();
       
      Returns:
      Set of Subject objects
      Throws:
      GrouperException
    • getDescription

      public String getDescription()
      Get stem description.
       // Get description
       String description = ns.getDescription();
       
      Specified by:
      getDescription in interface GrouperObject
      Returns:
      Stem description.
    • getDisplayExtension

      public String getDisplayExtension()
      Get stem displayExtension.
       // Get displayExtension
       String displayExtn = ns.getDisplayExtension();
       
      Returns:
      Stem displayExtension.
    • getDisplayName

      public String getDisplayName()
      Get stem displayName.
       // Get displayName
       String displayName = ns.getDisplayName();
       
      Specified by:
      getDisplayName in interface GrouperObject
      Returns:
      Stem displayName.
    • getExtension

      public String getExtension()
      Get stem extension.
       // Get extension
       String extension = ns.getExtension();
       
      Returns:
      Stem extension.
    • getModifySubject

      public Subject getModifySubject() throws SubjectNotFoundException
      Get subject that last modified this stem.
       // Get last modifier of this stem.
       try {
         Subject modifier = ns.getModifySubject();
       }
       catch (SubjectNotFoundException e) {
         // Couldn't find subject
       }
       
      Returns:
      Subject that last modified this stem.
      Throws:
      SubjectNotFoundException
    • getModifyTime

      public Date getModifyTime()
      Get last modified time for this stem.
       // Get last modified time.
       Date modified = ns.getModifyTime();
       
      Returns:
      Date that this stem was last modified.
    • getName

      public String getName()
      Get stem name.
       // Get name
       String name = ns.getName();
       
      Specified by:
      getName in interface GrouperObject
      Specified by:
      getName in interface Owner
      Returns:
      Stem name.
    • getParentStem

      public Stem getParentStem() throws StemNotFoundException
      Get parent stem.
       // Get parent
       Stem parent = ns.getParentStem();
       
      Specified by:
      getParentStem in interface GrouperObject
      Returns:
      Parent Stem.
      Throws:
      StemNotFoundException - if stem not found
    • getParentStemOrNull

      public Stem getParentStemOrNull()
      Get parent stem.
       // Get parent
       Stem parent = ns.getParentStem();
       
      Returns:
      Parent Stem.
      Throws:
      StemNotFoundException - if stem not found
    • getAlternateNameDb

      public String getAlternateNameDb()
      Returns the alternate name for the stem. Used by hibernate.
      Returns:
      the alternate name
    • getAlternateName

      public String getAlternateName()
      Returns the alternate name for the stem. If multiple, returns the first one
      Returns:
      the alternate name
    • setAlternateNameDb

      public void setAlternateNameDb(String alternateName)
      Set the group's alternate name Used by hibernate.
      Parameters:
      alternateName -
    • getAlternateNames

      public Set<String> getAlternateNames()
      Returns the alternate names for the stem. Only one alternate name is supported currently, so a Set of size 0 or 1 will be returned.
      Returns:
      Set of alternate names.
    • addAlternateName

      public void addAlternateName(String alternateName)
      Add an alternate name for this stem. Only one alternate name is supported currently, so this will replace any existing alternate name. This won't get saved until you call store().
      Parameters:
      alternateName -
    • internal_addAlternateName

      protected void internal_addAlternateName(String alternateName)
      Add an alternate name for this stem. Only one alternate name is supported currently, so this will replace any existing alternate name. This won't get saved until you call store().
      Parameters:
      alternateName -
    • deleteAlternateName

      public boolean deleteAlternateName(String alternateName)
      Delete the specified alternate name. This won't get saved until you call store().
      Parameters:
      alternateName -
      Returns:
      false if the stem does not have the specified alternate name
    • getPrivs

      public Set<NamingPrivilege> getPrivs(Subject subj)
      Get privileges that the specified subject has on this stem.
       Set privs = ns.getPrivs(subj);
       
      Parameters:
      subj - Get privileges for this subject.
      Returns:
      Set of NamingPrivilege objects.
    • getStemmers

      public Set getStemmers() throws GrouperException
      Get subjects with STEM privilege on this stem.
       Set stemmers = ns.getStemmers();
       
      Returns:
      Set of Subject objects
      Throws:
      GrouperException
    • getStemAdmins

      public Set getStemAdmins() throws GrouperException
      Get subjects with STEM_ADMIN privilege on this stem.
       Set stemAdmins = ns.getStemAdmins();
       
      Returns:
      Set of Subject objects
      Throws:
      GrouperException
    • getStemAttrReaders

      public Set getStemAttrReaders() throws GrouperException
      Get subjects with STEM_ATTR_READ privilege on this stem.
       Set subjects = ns.getStemAttrReaders();
       
      Returns:
      Set of Subject objects
      Throws:
      GrouperException
    • getStemAttrUpdaters

      public Set getStemAttrUpdaters() throws GrouperException
      Get subjects with STEM_ATTR_UPDATE privilege on this stem.
       Set subjects = ns.getStemAttrUpdaters();
       
      Returns:
      Set of Subject objects
      Throws:
      GrouperException
    • getStemViewers

      public Set getStemViewers() throws GrouperException
      Get subjects with STEM_VIEW privilege on this stem.
       Set subjects = ns.getStemViewers();
       
      Returns:
      Set of Subject objects
      Throws:
      GrouperException
    • getUuid

      public String getUuid()
      Specified by:
      getUuid in interface Owner
      Returns:
      uuid
    • grantPriv

      Grant a privilege on this stem.
       try {
         ns.grantPriv(subj, NamingPrivilege.CREATE);
       }
       catch (GrantPrivilegeException e) {
         // Error granting privilege
       }
       
      Parameters:
      subj - Grant privilege to this subject.
      priv - Grant this privilege.
      Throws:
      GrantPrivilegeException
      InsufficientPrivilegeException
      SchemaException
    • grantPriv

      public boolean grantPriv(Subject subj, Privilege priv, boolean exceptionIfAlreadyMember) throws GrantPrivilegeException, InsufficientPrivilegeException, SchemaException
      Grant a privilege on this stem.
       try {
         ns.grantPriv(subj, NamingPrivilege.CREATE);
       }
       catch (GrantPrivilegeException e) {
         // Error granting privilege
       }
       
      Parameters:
      subj - Grant privilege to this subject.
      priv - Grant this privilege.
      exceptionIfAlreadyMember - if false, and subject is already a member, then dont throw a MemberAddException if the member is already in the group
      Returns:
      false if it already existed, true if it didnt already exist
      Throws:
      GrantPrivilegeException
      InsufficientPrivilegeException
      SchemaException
    • internal_grantPriv

      public boolean internal_grantPriv(Subject subj, Privilege priv, boolean exceptionIfAlreadyMember, String uuid) throws GrantPrivilegeException, InsufficientPrivilegeException, SchemaException
      Grant a privilege on this stem.
       try {
         ns.grantPriv(subj, NamingPrivilege.CREATE);
       }
       catch (GrantPrivilegeException e) {
         // Error granting privilege
       }
       
      Parameters:
      subj - Grant privilege to this subject.
      priv - Grant this privilege.
      exceptionIfAlreadyMember - if false, and subject is already a member, then dont throw a MemberAddException if the member is already in the group
      uuid -
      Returns:
      false if it already existed, true if it didnt already exist
      Throws:
      GrantPrivilegeException
      InsufficientPrivilegeException
      SchemaException
    • hasCreate

      public boolean hasCreate(Subject subj)
      Check whether a subject has the CREATE privilege on this stem.
       if (ns.hasCreate(subj)) {
         // Has CREATE
       }
         // Does not have CREATE
       } 
       
      Parameters:
      subj - Check whether this subject has CREATE.
      Returns:
      Boolean true if the subject has CREATE.
    • hasStemAttrRead

      public boolean hasStemAttrRead(Subject subj)
      Check whether a subject has the STEM_ATTR_READ privilege on this stem.
       if (ns.hasStemAttrRead(subj)) {
         // Has STEM_ATTR_READ
       }
         // Does not have STEM_ATTR_READ
       } 
       
      Parameters:
      subj - Check whether this subject has STEM_ATTR_READ.
      Returns:
      Boolean true if the subject has STEM_ATTR_READ.
    • hasStemAttrUpdate

      public boolean hasStemAttrUpdate(Subject subj)
      Check whether a subject has the STEM_ATTR_UPDATE privilege on this stem.
       if (ns.hasStemAttrUpdate(subj)) {
         // Has STEM_ATTR_UPDATE
       }
         // Does not have STEM_ATTR_UPDATE
       } 
       
      Parameters:
      subj - Check whether this subject has STEM_ATTR_UPDATE.
      Returns:
      Boolean true if the subject has STEM_ATTR_UPDATE.
    • hasStemView

      public boolean hasStemView(Subject subj)
      Check whether a subject has the STEM_VIEW privilege on this stem.
       if (ns.hasStemView(subj)) {
         // Has STEM_VIEW
       }
         // Does not have STEM_VIEW
       } 
       
      Parameters:
      subj - Check whether this subject has STEM_VIEW.
      Returns:
      Boolean true if the subject has STEM_VIEW.
    • hasStem

      public boolean hasStem(Subject subj)
      Check whether a member has the STEM privilege on this stem.
       if (ns.hasStem(subj)) {
         // Has STEM
       }
         // Does not have STEM
       } 
       
      Parameters:
      subj - check whether this subject has STEM.
      Returns:
      Boolean true if the subject has STEM.
    • hasStemAdmin

      public boolean hasStemAdmin(Subject subj)
      Check whether a member has the STEM_ADMIN privilege on this stem.
       if (ns.hasStemAdmin(subj)) {
         // Has STEM_ADMIN
       }
         // Does not have STEM_ADMIN
       } 
       
      Parameters:
      subj - check whether this subject has STEM_ADMIN.
      Returns:
      Boolean true if the subject has STEM_ADMIN.
    • hasPrivilege

      public boolean hasPrivilege(Subject subject, String privilegeOrListName)
      see if the subject has a privilege
      Parameters:
      subject -
      privilegeOrListName -
      Returns:
      true if has privilege
    • isChildGroup

      public boolean isChildGroup(Group group) throws IllegalArgumentException
      TODO 20070813 make public?
      Parameters:
      group - group
      Returns:
      True if group is child, at any depth, of this stem.
      Throws:
      IllegalArgumentException - if group is null.
      Since:
      1.2.1
    • isChildStem

      public boolean isChildStem(Stem stem) throws IllegalArgumentException
      TODO 20070813 make public?
      Parameters:
      stem - stem
      Returns:
      True if stem is child, at any depth, of this stem.
      Throws:
      IllegalArgumentException - if stem is null.
      Since:
      1.2.1
    • isRootStem

      public boolean isRootStem()
      Returns:
      Boolean true if this is the root stem of the Groups Registry.
      Since:
      1.2.0
    • revokePriv

      Revoke all privileges of the specified type on this stem.
       try {
         ns.revokePriv(NamingPrivilege.CREATE);
       }
       catch (InsufficientPrivilegeException eIP) {
         // Not privileged to revoke this privilege
       }
       catch (RevokePrivilegeException eRP) {
         // Error revoking privilege
       }
       
      Parameters:
      priv - Revoke this privilege.
      Throws:
      InsufficientPrivilegeException
      RevokePrivilegeException
      SchemaException
    • revokePriv

      Revoke a privilege on this stem.
       try {
         ns.revokePriv(subj, NamingPrivilege.CREATE);
       }
       catch (InsufficientPrivilegeException eIP) {
         // Not privileged to revoke this privilege
       }
       catch (RevokePrivilegeException eRP) {
         // Error revoking privilege
       }
       
      Parameters:
      subj - Revoke privilege from this subject.
      priv - Revoke this privilege.
      Throws:
      InsufficientPrivilegeException
      RevokePrivilegeException
      SchemaException
    • revokePriv

      public boolean revokePriv(Subject subj, Privilege priv, boolean exceptionIfAlreadyRevoked) throws InsufficientPrivilegeException, RevokePrivilegeException, SchemaException
      Revoke a privilege on this stem.
       try {
         ns.revokePriv(subj, NamingPrivilege.CREATE);
       }
       catch (InsufficientPrivilegeException eIP) {
         // Not privileged to revoke this privilege
       }
       catch (RevokePrivilegeException eRP) {
         // Error revoking privilege
       }
       
      Parameters:
      subj - Revoke privilege from this subject.
      priv - Revoke this privilege.
      exceptionIfAlreadyRevoked - if false, and subject is already a member, then dont throw a MemberAddException if the member is already in the group
      Returns:
      false if it was already revoked, true if it wasnt already deleted
      Throws:
      InsufficientPrivilegeException
      RevokePrivilegeException
      SchemaException
    • setDescription

      public void setDescription(String value) throws InsufficientPrivilegeException, StemModifyException
      Set stem description.
       // Set description
       try {
        ns.setDescription(value);
       }
       }
       catch (InsufficientPrivilegeException e0) {
         // Not privileged to set description
       catch (StemModifyException e1) {
         // Error setting description
       }
       
      Parameters:
      value - Set description to this value.
      Throws:
      InsufficientPrivilegeException
      StemModifyException
    • store

      public void store()
      will be implemented soon
    • validate

      public void validate()
    • setDisplayExtension

      public void setDisplayExtension(String value) throws InsufficientPrivilegeException, StemModifyException
      Set displayExtension.

      This will also update the displayName of all child stems and groups.

       try {
        ns.setDisplayExtension(value);
       }
       catch (InsufficientPrivilegeException eIP) {
         // Not privileged to set displayExtension
       catch (StemModifyException eNSM) {
         // Error setting displayExtension
       }
       
      Parameters:
      value - Set displayExtension to this value.
      Throws:
      InsufficientPrivilegeException
      StemModifyException
    • setExtension

      public void setExtension(String value) throws InsufficientPrivilegeException, StemModifyException
      Set extension.

      This will also update the name of all child stems and groups.

       try {
        ns.setExtension(value);
       }
       catch (InsufficientPrivilegeException eIP) {
         // Not privileged to set "extension"
       catch (StemModifyException eNSM) {
         // Error setting "extension"
       }
       
      Parameters:
      value - Set extension to this value.
      Throws:
      InsufficientPrivilegeException
      StemModifyException
    • setExtension

      public void setExtension(String value, boolean assignAlternateName) throws InsufficientPrivilegeException, StemModifyException
      Set extension.

      This will also update the name of all child stems and groups.

       try {
        ns.setExtension(value, true);
       }
       catch (InsufficientPrivilegeException eIP) {
         // Not privileged to set "extension"
       catch (StemModifyException eNSM) {
         // Error setting "extension"
       }
       
      Parameters:
      value - Set extension to this value.
      assignAlternateName - Whether to add the old group and stem names as alternate names for any renamed groups and stems.
      Throws:
      InsufficientPrivilegeException
      StemModifyException
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also:
    • internal_addRootStem

      public static Stem internal_addRootStem(GrouperSession s, boolean[] changed) throws GrouperException
      add root stem
      Parameters:
      s - session
      changed - if you want to know if it was added, pass in array of size one, else null
      Returns:
      stem
      Throws:
      GrouperException - is problem
      Since:
      1.2.0
    • internal_setModified

      public void internal_setModified()
      set modified
      Since:
      1.2.0
    • internal_addChildGroup

      public Group internal_addChildGroup(String extn, String dExtn, String uuid) throws GroupAddException, InsufficientPrivilegeException
      add child group with uuid
      Parameters:
      extn - extension
      dExtn - display extension
      uuid - uuid
      Returns:
      group
      Throws:
      GroupAddException - if problem
      InsufficientPrivilegeException - if problem
      Since:
      1.2.0
    • internal_addChildGroup

      public Group internal_addChildGroup(String extn, String dExtn, String uuid, TypeOfGroup typeOfGroup) throws GroupAddException, InsufficientPrivilegeException
      add child group with uuid
      Parameters:
      extn - extension
      dExtn - display extension
      uuid - uuid
      typeOfGroup -
      Returns:
      group
      Throws:
      GroupAddException - if problem
      InsufficientPrivilegeException - if problem
    • internal_addChildGroup

      public Group internal_addChildGroup(String extn, String dExtn, String uuid, String description, Set<GroupType> types, Map<String,String> attributes, boolean addDefaultGroupPrivileges, TypeOfGroup typeOfGroup, boolean checkSecurity) throws GroupAddException, InsufficientPrivilegeException
      Parameters:
      extn -
      dExtn -
      uuid -
      description -
      types -
      attributes -
      addDefaultGroupPrivileges -
      typeOfGroup - or null for default
      checkSecurity -
      Returns:
      group
      Throws:
      GroupAddException
      InsufficientPrivilegeException
    • internal_addChildAttributeDefName

      public AttributeDefName internal_addChildAttributeDefName(GrouperSession session, AttributeDef attributeDef, String extension, String displayExtension, String id, String description) throws InsufficientPrivilegeException
      Parameters:
      attributeDef -
      session -
      extension -
      displayExtension -
      id -
      description -
      Returns:
      group
      Throws:
      AttributeDefNameAddException
      InsufficientPrivilegeException
    • internal_addChildAttributeDef

      public AttributeDef internal_addChildAttributeDef(GrouperSession session, String extn, String id, AttributeDefType attributeDefType, String description) throws InsufficientPrivilegeException
      Parameters:
      session -
      extn -
      id -
      attributeDefType -
      description -
      Returns:
      group
      Throws:
      AttributeDefAddException
      InsufficientPrivilegeException
    • internal_addChildStem

      public Stem internal_addChildStem(String extn, String dExtn, String uuid) throws StemAddException, InsufficientPrivilegeException
      add child stem with uuid
      Parameters:
      extn - extension
      dExtn - display extension
      uuid - uuid
      Returns:
      the new stem
      Throws:
      StemAddException - if problem
      InsufficientPrivilegeException - if problem
      Since:
      1.2.0
    • internal_addChildStem

      protected Stem internal_addChildStem(GrouperSession session, String extn, String dExtn, String uuid, boolean addDefaultStemPrivileges, boolean failIfExists) throws StemAddException, InsufficientPrivilegeException
      Parameters:
      session -
      extn -
      dExtn -
      uuid -
      addDefaultStemPrivileges -
      failIfExists -
      Returns:
      stem
      Throws:
      StemAddException
      InsufficientPrivilegeException
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
      See Also:
    • getCreateTimeLong

      public long getCreateTimeLong()
      Returns:
      create time
    • getCreatorUuid

      public String getCreatorUuid()
      Returns:
      create time
    • getDescriptionDb

      public String getDescriptionDb()
      Returns:
      description
      Since:
      1.2.0
    • getDisplayExtensionDb

      public String getDisplayExtensionDb()
      Returns:
      displayExtension
      Since:
      1.2.0
    • getDisplayNameDb

      public String getDisplayNameDb()
      Returns:
      displayName
      Since:
      1.2.0
    • getExtensionDb

      public String getExtensionDb()
      Returns:
      extension
      Since:
      1.2.0
    • getModifierUuid

      public String getModifierUuid()
      Returns:
      modifier uuid
      Since:
      1.2.0
    • getModifyTimeLong

      public long getModifyTimeLong()
      Returns:
      modify time long
      Since:
      1.2.0
    • getNameDb

      public String getNameDb()
      Returns:
      name
      Since:
      1.2.0
    • getParentUuid

      public String getParentUuid()
      Returns:
      parent uuid
      Since:
      1.2.0
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      Returns:
      hash code
      Since:
      1.2.0
    • setCreateTimeLong

      public void setCreateTimeLong(long createTime)
      Parameters:
      createTime -
      Since:
      1.2.0
    • setCreatorUuid

      public void setCreatorUuid(String creatorUUID)
      Parameters:
      creatorUUID -
      Since:
      1.2.0
    • setDescriptionDb

      public void setDescriptionDb(String description)
      Parameters:
      description -
      Since:
      1.2.0
    • setDisplayExtensionDb

      public void setDisplayExtensionDb(String displayExtension)
      Parameters:
      displayExtension -
      Since:
      1.2.0
    • setDisplayName

      public void setDisplayName(String displayName)
      Parameters:
      displayName -
      Since:
      1.2.0
    • setDisplayNameDb

      public void setDisplayNameDb(String displayName)
      Parameters:
      displayName -
      Since:
      1.2.0
    • setExtensionDb

      public void setExtensionDb(String extension)
      Parameters:
      extension -
      Since:
      1.2.0
    • setModifierUuid

      public void setModifierUuid(String modifierUUID)
      Parameters:
      modifierUUID -
      Since:
      1.2.0
    • setModifyTimeLong

      public void setModifyTimeLong(long modifyTime)
      Parameters:
      modifyTime -
      Since:
      1.2.0
    • setName

      public void setName(String name)
      Parameters:
      name -
      Since:
      1.2.0
    • setNameDb

      public void setNameDb(String name)
      Parameters:
      name -
      Since:
      1.2.0
    • setParentUuid

      public void setParentUuid(String parentUUID)
      Parameters:
      parentUUID -
      Since:
      1.2.0
    • setUuid

      public void setUuid(String uuid)
      Parameters:
      uuid -
      Since:
      1.2.0
    • toStringDb

      public String toStringDb()
      Returns:
      string
      Since:
      1.2.0
    • onPostDelete

      public void onPostDelete(HibernateSession hibernateSession)
      Description copied from interface: HibGrouperLifecycle
      after a delete occurs
      Specified by:
      onPostDelete in interface HibGrouperLifecycle
      Overrides:
      onPostDelete in class GrouperAPI
      See Also:
    • onPostSave

      public void onPostSave(HibernateSession hibernateSession)
      Description copied from interface: HibGrouperLifecycle
      after a save (insert) occurs
      Specified by:
      onPostSave in interface HibGrouperLifecycle
      Overrides:
      onPostSave in class GrouperAPI
      See Also:
    • onPostUpdate

      public void onPostUpdate(HibernateSession hibernateSession)
      Description copied from interface: HibGrouperLifecycle
      after an update occurs
      Specified by:
      onPostUpdate in interface HibGrouperLifecycle
      Overrides:
      onPostUpdate in class GrouperAPI
      See Also:
    • onPreDelete

      public void onPreDelete(HibernateSession hibernateSession)
      Description copied from interface: HibGrouperLifecycle
      before a delete (insert) occurs
      Specified by:
      onPreDelete in interface HibGrouperLifecycle
      Overrides:
      onPreDelete in class GrouperAPI
      See Also:
    • onPreSave

      public void onPreSave(HibernateSession hibernateSession)
      Description copied from interface: HibGrouperLifecycle
      before a save (insert) occurs
      Specified by:
      onPreSave in interface HibGrouperLifecycle
      Overrides:
      onPreSave in class GrouperAPI
      See Also:
    • onPreUpdate

      public void onPreUpdate(HibernateSession hibernateSession)
      Description copied from interface: HibGrouperLifecycle
      before an update occurs
      Specified by:
      onPreUpdate in interface HibGrouperLifecycle
      Overrides:
      onPreUpdate in class GrouperAPI
      See Also:
    • dbVersion

      public Stem dbVersion()
      save the state when retrieving from DB
      Overrides:
      dbVersion in class GrouperAPI
      Returns:
      the dbVersion
    • dbVersionDifferentFields

      public Set<String> dbVersionDifferentFields()
      note, these are massaged so that name, extension, etc look like normal fields. access with fieldValue()
      Overrides:
      dbVersionDifferentFields in class GrouperAPI
      Returns:
      a set of attributes changed, or empty set if none
      See Also:
    • dbVersionReset

      public void dbVersionReset()
      take a snapshot of the data since this is what is in the db
      Overrides:
      dbVersionReset in class GrouperAPI
    • clone

      public Stem clone()
      deep clone the fields in this object
      Specified by:
      clone in interface GrouperCloneable
      Specified by:
      clone in class GrouperAPI
      Returns:
      the clone of the object
      See Also:
    • _createStemAndParentStemsIfNotExist

      public static Stem _createStemAndParentStemsIfNotExist(GrouperSession grouperSession, String stemName, String stemDisplayNameForInserts) throws InsufficientPrivilegeException, StemNotFoundException, StemAddException
      create stems and parents if not exist.
      Parameters:
      stemName -
      grouperSession -
      stemDisplayNameForInserts - optional, will use this for display name, and not just default to the name. Note this is only used if creating something, it will not update existing stems
      Returns:
      the resulting stem
      Throws:
      InsufficientPrivilegeException
      StemNotFoundException
      StemAddException
    • saveStem

      public static Stem saveStem(GrouperSession grouperSession, String stemNameToEdit, String uuid, String name, String displayExtension, String description, SaveMode saveMode, boolean createParentStemsIfNotExist) throws StemNotFoundException, InsufficientPrivilegeException, StemAddException, StemModifyException
       create or update a stem.  Note this will not move a stem at this time (might in future)
       
       This is a static method since setters to Stem objects persist to the DB
       
       Steps:
       
       1. Find the stem by stemNameToEdit (if not there then its an insert)
       2. Internally set all the fields of the stem (no need to reset if already the same)
       3. Store the stem (insert or update) if needed
       4. Return the stem object
       
       This occurs in a transaction, so if a part of it fails, it rolls back, and potentially
       rolls back outer transactions too
       
      Parameters:
      grouperSession - to act as
      stemNameToEdit - is the name of the stem to edit (or null if insert)
      description - new description for stem
      displayExtension - display friendly name for this stem only (parent stems are not specified)
      name - this is required, and is the full name of the stem including the names of parent stems. e.g. stem1:stem2:stem3 the parent stem must exist unless createParentStemsIfNotExist. Can rename a stem extension, but not the parent stem name (move)
      uuid - of the stem. uuid for an inserted stem
      saveMode - to constrain if insert only or update only, if null defaults to INSERT_OR_UPDATE
      createParentStemsIfNotExist - true if the stems should be created if they dont exist, false for StemNotFoundException if not exist. Note, the display extension on created stems will equal the extension. This could be dangerous and should probably only be used for testing
      Returns:
      the stem that was updated or created
      Throws:
      StemNotFoundException
      InsufficientPrivilegeException
      StemAddException
      StemModifyException
    • move

      public void move(Stem stem) throws StemModifyException, InsufficientPrivilegeException
      Move this stem to another Stem. If you would like to specify options for the move, use StemMove instead. This will use the default options.
      Parameters:
      stem -
      Throws:
      StemModifyException
      InsufficientPrivilegeException
    • internal_move

      protected void internal_move(Stem stem, boolean assignAlternateName) throws StemModifyException, InsufficientPrivilegeException
      Parameters:
      stem -
      assignAlternateName -
      Throws:
      StemModifyException
      InsufficientPrivilegeException
    • internal_copy

      protected Stem internal_copy(Stem stem, boolean privilegesOfStem, boolean privilegesOfGroup, boolean groupAsPrivilege, boolean listMembersOfGroup, boolean listGroupAsMember, boolean attributes, String stemExtension, String stemDisplayExtension) throws StemAddException, InsufficientPrivilegeException
      Copy this stem to another Stem.
      Parameters:
      stem -
      privilegesOfStem - Whether to copy privileges of stems
      privilegesOfGroup - Whether to copy privileges of groups
      groupAsPrivilege - Whether to copy privileges where groups are a member
      listMembersOfGroup - Whether to copy the list memberships of groups
      listGroupAsMember - Whether to copy list memberships where groups are a member
      attributes - Whether to copy attributes
      stemExtension -
      stemDisplayExtension -
      Returns:
      the new stem
      Throws:
      StemAddException
      InsufficientPrivilegeException
    • copy

      Copy this stem to another Stem. If you want to specify options for the copy, use StemCopy. This will use the default options.
      Parameters:
      stem -
      Returns:
      the new stem
      Throws:
      StemAddException
      InsufficientPrivilegeException
    • getLastMembershipChangeDb

      public Long getLastMembershipChangeDb()
      when the last member has changed, used by hibernate
      Returns:
      when
    • setLastMembershipChangeDb

      public void setLastMembershipChangeDb(Long theMembershipLastChange)
      when the last member has changed, used by hibernate
      Parameters:
      theMembershipLastChange -
    • getLastMembershipChange

      public Timestamp getLastMembershipChange()
      when the last member has changed
      Returns:
      the membership last change timestamp
    • addChildRole

      public Role addChildRole(String extension, String displayExtension) throws GroupAddException, InsufficientPrivilegeException
      Add a new role to the registry.
       // Add a role with the extension "edu" beneath this stem.
       try {
         Group edu = ns.addChildRole("edu", "edu domain");
       }
       catch (GroupAddException eGA) {
         // Group not added
       }
       catch (InsufficientPrivilegeException eIP) {
         // Not privileged to add group
       }
       
      Parameters:
      extension - Role extension
      displayExtension - Role displayExtension
      Returns:
      The added Role
      Throws:
      GroupAddException
      InsufficientPrivilegeException
    • internal_addChildRole

      public Role internal_addChildRole(String extension, String displayExtension, String uuid) throws GroupAddException, InsufficientPrivilegeException
      Add a new role to the registry.
       // Add a role with the extension "edu" beneath this stem.
       try {
         Group edu = ns.addChildRole("edu", "edu domain");
       }
       catch (GroupAddException eGA) {
         // Group not added
       }
       catch (InsufficientPrivilegeException eIP) {
         // Not privileged to add group
       }
       
      Parameters:
      extension - Role extension
      displayExtension - Role displayExtension
      uuid - is uuid or null if generated
      Returns:
      The added Role
      Throws:
      GroupAddException
      InsufficientPrivilegeException
    • internal_addChildEntity

      public Role internal_addChildEntity(String extension, String displayExtension, String uuid) throws GroupAddException, InsufficientPrivilegeException
      Add a new role to the registry.
       // Add a role with the extension "edu" beneath this stem.
       try {
         Group edu = ns.addChildEntity("edu", "edu domain");
       }
       catch (GroupAddException eGA) {
         // Group not added
       }
       catch (InsufficientPrivilegeException eIP) {
         // Not privileged to add group
       }
       
      Parameters:
      extension - Entity extension
      displayExtension - Entity displayExtension
      uuid - is uuid or null if generated
      Returns:
      The added Role
      Throws:
      GroupAddException
      InsufficientPrivilegeException
    • xmlDifferentBusinessProperties

      public boolean xmlDifferentBusinessProperties(Stem other)
      Description copied from interface: XmlImportableBase
      see if the non update cols are different (e.g. name)
      Specified by:
      xmlDifferentBusinessProperties in interface XmlImportableBase<Stem>
      Parameters:
      other - the one to compare with
      Returns:
      true if so
      See Also:
    • xmlDifferentUpdateProperties

      public boolean xmlDifferentUpdateProperties(Stem other)
      Description copied from interface: XmlImportableBase
      see if the update cols are different (e.g. last updated)
      Specified by:
      xmlDifferentUpdateProperties in interface XmlImportableBase<Stem>
      Parameters:
      other - the one to compare with
      Returns:
      true if so
      See Also:
    • xmlCopyBusinessPropertiesToExisting

      public void xmlCopyBusinessPropertiesToExisting(Stem existingRecord)
      Description copied from interface: XmlImportableBase
      copy business (non update) properties to an existing record
      Specified by:
      xmlCopyBusinessPropertiesToExisting in interface XmlImportableBase<Stem>
      See Also:
    • xmlRetrieveByIdOrKey

      public Stem xmlRetrieveByIdOrKey()
      Description copied from interface: XmlImportable
      retrieve from db by id or key. throws exception if duplicate
      Specified by:
      xmlRetrieveByIdOrKey in interface XmlImportable<Stem>
      Returns:
      the object or null if not found
      See Also:
    • assignIdIndex

      public boolean assignIdIndex(long theIdIndex)
      assign different id index
      Parameters:
      theIdIndex -
      Returns:
      if it was changed
    • xmlSaveBusinessProperties

      public Stem xmlSaveBusinessProperties(Stem existingRecord)
      Description copied from interface: XmlImportableBase
      save the business properties (not update properties)
      Specified by:
      xmlSaveBusinessProperties in interface XmlImportableBase<Stem>
      Parameters:
      existingRecord - null if insert, the object if exists in DB generally just copy the hibernate version number, and last updated to the object and store it
      Returns:
      the new object or existing
      See Also:
    • xmlSaveUpdateProperties

      public void xmlSaveUpdateProperties()
      Description copied from interface: XmlImportableBase
      save the udpate properties (e.g. last updated). Note, this is done with a sql update statement, not with hibernate
      Specified by:
      xmlSaveUpdateProperties in interface XmlImportableBase<Stem>
      See Also:
    • xmlToExportStem

      public XmlExportStem xmlToExportStem(GrouperVersion grouperVersion)
      convert to xml bean for export
      Parameters:
      grouperVersion -
      Returns:
      xml bean
    • xmlGetId

      public String xmlGetId()
      Description copied from interface: XmlImportableBase
      set id key in db
      Specified by:
      xmlGetId in interface XmlImportableBase<Stem>
      Returns:
      id
      See Also:
    • xmlSetId

      public void xmlSetId(String theId)
      Description copied from interface: XmlImportableBase
      set id key in db
      Specified by:
      xmlSetId in interface XmlImportableBase<Stem>
      See Also:
    • xmlToString

      public String xmlToString()
      Description copied from interface: XmlImportableBase
      convert to string for log
      Specified by:
      xmlToString in interface XmlImportableBase<Stem>
      Returns:
      the string value for log
      See Also:
    • obliterateFromPointInTime

      public static void obliterateFromPointInTime(String stemName, boolean printOutput)
      obliterate this stem name (which might not exist) from point in time
      Parameters:
      stemName -
      printOutput -
    • obliterate

      public static void obliterate(String stemName, boolean printOutput, boolean testOnly, boolean deletePointInTime)
      obliterate this stem name (which might not exist) from point in time
      Parameters:
      stemName -
      printOutput -
      testOnly -
      deletePointInTime -
    • obliterate

      public void obliterate(boolean printOutput, boolean testOnly, boolean deleteFromPointInTime)
      Delete this stem from the Groups Registry including all sub objects.
      Parameters:
      printOutput -
      testOnly -
      deleteFromPointInTime - needs to wait for change log entries to be processed, then delete those too
    • obliterate

      public void obliterate(boolean printOutput, boolean testOnly) throws InsufficientPrivilegeException, StemDeleteException
      Delete this stem from the Groups Registry including all sub objects.
      Parameters:
      printOutput -
      testOnly -
      Throws:
      InsufficientPrivilegeException
      StemDeleteException
    • __getId

      public String __getId()
      Description copied from interface: GrouperSetElement
      if of this object
      Specified by:
      __getId in interface GrouperSetElement
      Returns:
      id
      See Also:
    • __getName

      public String __getName()
      Description copied from interface: GrouperSetElement
      name of this object (for logging)
      Specified by:
      __getName in interface GrouperSetElement
      Returns:
      name
      See Also:
    • getIdIndex

      public Long getIdIndex()
      id of the group as a unique integer
      Returns:
      id
    • setIdIndex

      public void setIdIndex(Long idIndex1)
      id of the group as a unique integer
      Parameters:
      idIndex1 -
    • matchesLowerSearchStrings

      public boolean matchesLowerSearchStrings(Set<String> filterStrings)
      Description copied from interface: GrouperObject
      see if this object matches the filter strings
      Specified by:
      matchesLowerSearchStrings in interface GrouperObject
      Returns:
      true if matches
      See Also:
    • canHavePrivilege

      public boolean canHavePrivilege(Subject subject, String privilegeOrListName, boolean secure)
      see if the subject has a privilege or another privilege that implies this privilege.
      Parameters:
      subject -
      privilegeOrListName -
      secure - if the user must be an admin to check
      Returns:
      true if has privilege
    • grantPrivs

      @Deprecated public boolean grantPrivs(Subject subject, boolean stemAdminChecked, boolean createChecked, boolean attrReadChecked, boolean attrUpdateChecked, boolean revokeIfUnchecked)
      Deprecated.
      use the overloaded method
      grant privs to stem
      Parameters:
      subject - to add
      createChecked -
      stemAdminChecked -
      attrReadChecked -
      attrUpdateChecked -
      revokeIfUnchecked -
      Returns:
      if something was changed
    • grantPrivs

      public boolean grantPrivs(Subject subject, boolean stemAdminChecked, boolean createChecked, boolean attrReadChecked, boolean attrUpdateChecked, boolean stemViewChecked, boolean revokeIfUnchecked)
      grant privs to stem
      Parameters:
      subject - to add
      createChecked -
      stemAdminChecked -
      attrReadChecked -
      attrUpdateChecked -
      revokeIfUnchecked -
      Returns:
      if something was changed
    • retrieveObliterateResults

      public static Stem.StemObliterateResults retrieveObliterateResults()
      Returns:
      obliterate results
    • main

      public static void main(String[] args)
      Parameters:
      args -
    • isEmpty

      public boolean isEmpty()
      Returns:
      if this stem is empty i.e. can be deleted
    • isCanObliterate

      public boolean isCanObliterate(Stem.Scope scope)
      see if the current session can obliterate. also setup counts of object types
      Returns:
      true if can obliterate
    • deleteAttributeDefs

      public Set<AttributeDef> deleteAttributeDefs(boolean printOutput, boolean testOnly, Stem.Scope scope)
      Parameters:
      printOutput -
      testOnly -
      scope -
      Returns:
      attribute defs to be deleted or would be deleted
    • deleteAttributeDefNames

      public Set<AttributeDefName> deleteAttributeDefNames(boolean printOutput, boolean testOnly, Stem.Scope scope)
      Parameters:
      printOutput -
      testOnly -
      scope -
      Returns:
      attribute def names deleted or to be deleted
    • deleteGroups

      public Set<Group> deleteGroups(boolean printOutput, boolean testOnly, Stem.Scope scope)
      Parameters:
      printOutput -
      testOnly -
      scope -
      Returns:
      groups to be deleted or would be deleted
    • deleteGroupMemberships

      public Set<Group> deleteGroupMemberships(boolean printOutput, boolean testOnly, Stem.Scope scope)
      Parameters:
      printOutput -
      testOnly -
      scope -
      Returns:
      groups have memberships deleted or would be deleted
    • deleteEmptyStems

      public Set<Stem> deleteEmptyStems(boolean printOutput, boolean testOnly, Stem.Scope scope)
      Parameters:
      printOutput -
      testOnly -
      scope -
      Returns:
      stems to be deleted or would be deleted