View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.syncope.common.lib.search;
20  
21  import org.apache.cxf.jaxrs.ext.search.client.Property;
22  
23  /**
24   * Extension of fluent interface, for {@link org.apache.syncope.common.lib.search.AbstractFiqlSearchConditionBuilder}
25   * and subclasses.
26   *
27   * @param <C> the actual complete condition
28   */
29  public interface SyncopeProperty<C extends SyncopeCompleteCondition<?, ?>> extends Property {
30  
31      /**
32       * Is textual property equal to (ignoring case) given literal or matching given pattern?
33       *
34       * @param value first value
35       * @param moreValues more values
36       * @return updated condition
37       */
38      C equalToIgnoreCase(String value, String... moreValues);
39  
40      /**
41       * Is textual property different (ignoring case) than given literal or not matching given pattern?
42       *
43       * @param literalOrPattern The literal or Pattern String
44       * @return updated condition
45       */
46      C notEqualTolIgnoreCase(String literalOrPattern);
47  
48      /**
49       * Is property null?
50       *
51       * @return updated condition
52       */
53      C nullValue();
54  
55      /**
56       * Is property not null?
57       *
58       * @return updated condition
59       */
60      C notNullValue();
61  
62      /**
63       * Has user, group or any object assigned the given auxiliary class(es)?
64       *
65       * @param auxClass first auxiliary class
66       * @param moreAuxClasses more auxiliary classes
67       * @return updated condition
68       */
69      C hasAuxClasses(String auxClass, String... moreAuxClasses);
70  
71      /**
72       * Has user, group or any object not assigned the given auxiliary class(es)?
73       *
74       * @param auxClass first auxiliary class
75       * @param moreAuxClasses more auxiliary classes
76       * @return updated condition
77       */
78      C hasNotAuxClasses(String auxClass, String... moreAuxClasses);
79  
80      /**
81       * Is user, group or any object owning given resource(s)?
82       *
83       * @param resource first resource
84       * @param moreResources more resources
85       * @return updated condition
86       */
87      C hasResources(String resource, String... moreResources);
88  
89      /**
90       * Is user, group or any object not owning given resource(s)?
91       *
92       * @param resource first resource
93       * @param moreResources more resources
94       * @return updated condition
95       */
96      C hasNotResources(String resource, String... moreResources);
97  
98      /**
99       * Is user, group or any object in the given dynamic realm(s)?
100      *
101      * @param dynRealm first dynamic realm
102      * @param moreDynRealms more dynamic realms
103      * @return updated condition
104      */
105     C inDynRealms(String dynRealm, String... moreDynRealms);
106 
107     /**
108      * Is user, group or any object not in the given dynamic realm(s)?
109      *
110      * @param dynRealm first dynamic realm
111      * @param moreDynRealms more dynamic realms
112      * @return updated condition
113      */
114     C notInDynRealms(String dynRealm, String... moreDynRealms);
115 }