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.ldap.model.schema.registries;
21
22
23 import java.util.Iterator;
24
25 import org.apache.directory.api.i18n.I18n;
26 import org.apache.directory.api.ldap.model.exception.LdapException;
27 import org.apache.directory.api.ldap.model.exception.LdapUnwillingToPerformException;
28 import org.apache.directory.api.ldap.model.message.ResultCodeEnum;
29 import org.apache.directory.api.ldap.model.schema.MatchingRuleUse;
30 import org.apache.directory.api.ldap.model.schema.SchemaObjectType;
31
32
33
34
35
36
37
38 public class ImmutableMatchingRuleUseRegistry implements MatchingRuleUseRegistry
39 {
40
41 MatchingRuleUseRegistry immutableMatchingRuleUseRegistry;
42
43
44
45
46
47
48
49 public ImmutableMatchingRuleUseRegistry( MatchingRuleUseRegistry matchingRuleUseRegistry )
50 {
51 immutableMatchingRuleUseRegistry = matchingRuleUseRegistry;
52 }
53
54
55
56
57
58 @Override
59 public ImmutableMatchingRuleUseRegistry copy()
60 {
61 return ( ImmutableMatchingRuleUseRegistry ) immutableMatchingRuleUseRegistry.copy();
62 }
63
64
65
66
67
68 @Override
69 public int size()
70 {
71 return immutableMatchingRuleUseRegistry.size();
72 }
73
74
75
76
77
78 @Override
79 public boolean contains( String oid )
80 {
81 return immutableMatchingRuleUseRegistry.contains( oid );
82 }
83
84
85
86
87
88 @Override
89 public String getOidByName( String name ) throws LdapException
90 {
91 return immutableMatchingRuleUseRegistry.getOidByName( name );
92 }
93
94
95
96
97
98 @Override
99 public String getSchemaName( String oid ) throws LdapException
100 {
101 return immutableMatchingRuleUseRegistry.getSchemaName( oid );
102 }
103
104
105
106
107
108 @Override
109 public SchemaObjectType getType()
110 {
111 return immutableMatchingRuleUseRegistry.getType();
112 }
113
114
115
116
117
118 @Override
119 public Iterator<MatchingRuleUse> iterator()
120 {
121 return immutableMatchingRuleUseRegistry.iterator();
122 }
123
124
125
126
127
128 @Override
129 public MatchingRuleUse lookup( String oid ) throws LdapException
130 {
131 return immutableMatchingRuleUseRegistry.lookup( oid );
132 }
133
134
135
136
137
138 @Override
139 public Iterator<String> oidsIterator()
140 {
141 return immutableMatchingRuleUseRegistry.oidsIterator();
142 }
143
144
145
146
147
148 @Override
149 public void register( MatchingRuleUse schemaObject ) throws LdapException
150 {
151 throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04281 ) );
152 }
153
154
155
156
157
158 @Override
159 public void renameSchema( String originalSchemaName, String newSchemaName ) throws LdapException
160 {
161 throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04281 ) );
162 }
163
164
165
166
167
168 @Override
169 public MatchingRuleUse unregister( String numericOid ) throws LdapException
170 {
171 throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04281 ) );
172 }
173
174
175
176
177
178 @Override
179 public void unregisterSchemaElements( String schemaName ) throws LdapException
180 {
181 throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04281 ) );
182 }
183
184
185
186
187
188 @Override
189 public MatchingRuleUse get( String oid )
190 {
191 return immutableMatchingRuleUseRegistry.get( oid );
192 }
193
194
195
196
197
198 @Override
199 public void clear() throws LdapException
200 {
201 throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04281 ) );
202 }
203
204
205
206
207
208 @Override
209 public MatchingRuleUse unregister( MatchingRuleUse schemaObject ) throws LdapException
210 {
211 throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04281 ) );
212 }
213 }