Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Group insert / update / delete

Groups

Command

Description

addGroup(parent stem name, extension, displayExtension)

Add group to registry

delGroup(name)

Delete group from registry

getGroupAttr(group name, attr)

Get value of group attribute

getGroups(name)

Find all groups with a matching naming attribute value, returns a Set of groups

When using Java 1.8+ and Grouper 2.3 (later patches)+

this can be handy to print the group.getName() values for all groups that are found.

getGroups("Wheel").each{it -> println "${it.getName()}"}

setGroupAttr(group name, attr, value)

Set value of group attribute

GroupFinder.findByName(grouperSession, name)

Find one group by name

GroupFinder.findByUuid(grouperSession, name)

Find one group by uuid

You can set the description on a group by:

Code Block
rsess = GrouperSession.startRootSession();
addGroup("stem1", "path_ID", "groupName");
group = GroupFinder.findByName(rsess, "stem1:path_ID");
group.setDescription("this is the description for groupName");
group.store();

You can use GroupSave as an alternate way:

...

Group Types

New group types on folder

...