View Javadoc
1   /*******************************************************************************
2    * Copyright 2012 Internet2
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    *   http://www.apache.org/licenses/LICENSE-2.0
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   ******************************************************************************/
16  /*
17   * @author mchyzer
18   * $Id: WsRestGetGroupsRequest.java,v 1.2 2009-12-10 08:54:25 mchyzer Exp $
19   */
20  package edu.internet2.middleware.grouper.ws.rest.group;
21  
22  import edu.internet2.middleware.grouper.ws.GrouperServiceLogic;
23  import edu.internet2.middleware.grouper.ws.coresoap.WsParam;
24  import edu.internet2.middleware.grouper.ws.coresoap.WsStemLookup;
25  import edu.internet2.middleware.grouper.ws.coresoap.WsSubjectLookup;
26  import edu.internet2.middleware.grouper.ws.rest.WsRequestBean;
27  import edu.internet2.middleware.grouper.ws.rest.method.GrouperRestHttpMethod;
28  import io.swagger.annotations.ApiModel;
29  import io.swagger.annotations.ApiModelProperty;
30  
31  /**
32   * bean that will be the data from rest request
33   * @see GrouperServiceLogic#getGroups(edu.internet2.middleware.grouper.ws.GrouperWsVersion, WsSubjectLookup[], edu.internet2.middleware.grouper.ws.member.WsMemberFilter, WsSubjectLookup, boolean, boolean, String[], WsParam[])
34   * for method
35   */
36  @ApiModel(description = "bean that will be the data from rest request for getting groups<br /><br /><b>actAsSubjectLookup</b>: If allowed to act as other users (e.g. if a UI uses the Grouper WS behind the scenes), specify the user to act as here<br />"
37      + "<br /><br /><b>subjectLookups</b>: lookup group for request<br />"
38      + "<br /><br /><b>params</b>: optional params for this request<br />"
39      + "<br /><br /><b>wsStemLookup</b>: is the stem to check in, or null if all.  If has stem, must have stemScope<br />")
40  public class WsRestGetGroupsRequest implements WsRequestBean {
41    
42    /** field */
43    private String clientVersion;
44    
45    /** field */
46    private WsSubjectLookup[] subjectLookups;
47    
48    /** field */
49    private WsSubjectLookup actAsSubjectLookup;
50    
51    /** field */
52    private String memberFilter;
53    
54    /** field */
55    private String includeGroupDetail;
56    
57    /** field */
58    private String includeSubjectDetail;
59    
60    /** field */
61    private String[] subjectAttributeNames;
62    
63    /** field */
64    private WsParam[] params;
65    
66    /** scope is a DB pattern that will have % appended to it, or null for all.  e.g. school:whatever:parent: */
67    private String scope;
68    
69    /** is the stem to check in, or null if all.  If has stem, must have stemScope */
70    private WsStemLookup wsStemLookup;
71    
72    /** stemScope is ONE_LEVEL if in this stem, or ALL_IN_SUBTREE for any stem underneath.  You must pass stemScope if you pass a stem */
73    private String stemScope;
74    
75    /** enabled is A for all, T or null for enabled only, F for disabled */
76    private String enabled;
77    
78    /** pageSize page size if paging */
79    private String pageSize;
80    
81    /** pageNumber page number 1 indexed if paging */
82    private String pageNumber;
83    
84    /** sortString must be an hql query field, e.g. can sort on name, displayName, extension, displayExtension */
85    private String sortString;
86    
87    /** ascending or null for ascending, F for descending.  If you pass T or F, must pass a sort string */
88    private String ascending;
89    
90    /**
91     * T|F default to F.  if this is T then we are doing cursor paging
92     */
93    private String pageIsCursor;
94    
95    /**
96     * field that will be sent back for cursor based paging
97     */
98    private String pageLastCursorField;
99    
100   /**
101    * could be: string, int, long, date, timestamp
102    */
103   private String pageLastCursorFieldType;
104   
105   /**
106    * T|F
107    */
108   private String pageCursorFieldIncludesLastRetrieved;
109   
110   /** field name (list) to search, blank for members list */
111   private String fieldName;
112   
113   /**
114    * To query members at a certain point in time or time range in the past, set this value
115    * and/or the value of pointInTimeTo.  This parameter specifies the start of the range
116    * of the point in time query.  If this is specified but pointInTimeTo is not specified, 
117    * then the point in time query range will be from the time specified to now.  
118    * Format:  yyyy/MM/dd HH:mm:ss.SSS
119    */
120   private String pointInTimeFrom;
121   
122   /**
123    * To query members at a certain point in time or time range in the past, set this value
124    * and/or the value of pointInTimeFrom.  This parameter specifies the end of the range 
125    * of the point in time query.  If this is the same as pointInTimeFrom, then the query 
126    * will be done at a single point in time rather than a range.  If this is specified but 
127    * pointInTimeFrom is not specified, then the point in time query range will be from the 
128    * minimum point in time to the time specified.  Format: yyyy/MM/dd HH:mm:ss.SSS   
129    */
130   private String pointInTimeTo;
131   
132   /**
133    * field name (list) to search, blank for members list
134    * @return field name
135    */
136   @ApiModelProperty(value = "field name (list) to search, blank for groups list", example = "members, optin, optout, read, admin, update, view, groupAttrRead, groupAttrUpdate")
137   public String getFieldName() {
138     return this.fieldName;
139   }
140 
141   /**
142    * field name (list) to search, blank for members list
143    * @param fieldName1
144    */
145   public void setFieldName(String fieldName1) {
146     this.fieldName = fieldName1;
147   }
148 
149   /**
150    * scope is a DB pattern that will have % appended to it, or null for all.  e.g. school:whatever:parent:
151    * @return scope
152    */
153   @ApiModelProperty(value = "scope is a DB pattern that will have % appended to it, or null for all", example = "school:whatever:parent:")
154   public String getScope() {
155     return this.scope;
156   }
157 
158 
159   /**
160    * scope is a DB pattern that will have % appended to it, or null for all.  e.g. school:whatever:parent:
161    * @param scope1
162    */
163   public void setScope(String scope1) {
164     this.scope = scope1;
165   }
166 
167 
168   /**
169    * is the stem to check in, or null if all.  If has stem, must have stemScope
170    * @return stem lookup
171    */
172   public WsStemLookup getWsStemLookup() {
173     //TODO return the stem in the response somewhere
174     return this.wsStemLookup;
175   }
176 
177 
178   /**
179    * is the stem to check in, or null if all.  If has stem, must have stemScope
180    * @param wsStemLookup1
181    */
182   public void setWsStemLookup(WsStemLookup wsStemLookup1) {
183     this.wsStemLookup = wsStemLookup1;
184   }
185 
186 
187   /**
188    * stemScope is ONE_LEVEL if in this stem, or ALL_IN_SUBTREE for any stem underneath.  You must pass stemScope if you pass a stem
189    * @return stem scope
190    */
191   @ApiModelProperty(value = "stemScope is ONE_LEVEL if in this stem, or ALL_IN_SUBTREE for any stem underneath.  You must pass stemScope if you pass a stem", example = "ALL_IN_SUBTREE")
192   public String getStemScope() {
193     return this.stemScope;
194   }
195 
196 
197   /**
198    * stemScope is ONE_LEVEL if in this stem, or ALL_IN_SUBTREE for any stem underneath.  You must pass stemScope if you pass a stem
199    * @param stemScope1
200    */
201   public void setStemScope(String stemScope1) {
202     this.stemScope = stemScope1;
203   }
204 
205 
206   /**
207    *  enabled is A for all, T or null for enabled only, F for disabled
208    * @return enabled string
209    */
210   @ApiModelProperty(value = "stemScope is ONE_LEVEL if in this stem, or ALL_IN_SUBTREE for any stem underneath.  You must pass stemScope if you pass a stem", example = "ALL_IN_SUBTREE")
211   public String getEnabled() {
212     return this.enabled;
213   }
214 
215 
216   /**
217    *  enabled is A for all, T or null for enabled only, F for disabled
218    * @param enabled1
219    */
220   public void setEnabled(String enabled1) {
221     this.enabled = enabled1;
222   }
223 
224 
225   /**
226    *  pageSize page size if paging
227    * @return page size
228    */
229   @ApiModelProperty(value = "Page size if paging", example = "100")
230   public String getPageSize() {
231     return this.pageSize;
232   }
233 
234 
235   /**
236    *  pageSize page size if paging
237    * @param pageSize1
238    */
239   public void setPageSize(String pageSize1) {
240     this.pageSize = pageSize1;
241   }
242 
243 
244   /**
245    *  pageNumber page number 1 indexed if paging
246    * @return page number
247    */
248   @ApiModelProperty(value = "Page number 1 indexed if paging", example = "1")
249   public String getPageNumber() {
250     return this.pageNumber;
251   }
252 
253 
254   /**
255    *  pageNumber page number 1 indexed if paging
256    * @param pageNumber1
257    */
258   public void setPageNumber(String pageNumber1) {
259     this.pageNumber = pageNumber1;
260   }
261 
262 
263   /**
264    * sortString must be an hql query field, e.g. can sort on name, displayName, extension, displayExtension
265    * @return sort string
266    */
267   @ApiModelProperty(value = "Must be an hql query field, e.g. can sort on name, displayName, extension, displayExtension", 
268       example = "name | displayName | extension | displayExtension")
269   public String getSortString() {
270     return this.sortString;
271   }
272 
273 
274   /**
275    * sortString must be an hql query field, e.g. can sort on name, displayName, extension, displayExtension
276    * @param sortString1
277    */
278   public void setSortString(String sortString1) {
279     this.sortString = sortString1;
280   }
281 
282 
283   /**
284    * ascending or null for ascending, F for descending.  If you pass T or F, must pass a sort string
285    * @return if ascending
286    */
287   @ApiModelProperty(value = "T or null for ascending, F for descending.  If you pass true or false, must pass a sort string", example = "T|F")
288   public String getAscending() {
289     return this.ascending;
290   }
291 
292 
293   /**
294    * ascending or null for ascending, F for descending.  If you pass T or F, must pass a sort string
295    * @param ascending1
296    */
297   public void setAscending(String ascending1) {
298     this.ascending = ascending1;
299   }
300 
301 
302   /**
303    * @return the clientVersion
304    */
305   @ApiModelProperty(value = "Version of the client (i.e. that the client was coded against)", example = "v2_6_001")
306   public String getClientVersion() {
307     return this.clientVersion;
308   }
309 
310   
311   /**
312    * @param clientVersion1 the clientVersion to set
313    */
314   public void setClientVersion(String clientVersion1) {
315     this.clientVersion = clientVersion1;
316   }
317 
318   
319   /**
320    * @return the subjectLookups
321    */
322   public WsSubjectLookup[] getSubjectLookups() {
323     return this.subjectLookups;
324   }
325 
326   
327   /**
328    * @param subjectLookups1 the subjectLookups to set
329    */
330   public void setSubjectLookups(WsSubjectLookup[] subjectLookups1) {
331     this.subjectLookups = subjectLookups1;
332   }
333 
334   
335   /**
336    * @return the actAsSubjectLookup
337    */
338   public WsSubjectLookup getActAsSubjectLookup() {
339     return this.actAsSubjectLookup;
340   }
341 
342   
343   /**
344    * @param actAsSubjectLookup1 the actAsSubjectLookup to set
345    */
346   public void setActAsSubjectLookup(WsSubjectLookup actAsSubjectLookup1) {
347     this.actAsSubjectLookup = actAsSubjectLookup1;
348   }
349 
350   
351   /**
352    * @return the fieldName
353    */
354   @ApiModelProperty(value = "can be All(default), Effective (non immediate), Immediate (direct),Composite (if composite group with group math (union, minus,etc)", example = "Effective")
355   public String getMemberFilter() {
356     return this.memberFilter;
357   }
358 
359   
360   /**
361    * @param fieldName1 the fieldName to set
362    */
363   public void setMemberFilter(String fieldName1) {
364     this.memberFilter = fieldName1;
365   }
366 
367   
368   /**
369    * @return the includeGroupDetail
370    */
371   @ApiModelProperty(value = "If the group detail should be returned, default to false", example = "T|F")
372   public String getIncludeGroupDetail() {
373     return this.includeGroupDetail;
374   }
375 
376   
377   /**
378    * @param includeGroupDetail1 the includeGroupDetail to set
379    */
380   public void setIncludeGroupDetail(String includeGroupDetail1) {
381     this.includeGroupDetail = includeGroupDetail1;
382   }
383 
384   
385   /**
386    * @return the includeSubjectDetail
387    */
388   @ApiModelProperty(value = "If the subject detail should be returned, default to false", example = "T|F")
389   public String getIncludeSubjectDetail() {
390     return this.includeSubjectDetail;
391   }
392 
393   
394   /**
395    * @param includeSubjectDetail1 the includeSubjectDetail to set
396    */
397   public void setIncludeSubjectDetail(String includeSubjectDetail1) {
398     this.includeSubjectDetail = includeSubjectDetail1;
399   }
400 
401   
402   /**
403    * @return the subjectAttributeNames
404    */
405   @ApiModelProperty(value = "are the additional subject attributes (data) to return. If blank, whatever is configured in the grouper-ws.properties will be sent (comma separated). Only certain attributes are configured to be allowed to be retrieved", example = "lastName, middleName")
406   public String[] getSubjectAttributeNames() {
407     return this.subjectAttributeNames;
408   }
409 
410   
411   /**
412    * @param subjectAttributeNames1 the subjectAttributeNames to set
413    */
414   public void setSubjectAttributeNames(String[] subjectAttributeNames1) {
415     this.subjectAttributeNames = subjectAttributeNames1;
416   }
417 
418 
419   
420   /**
421    * @return the params
422    */
423   public WsParam[] getParams() {
424     return this.params;
425   }
426 
427 
428   
429   /**
430    * @param params1 the params to set
431    */
432   public void setParams(WsParam[] params1) {
433     this.params = params1;
434   }
435 
436   /**
437    * @see edu.internet2.middleware.grouper.ws.rest.WsRequestBean#retrieveRestHttpMethod()
438    */
439   @Override
440   public GrouperRestHttpMethod retrieveRestHttpMethod() {
441     return GrouperRestHttpMethod.GET;
442   }
443 
444   /**
445    * To query members at a certain point in time or time range in the past, set this value
446    * and/or the value of pointInTimeTo.  This parameter specifies the start of the range
447    * of the point in time query.  If this is specified but pointInTimeTo is not specified, 
448    * then the point in time query range will be from the time specified to now.  
449    * Format:  yyyy/MM/dd HH:mm:ss.SSS
450    * @return the pointInTimeFrom
451    */
452   @ApiModelProperty(value = "To query members at a certain point in time or time range in the past, set this value and/or the value of pointInTimeTo.  This parameter specifies the start of the range of the point in time query.  If this is specified but pointInTimeTo is not specified, then the point in time query range will be from the time specified to now.", example = "1970/01/01 00:00:00.000")
453   public String getPointInTimeFrom() {
454     return this.pointInTimeFrom;
455   }
456 
457   
458   /**
459    * To query members at a certain point in time or time range in the past, set this value
460    * and/or the value of pointInTimeTo.  This parameter specifies the start of the range
461    * of the point in time query.  If this is specified but pointInTimeTo is not specified, 
462    * then the point in time query range will be from the time specified to now.  
463    * Format:  yyyy/MM/dd HH:mm:ss.SSS
464    * @param pointInTimeFrom1 the pointInTimeFrom to set
465    */
466   public void setPointInTimeFrom(String pointInTimeFrom1) {
467     this.pointInTimeFrom = pointInTimeFrom1;
468   }
469 
470   
471   /**
472    * To query members at a certain point in time or time range in the past, set this value
473    * and/or the value of pointInTimeFrom.  This parameter specifies the end of the range 
474    * of the point in time query.  If this is the same as pointInTimeFrom, then the query 
475    * will be done at a single point in time rather than a range.  If this is specified but 
476    * pointInTimeFrom is not specified, then the point in time query range will be from the 
477    * minimum point in time to the time specified.  Format: yyyy/MM/dd HH:mm:ss.SSS 
478    * @return the pointInTimeTo
479    */
480   @ApiModelProperty(value = "To query members at a certain point in time or time range in the past, set this value and/or the value of pointInTimeFrom.  This parameter specifies the start of the range of the point in time query.  If this is specified but pointInTimeFrom is not specified, then the point in time query range will be from the time specified to now.", example = "1970/01/01 00:00:00.000")
481   public String getPointInTimeTo() {
482     return this.pointInTimeTo;
483   }
484 
485   
486   /**
487    * To query members at a certain point in time or time range in the past, set this value
488    * and/or the value of pointInTimeFrom.  This parameter specifies the end of the range 
489    * of the point in time query.  If this is the same as pointInTimeFrom, then the query 
490    * will be done at a single point in time rather than a range.  If this is specified but 
491    * pointInTimeFrom is not specified, then the point in time query range will be from the 
492    * minimum point in time to the time specified.  Format: yyyy/MM/dd HH:mm:ss.SSS 
493    * @param pointInTimeTo1 the pointInTimeTo to set
494    */
495   public void setPointInTimeTo(String pointInTimeTo1) {
496     this.pointInTimeTo = pointInTimeTo1;
497   }
498 
499   /**
500    * @return the pageIsCursor
501    */
502   @ApiModelProperty(value = "T|F default to F.  if this is T then we are doing cursor paging", example = "T|F")
503   public String getPageIsCursor() {
504     return this.pageIsCursor;
505   }
506 
507   /**
508    * @param pageIsCursor1 the pageIsCursor to set
509    */
510   public void setPageIsCursor(String pageIsCursor1) {
511     this.pageIsCursor = pageIsCursor1;
512   }
513 
514   /**
515    * @return the pageLastCursorField
516    */
517   @ApiModelProperty(value = "Field that will be sent back for cursor based paging", example = "abc123")
518   public String getPageLastCursorField() {
519     return this.pageLastCursorField;
520   }
521 
522   /**
523    * @param pageLastCursorField1 the pageLastCursorField to set
524    */
525   public void setPageLastCursorField(String pageLastCursorField1) {
526     this.pageLastCursorField = pageLastCursorField1;
527   }
528 
529   /**
530    * @return the pageLastCursorFieldType
531    */
532   @ApiModelProperty(value = "Could be: string, int, long, date, timestamp", example = "string|int|long|date|timestamp")
533   public String getPageLastCursorFieldType() {
534     return this.pageLastCursorFieldType;
535   }
536 
537   /**
538    * @param pageLastCursorFieldType1 the pageLastCursorFieldType to set
539    */
540   public void setPageLastCursorFieldType(String pageLastCursorFieldType1) {
541     this.pageLastCursorFieldType = pageLastCursorFieldType1;
542   }
543 
544   /**
545    * @return the pageCursorFieldIncludesLastRetrieved
546    */
547   @ApiModelProperty(value = "If cursor field is unique, this should be false.  If not, then should be true.  i.e. if should include the last cursor field in the next resultset", example = "T|F")
548   public String getPageCursorFieldIncludesLastRetrieved() {
549     return this.pageCursorFieldIncludesLastRetrieved;
550   }
551 
552   /**
553    * @param pageCursorFieldIncludesLastRetrieved1 the pageCursorFieldIncludesLastRetrieved to set
554    */
555   public void setPageCursorFieldIncludesLastRetrieved(String pageCursorFieldIncludesLastRetrieved1) {
556     this.pageCursorFieldIncludesLastRetrieved = pageCursorFieldIncludesLastRetrieved1;
557   }
558   
559   
560 }