001/* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 * 019 */ 020package org.apache.directory.server.core.api.administrative; 021 022 023import org.apache.directory.api.ldap.model.name.Dn; 024import org.apache.directory.api.ldap.model.subtree.AdministrativeRole; 025 026 027/** 028 * 029 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> 030 */ 031public class AutonomousAdministrativePoint extends AbstractAdministrativePoint 032{ 033 /** A pointer to the AccessControl SAP */ 034 private AccessControlAdministrativePoint accessControlSap; 035 036 /** A pointer to the CollectiveAttribute SAP */ 037 private CollectiveAttributeAdministrativePoint collectiveAttributeSap; 038 039 /** A pointer to the TriggerExecution SAP */ 040 private TriggerExecutionAdministrativePoint triggerExecutionSap; 041 042 /** A pointer to the Subschema SAP */ 043 private SubschemaAdministrativePoint subschemaSap; 044 045 046 /** 047 * Create an instance of AutonomousAdministrativePoint 048 * 049 * @param dn The AdministrativePoint Dn 050 * @param uuid The AdministrativePoint UUID 051 */ 052 public AutonomousAdministrativePoint( Dn dn, String uuid ) 053 { 054 super( dn, uuid, AdministrativeRole.AutonomousArea ); 055 } 056 057 058 /** 059 * {@inheritDoc} 060 */ 061 @Override 062 public boolean isAutonomous() 063 { 064 return true; 065 } 066 067 068 /** 069 * {@inheritDoc} 070 */ 071 public boolean isInner() 072 { 073 return false; 074 } 075 076 077 /** 078 * {@inheritDoc} 079 */ 080 public boolean isSpecific() 081 { 082 return true; 083 } 084 085 086 /** 087 * @return The parent AccessControl SAP if there is some, or the parent AAP 088 */ 089 public AdministrativePoint getAccessControlSap() 090 { 091 return accessControlSap; 092 } 093 094 095 /** 096 * Set the AccessControl SAP (can be an AAP) 097 * 098 * @param accessControlSap The AccessControl SAP 099 */ 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}