Class InternalGroupUpdate
- java.lang.Object
-
- com.google.gerrit.server.group.db.InternalGroupUpdate
-
public abstract class InternalGroupUpdate extends Object
Definition of an update to a group.An
InternalGroupUpdate
only specifies the modifications which should be applied to a group. Each of the modifications and hence each call onInternalGroupUpdate.Builder
is optional.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
InternalGroupUpdate.Builder
A builder for anInternalGroupUpdate
.static interface
InternalGroupUpdate.MemberModification
Representation of a member modification as defined byInternalGroupUpdate.MemberModification.apply(ImmutableSet)
.static interface
InternalGroupUpdate.SubgroupModification
-
Constructor Summary
Constructors Constructor Description InternalGroupUpdate()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static InternalGroupUpdate.Builder
builder()
abstract Optional<String>
getDescription()
Defines the new description of the group.abstract InternalGroupUpdate.MemberModification
getMemberModification()
Defines how the members of the group should be modified.abstract Optional<AccountGroup.NameKey>
getName()
Defines the new name of the group.abstract Optional<AccountGroup.UUID>
getOwnerGroupUUID()
Defines the new owner of the group.abstract InternalGroupUpdate.SubgroupModification
getSubgroupModification()
Defines how the subgroups of the group should be modified.abstract Optional<Timestamp>
getUpdatedOn()
Defines theTimestamp
to be used for the NoteDb commits of the update.abstract Optional<Boolean>
getVisibleToAll()
Defines the new state of the 'visibleToAll' flag of the group.abstract InternalGroupUpdate.Builder
toBuilder()
-
-
-
Method Detail
-
getName
public abstract Optional<AccountGroup.NameKey> getName()
Defines the new name of the group. If not specified, the name remains unchanged.
-
getDescription
public abstract Optional<String> getDescription()
Defines the new description of the group. If not specified, the description remains unchanged.Note: Passing the empty string unsets the description.
-
getOwnerGroupUUID
public abstract Optional<AccountGroup.UUID> getOwnerGroupUUID()
Defines the new owner of the group. If not specified, the owner remains unchanged.
-
getVisibleToAll
public abstract Optional<Boolean> getVisibleToAll()
Defines the new state of the 'visibleToAll' flag of the group. If not specified, the flag remains unchanged.
-
getMemberModification
public abstract InternalGroupUpdate.MemberModification getMemberModification()
Defines how the members of the group should be modified. By default (that is if nothing is specified), the members remain unchanged.- Returns:
- a
InternalGroupUpdate.MemberModification
which gets the current members of the group as input and outputs the desired resulting members
-
getSubgroupModification
public abstract InternalGroupUpdate.SubgroupModification getSubgroupModification()
Defines how the subgroups of the group should be modified. By default (that is if nothing is specified), the subgroups remain unchanged.- Returns:
- a
InternalGroupUpdate.SubgroupModification
which gets the current subgroups of the group as input and outputs the desired resulting subgroups
-
getUpdatedOn
public abstract Optional<Timestamp> getUpdatedOn()
Defines theTimestamp
to be used for the NoteDb commits of the update. If not specified, the currentTimestamp
when creating the commit will be used.If this
InternalGroupUpdate
is passed next to anInternalGroupCreation
during a group creation, thisTimestamp
is used for the NoteDb commits of the new group. Hence, theInternalGroup#getCreatedOn()
field will match thisTimestamp
.Note:
Timestamp
s of NoteDb commits for groups are used for events in the audit log. For this reason, specifying this field will have an effect on the resulting audit log.
-
toBuilder
public abstract InternalGroupUpdate.Builder toBuilder()
-
builder
public static InternalGroupUpdate.Builder builder()
-
-