@@ -40,6 +40,66 @@ export class CommunityDataService extends ComColDataService<Community> {
4040 super ( 'communities' , requestService , rdbService , objectCache , halService , comparator , notificationsService , bitstreamDataService ) ;
4141 }
4242
43+ /**
44+ * Get all communities the user is admin of
45+ *
46+ * @param query limit the returned collection to those with metadata values
47+ * matching the query terms.
48+ * @param options The [[FindListOptions]] object
49+ * @param useCachedVersionIfAvailable If this is true, the request will only be sent if there's
50+ * no valid cached version. Defaults to true
51+ * @param reRequestOnStale Whether or not the request should automatically be re-
52+ * requested after the response becomes stale
53+ * @param linksToFollow List of {@link FollowLinkConfig} that indicate which
54+ * {@link HALLink}s should be automatically resolved
55+ * @return Observable<RemoteData<PaginatedList<Community>>>
56+ * community list
57+ */
58+ getAdminAuthorizedCommunity ( query : string , options : FindListOptions = { } , useCachedVersionIfAvailable = true , reRequestOnStale = true , ...linksToFollow : FollowLinkConfig < Community > [ ] ) : Observable < RemoteData < PaginatedList < Community > > > {
59+ const searchHref = 'findAdminAuthorized' ;
60+ return this . getAuthorizedCommunity ( query , options , useCachedVersionIfAvailable , reRequestOnStale , searchHref , ...linksToFollow ) ;
61+ }
62+
63+ /**
64+ * Get all communities the user is authorized to add a new subcommunity or collection to
65+ *
66+ * @param query limit the returned collection to those with metadata values
67+ * matching the query terms.
68+ * @param options The [[FindListOptions]] object
69+ * @param useCachedVersionIfAvailable If this is true, the request will only be sent if there's
70+ * no valid cached version. Defaults to true
71+ * @param reRequestOnStale Whether or not the request should automatically be re-
72+ * requested after the response becomes stale
73+ * @param linksToFollow List of {@link FollowLinkConfig} that indicate which
74+ * {@link HALLink}s should be automatically resolved
75+ * @return Observable<RemoteData<PaginatedList<Community>>>
76+ * community list
77+ */
78+ getAddAuthorizedCommunity ( query : string , options : FindListOptions = { } , useCachedVersionIfAvailable = true , reRequestOnStale = true , ...linksToFollow : FollowLinkConfig < Community > [ ] ) : Observable < RemoteData < PaginatedList < Community > > > {
79+ const searchHref = 'findAddAuthorized' ;
80+ return this . getAuthorizedCommunity ( query , options , useCachedVersionIfAvailable , reRequestOnStale , searchHref , ...linksToFollow ) ;
81+ }
82+
83+ /**
84+ * Get all communities the user is authorized to edit
85+ *
86+ * @param query limit the returned collection to those with metadata values
87+ * matching the query terms.
88+ * @param options The [[FindListOptions]] object
89+ * @param useCachedVersionIfAvailable If this is true, the request will only be sent if there's
90+ * no valid cached version. Defaults to true
91+ * @param reRequestOnStale Whether or not the request should automatically be re-
92+ * requested after the response becomes stale
93+ * @param linksToFollow List of {@link FollowLinkConfig} that indicate which
94+ * {@link HALLink}s should be automatically resolved
95+ * @return Observable<RemoteData<PaginatedList<Community>>>
96+ * community list
97+ */
98+ getEditAuthorizedCommunity ( query : string , options : FindListOptions = { } , useCachedVersionIfAvailable = true , reRequestOnStale = true , ...linksToFollow : FollowLinkConfig < Community > [ ] ) : Observable < RemoteData < PaginatedList < Community > > > {
99+ const searchHref = 'findEditAuthorized' ;
100+ return this . getAuthorizedCommunity ( query , options , useCachedVersionIfAvailable , reRequestOnStale , searchHref , ...linksToFollow ) ;
101+ }
102+
43103 /**
44104 * Get all communities the user is authorized to submit to
45105 *
@@ -50,13 +110,13 @@ export class CommunityDataService extends ComColDataService<Community> {
50110 * no valid cached version. Defaults to true
51111 * @param reRequestOnStale Whether or not the request should automatically be re-
52112 * requested after the response becomes stale
113+ * @param searchHref The search endpoint to use, defaults to 'findAdminAuthorized'
53114 * @param linksToFollow List of {@link FollowLinkConfig} that indicate which
54115 * {@link HALLink}s should be automatically resolved
55116 * @return Observable<RemoteData<PaginatedList<Community>>>
56117 * community list
57118 */
58- getAuthorizedCommunity ( query : string , options : FindListOptions = { } , useCachedVersionIfAvailable = true , reRequestOnStale = true , ...linksToFollow : FollowLinkConfig < Community > [ ] ) : Observable < RemoteData < PaginatedList < Community > > > {
59- const searchHref = 'findAdminAuthorized' ;
119+ getAuthorizedCommunity ( query : string , options : FindListOptions = { } , useCachedVersionIfAvailable = true , reRequestOnStale = true , searchHref : string = 'findAdminAuthorized' , ...linksToFollow : FollowLinkConfig < Community > [ ] ) : Observable < RemoteData < PaginatedList < Community > > > {
60120 options = Object . assign ( { } , options , {
61121 searchParams : [ new RequestParam ( 'query' , query ) ] ,
62122 } ) ;
0 commit comments