99import java .util .Optional ;
1010import java .util .stream .Stream ;
1111
12+ import jakarta .ws .rs .core .Form ;
13+ import jakarta .ws .rs .core .GenericType ;
14+ import jakarta .ws .rs .core .MediaType ;
15+ import jakarta .ws .rs .core .MultivaluedMap ;
16+ import jakarta .ws .rs .core .Response ;
17+
1218import org .gitlab4j .api .models .AccessLevel ;
1319import org .gitlab4j .api .models .AccessRequest ;
1420import org .gitlab4j .api .models .AuditEvent ;
3440import org .gitlab4j .api .models .Visibility ;
3541import org .gitlab4j .models .utils .ISO8601 ;
3642
37- import jakarta .ws .rs .core .Form ;
38- import jakarta .ws .rs .core .GenericType ;
39- import jakarta .ws .rs .core .MediaType ;
40- import jakarta .ws .rs .core .MultivaluedMap ;
41- import jakarta .ws .rs .core .Response ;
42-
4343/**
4444 * This class implements the client side API for the GitLab groups calls.
4545 * @see <a href="https://docs.gitlab.com/ce/api/groups.html">Groups API at GitLab</a>
@@ -609,35 +609,35 @@ public Stream<Project> getProjectsStream(Object groupIdOrPath) throws GitLabApiE
609609 public List <Group > getSharedGroups (Object groupIdOrPath , SharedGroupsFilter filter ) throws GitLabApiException {
610610 return (getSharedGroups (groupIdOrPath , filter , getDefaultPerPage ()).all ());
611611 }
612-
612+
613613 /**
614614 * Get a Pager of projects belonging to the specified group ID and filter.
615- *
616- * <pre><code>GitLab Endpoint: GET /groups/:id/projects</code></pre>
617- *
618- * @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path
619- * @param filter the GroupProjectsFilter instance holding the filter values for the query
620- * @param itemsPerPage the number of Project instances that will be fetched per page
621- * @return a Pager containing Project instances that belong to the group and match the provided filter
622- * @throws GitLabApiException if any exception occurs
623- */
624- public Pager <Group > getSharedGroups (Object groupIdOrPath , SharedGroupsFilter filter , int itemsPerPage )
625- throws GitLabApiException {
626- GitLabApiForm formData = new GitLabApiForm (filter .getQueryParams ());
627- return (new Pager <Group >(
628- this ,
629- Group .class ,
630- itemsPerPage ,
631- formData .asMap (),
632- "groups" ,
633- getGroupIdOrPath (groupIdOrPath ),
634- "groups" ,
635- "shared" ));
636- }
637-
638- /**
639- * Get a list of groups where the given group has been invited.
640- * When accessed without authentication, only public shared groups are returned.
615+ *
616+ * <pre><code>GitLab Endpoint: GET /groups/:id/projects</code></pre>
617+ *
618+ * @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path
619+ * @param filter the GroupProjectsFilter instance holding the filter values for the query
620+ * @param itemsPerPage the number of Project instances that will be fetched per page
621+ * @return a Pager containing Project instances that belong to the group and match the provided filter
622+ * @throws GitLabApiException if any exception occurs
623+ */
624+ public Pager <Group > getSharedGroups (Object groupIdOrPath , SharedGroupsFilter filter , int itemsPerPage )
625+ throws GitLabApiException {
626+ GitLabApiForm formData = new GitLabApiForm (filter .getQueryParams ());
627+ return (new Pager <Group >(
628+ this ,
629+ Group .class ,
630+ itemsPerPage ,
631+ formData .asMap (),
632+ "groups" ,
633+ getGroupIdOrPath (groupIdOrPath ),
634+ "groups" ,
635+ "shared" ));
636+ }
637+
638+ /**
639+ * Get a list of groups where the given group has been invited.
640+ * When accessed without authentication, only public shared groups are returned.
641641 *
642642 * <pre><code>GitLab Endpoint: GET /groups/:id/groups/shared</code></pre>
643643 *
@@ -652,8 +652,8 @@ public Stream<Group> getSharedGroupsStream(Object groupIdOrPath, SharedGroupsFil
652652 }
653653
654654 /**
655- * Get a list of groups where the given group has been invited.
656- * When accessed without authentication, only public shared groups are returned.
655+ * Get a list of groups where the given group has been invited.
656+ * When accessed without authentication, only public shared groups are returned.
657657 *
658658 * <pre><code>GitLab Endpoint: GET /groups/:id/groups/shared</code></pre>
659659 *
@@ -666,8 +666,8 @@ public List<Group> getSharedGroups(Object groupIdOrPath) throws GitLabApiExcepti
666666 }
667667
668668 /**
669- * Get a list of groups in the specified page range where the given group has been invited.
670- * When accessed without authentication, only public shared groups are returned.
669+ * Get a list of groups in the specified page range where the given group has been invited.
670+ * When accessed without authentication, only public shared groups are returned.
671671 *
672672 * <pre><code>GitLab Endpoint: GET /groups/:id/groups/shared</code></pre>
673673 *
@@ -684,13 +684,13 @@ public List<Group> getSharedGroups(Object groupIdOrPath, int page, int perPage)
684684 "groups" ,
685685 getGroupIdOrPath (groupIdOrPath ),
686686 "groups" ,
687- "shared" );
687+ "shared" );
688688 return (response .readEntity (new GenericType <List <Group >>() {}));
689689 }
690690
691691 /**
692- * Get a list of groups where the given group has been invited.
693- * When accessed without authentication, only public shared groups are returned.
692+ * Get a list of groups where the given group has been invited.
693+ * When accessed without authentication, only public shared groups are returned.
694694 *
695695 * <pre><code>GitLab Endpoint: GET /groups/:id/groups/shared</code></pre>
696696 *
@@ -705,8 +705,8 @@ public Pager<Group> getSharedGroups(Object groupIdOrPath, int itemsPerPage) thro
705705 }
706706
707707 /**
708- * Get a Stream of groups where the given group has been invited.
709- * When accessed without authentication, only public shared groups are returned.
708+ * Get a Stream of groups where the given group has been invited.
709+ * When accessed without authentication, only public shared groups are returned.
710710 *
711711 * <pre><code>GitLab Endpoint: GET /groups/:id/groups/shared</code></pre>
712712 *
0 commit comments