Verified Owner
Top Description Fields Constructors Methods
org.jabref.http.server.resources

public Class GroupsResource

extends Object
Class Inheritance
Annotations
@Path:libraries/{id}/groups
Imports
java.io.IOException, java.util.ArrayList, .List, org.jabref.http.SrvStateManager, org.jabref.http.dto.GroupDTO, org.jabref.http.server.services.ServerUtils, org.jabref.logic.preferences.CliPreferences, org.jabref.model.database.BibDatabaseContext, org.jabref.model.groups.GroupTreeNode, jakarta.inject.Inject, jakarta.ws.rs.GET, .Path, .PathParam, .Produces, jakarta.ws.rs.core.MediaType

Lists the groups of a library as a flat, pre-order list.

impl->req~jabsrv.groups.list~1 The group tree is flattened depth-first so parents precede their children. Each group carries its full breadcrumb path, which lets a client render the tree as a list of breadcrumbs and pick one for, e.g., import targeting.

Field Summary

Modifier and TypeField and Description
pack-priv CliPreferences
pack-priv SrvStateManager

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static void
flatten(GroupTreeNode node, List<GroupDTO> out)

Depth-first pre-order traversal.

public List<GroupDTO>
get(String id)

private static GroupDTO
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

preferencesback to summary
pack-priv CliPreferences preferences
Annotations
@Inject
srvStateManagerback to summary
pack-priv SrvStateManager srvStateManager
Annotations
@Inject

Constructor Detail

GroupsResourceback to summary
public GroupsResource()

Method Detail

flattenback to summary
private static void flatten(GroupTreeNode node, List<GroupDTO> out)

Depth-first pre-order traversal. The root AllEntriesGroup itself is skipped; only its descendants are emitted.

getback to summary
public List<GroupDTO> get(String id) throws IOException
Annotations
@GET
@Produces:application/json
toDtoback to summary
private static GroupDTO toDto(GroupTreeNode node)