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.api.ldap.model.schema.registries.helper; 021 022 023import org.apache.directory.api.ldap.model.schema.DitStructureRule; 024import org.apache.directory.api.ldap.model.schema.SchemaErrorHandler; 025import org.apache.directory.api.ldap.model.schema.registries.Registries; 026 027 028/** 029 * An helper class used to store all the methods associated with an DitStructureRule 030 * in relation with the Registries and SchemaManager. 031 * 032 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> 033 */ 034public final class DitStructureRuleHelper 035{ 036 private DitStructureRuleHelper() 037 { 038 } 039 040 041 /** 042 * Inject the DitContentRule into the registries, updating the references to 043 * other SchemaObject 044 * 045 * @param ditStructureRule The DitStructureRule to add to the Registries 046 * @param errorHandler Error handler 047 * @param registries The Registries 048 */ 049 public static void addToRegistries( DitStructureRule ditStructureRule, SchemaErrorHandler errorHandler, Registries registries ) 050 { 051 if ( registries != null ) 052 { 053 try 054 { 055 ditStructureRule.unlock(); 056 057 // NOT YET IMPLEMENTED 058 } 059 finally 060 { 061 ditStructureRule.lock(); 062 } 063 } 064 } 065}