01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package javax.naming.ldap;
19:
20: import javax.naming.ldap.Control;
21:
22: /**
23: * TODO: JavaDoc
24: */
25: public class BasicControl implements Control {
26:
27: private static final long serialVersionUID = -4233907508771791687L;
28:
29: protected String id;
30:
31: protected boolean criticality = false;
32:
33: protected byte[] value;
34:
35: public BasicControl(String id) {
36: this .id = id;
37: }
38:
39: public BasicControl(String id, boolean criticality, byte[] value) {
40: this .id = id;
41: this .criticality = criticality;
42: this .value = value;
43: }
44:
45: public byte[] getEncodedValue() {
46: return value;
47: }
48:
49: public boolean isCritical() {
50: return criticality;
51: }
52:
53: public String getID() {
54: return id;
55: }
56:
57: }
|