1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.directory.api.dsmlv2.request;
21
22
23
24
25
26
27
28 public class ExtensibleMatchFilter extends Filter
29 {
30
31 private String matchingRule;
32
33
34 private String type;
35
36
37 private org.apache.directory.api.ldap.model.entry.Value<?> matchValue;
38
39
40 private boolean dnAttributes = false;
41
42
43
44
45
46
47
48 public boolean isDnAttributes()
49 {
50 return dnAttributes;
51 }
52
53
54
55
56
57
58
59 public void setDnAttributes( boolean dnAttributes )
60 {
61 this.dnAttributes = dnAttributes;
62 }
63
64
65
66
67
68
69
70 public String getMatchingRule()
71 {
72 return matchingRule;
73 }
74
75
76
77
78
79
80
81 public void setMatchingRule( String matchingRule )
82 {
83 this.matchingRule = matchingRule;
84 }
85
86
87
88
89
90
91
92 public org.apache.directory.api.ldap.model.entry.Value<?> getMatchValue()
93 {
94 return matchValue;
95 }
96
97
98
99
100
101
102
103 public void setMatchValue( org.apache.directory.api.ldap.model.entry.Value<?> matchValue )
104 {
105 this.matchValue = matchValue;
106 }
107
108
109
110
111
112
113
114 public String getType()
115 {
116 return type;
117 }
118
119
120
121
122
123
124
125 public void setType( String type )
126 {
127 this.type = type;
128 }
129
130
131
132
133
134
135
136 public String toString()
137 {
138
139 StringBuffer sb = new StringBuffer();
140
141 if ( type != null )
142 {
143 sb.append( type );
144 }
145
146 if ( dnAttributes )
147 {
148 sb.append( ":dn" );
149 }
150
151 if ( matchingRule == null )
152 {
153
154 if ( type == null )
155 {
156 return "Extended Filter wrong syntax";
157 }
158 }
159 else
160 {
161 sb.append( ':' ).append( matchingRule );
162 }
163
164 sb.append( ":=" ).append( matchValue );
165
166 return sb.toString();
167 }
168 }