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 */
20 package org.apache.directory.server.core.api.administrative;
21
22
23 import org.apache.directory.api.ldap.model.name.Dn;
24 import org.apache.directory.api.ldap.model.subtree.AdministrativeRole;
25
26
27 /**
28 *
29 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
30 */
31 public class AutonomousAdministrativePoint extends AbstractAdministrativePoint
32 {
33 /** A pointer to the AccessControl SAP */
34 private AccessControlAdministrativePoint accessControlSap;
35
36 /** A pointer to the CollectiveAttribute SAP */
37 private CollectiveAttributeAdministrativePoint collectiveAttributeSap;
38
39 /** A pointer to the TriggerExecution SAP */
40 private TriggerExecutionAdministrativePoint triggerExecutionSap;
41
42 /** A pointer to the Subschema SAP */
43 private SubschemaAdministrativePoint subschemaSap;
44
45
46 /**
47 * Create an instance of AutonomousAdministrativePoint
48 *
49 * @param dn The AdministrativePoint Dn
50 * @param uuid The AdministrativePoint UUID
51 */
52 public AutonomousAdministrativePoint( Dn dn, String uuid )
53 {
54 super( dn, uuid, AdministrativeRole.AutonomousArea );
55 }
56
57
58 /**
59 * {@inheritDoc}
60 */
61 @Override
62 public boolean isAutonomous()
63 {
64 return true;
65 }
66
67
68 /**
69 * {@inheritDoc}
70 */
71 public boolean isInner()
72 {
73 return false;
74 }
75
76
77 /**
78 * {@inheritDoc}
79 */
80 public boolean isSpecific()
81 {
82 return true;
83 }
84
85
86 /**
87 * @return The parent AccessControl SAP if there is some, or the parent AAP
88 */
89 public AdministrativePoint getAccessControlSap()
90 {
91 return accessControlSap;
92 }
93
94
95 /**
96 * Set the AccessControl SAP (can be an AAP)
97 *
98 * @param accessControlSap The AccessControl SAP
99 */
100 public void setAccessControlSap( AccessControlAdministrativePoint accessControlSap )
101 {
102 this.accessControlSap = accessControlSap;
103 }
104
105
106 /**
107 * @return The CollectiveAttribute SAP
108 */
109 public AdministrativePoint getCollectiveAttribute()
110 {
111 return collectiveAttributeSap;
112 }
113
114
115 /**
116 * Set the CollectiveAttribute SAP
117 *
118 * @param collectiveAttributeSap The CollectiveAttribute SAP
119 */
120 public void setCollectiveAttribute( CollectiveAttributeAdministrativePoint collectiveAttributeSap )
121 {
122 this.collectiveAttributeSap = collectiveAttributeSap;
123 }
124
125
126 /**
127 * @return The TriggerExecution SAP
128 */
129 public AdministrativePoint getTriggerExecution()
130 {
131 return triggerExecutionSap;
132 }
133
134
135 /**
136 * Set the TriggerExecution SAP
137 *
138 * @param triggerExecutionSap The TriggerExecution SAP
139 */
140 public void setTriggerExecutionParent( TriggerExecutionAdministrativePoint triggerExecutionSap )
141 {
142 this.triggerExecutionSap = triggerExecutionSap;
143 }
144
145
146 /**
147 * @return The Subschema SAP
148 */
149 public AdministrativePoint getSubschema()
150 {
151 return subschemaSap;
152 }
153
154
155 /**
156 * Set the Subschema SAP
157 *
158 * @param subschemaSap The Subschema SAP
159 */
160 public void setSubschema( SubschemaAdministrativePoint subschemaSap )
161 {
162 this.subschemaSap = subschemaSap;
163 }
164
165
166 /**
167 * {@inheritDoc}
168 */
169 @Override
170 public String toString()
171 {
172 return "AAP : " + super.toString();
173 }
174 }