Class DefaultGroupReference

  • All Implemented Interfaces:
    io.annot8.api.references.GroupReference

    public class DefaultGroupReference
    extends AbstractGroupReference
    A reference which will always retrieve the latest group from the appropriate group store.

    Does not hold a reference to the group.

    • Constructor Detail

      • DefaultGroupReference

        public DefaultGroupReference​(io.annot8.api.data.Item item,
                                     String groupId)
        New reference either from another reference or manually created.
        Parameters:
        item - the item
        groupId - the group id
    • Method Detail

      • to

        public static DefaultGroupReference to​(io.annot8.api.data.Item item,
                                               io.annot8.api.annotations.Group group)
        Create a reference from a group instance.
        Parameters:
        item - the item owning the group
        group - the group id
        Returns:
        reference to this group
      • getGroupId

        public String getGroupId()
      • toGroup

        public Optional<io.annot8.api.annotations.Group> toGroup()