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.extras.controls.changeNotifications_impl;
21
22
23 import org.apache.directory.api.ldap.codec.api.CodecControl;
24 import org.apache.directory.api.ldap.codec.api.ControlFactory;
25 import org.apache.directory.api.ldap.codec.api.LdapApiService;
26 import org.apache.directory.api.ldap.extras.controls.changeNotifications.ChangeNotifications;
27 import org.apache.directory.api.ldap.extras.controls.changeNotifications.ChangeNotificationsImpl;
28
29
30
31
32
33
34
35
36 public class ChangeNotificationsFactory implements ControlFactory<ChangeNotifications>
37 {
38
39 private LdapApiService codec;
40
41
42
43
44
45
46
47 public ChangeNotificationsFactory( LdapApiService codec )
48 {
49 this.codec = codec;
50 }
51
52
53
54
55
56 @Override
57 public String getOid()
58 {
59 return ChangeNotifications.OID;
60 }
61
62
63
64
65
66 @Override
67 public CodecControl<ChangeNotifications> newCodecControl()
68 {
69 return new ChangeNotificationsDecorator( codec, new ChangeNotificationsImpl() );
70 }
71
72
73
74
75
76 @Override
77 public CodecControl<ChangeNotifications> newCodecControl( ChangeNotifications control )
78 {
79 return new ChangeNotificationsDecorator( codec, control );
80 }
81 }