2362N/A * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * This is the class used to implement LDAP's GetSchema call. 0N/A * It subclasses HierMemDirContext for most of the functionality. It 0N/A * overrides functions that cause the schema definitions to change. 0N/A * In such a case, it write the schema to the LdapServer and (assuming 0N/A * there are no errors), calls it's superclass's equivalent function. 0N/A * Thus, the schema tree and the LDAP server's schema attributes are 0N/A static private final boolean debug =
false;
0N/A private static final int LEAF =
0;
// schema object (e.g. attribute type defn) 0N/A static final int ATTRIBUTE =
7;
// an attribute type definition 0N/A static final int SYNTAX =
8;
// a syntax definition 0N/A static final int MATCHRULE =
9;
// a matching rule definition 0N/A // Called by createNewCtx 0N/A // override HierMemDirCtx.close to prevent premature GC of shared data 0N/A // override to ignore obj and use attrs 0N/A // treat same as createSubcontext 0N/A // Update in-memory copy 0N/A "Cannot bind arbitrary object; use createSubcontext()");
0N/A // override to use bind() instead 0N/A "Cannot replace existing schema object");
0N/A "Cannot bind arbitrary object; use createSubcontext()");
0N/A // Lookup entry from memory 0N/A // Update in-memory copy 0N/A // Lookup entry from memory 0N/A // Update in-memory copy 0N/A // Called to create oc, attr, syntax or matching rule roots and leaf entries 0N/A "Must supply attributes describing schema");
0N/A // Update in-memory copy 0N/A // Apply modifications to copy 0N/A // Update server copy 0N/A // Update in-memory copy 0N/A // we override this so the superclass creates the right kind of contexts 0N/A // Default is to create LEAF objects; caller will change after creation 0N/A "Cannot create new entry under schema root");
0N/A "Cannot create child of schema object");
0N/A //System.err.println((String)schemaAttr.get()); 0N/A * When we delete an entry, we use the original to make sure that 0N/A * any formatting inconsistencies are eliminated. 0N/A * This is because we're just deleting a value from an attribute 0N/A * on the server and there might not be any checks for extra spaces 0N/A "Cannot delete schema root");
0N/A "Cannot delete child of schema object");
0N/A * When we modify an entry, we use the original attribute value 0N/A * in the schema to make sure that any formatting inconsistencies 0N/A * are eliminated. A modification is done by deleting the original 0N/A * value and adding a new value with the modification. 0N/A "Cannot modify schema root");
0N/A // Use subschemasubentry name as DN