2362N/A * Copyright (c) 1999, 2002, 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 subclass is used by LDAP to implement the schema calls. 0N/A * Basically, it keeps track of which context it is an attribute of 0N/A * so it can get the schema for that cotnext. 0N/A // these two are used to reconstruct the baseCtx if this attribute has 0N/A // been serialized ( 0N/A * Adds a new value to this attribute. 0N/A * @param attrVal The value to be added. If null, a null value is added to 0N/A * @return true Always returns true. 0N/A // LDAP attributes don't contain duplicate values so there's no need 0N/A // to check if the value already exists before adding it. 0N/A * Constructs a new instance of an attribute. 0N/A * @param id The attribute's id. It cannot be null. 0N/A * Constructs a new instance of an attribute. 0N/A * @param id The attribute's id. It cannot be null. 0N/A * @param baseCtx the baseCtx object of this attribute 0N/A * @param rdn the RDN of the entry (relative to baseCtx) 0N/A * Sets the baseCtx and rdn used to find the attribute's schema 0N/A * Used by LdapCtx.setParents(). 0N/A * returns the ctx this attribute came from. This call allows 0N/A * LDAPAttribute to be serializable. 'baseCtx' is transient so if 0N/A * it is null, the `baseCtxURL` is used to reconstruct the context 0N/A * to which calls are made. 0N/A "com.sun.jndi.ldap.LdapCtxFactory");
0N/A * This is called when the object is serialized. It is 0N/A * overridden so that the appropriate class variables can be set 0N/A * to re-construct the baseCtx when deserialized. Setting these 0N/A * variables is costly, so it is only done if the object 0N/A * is actually serialized. 0N/A // setup internal state 0N/A // let the ObjectOutpurStream do the real work of serialization 0N/A * sets the information needed to reconstruct the baseCtx if 0N/A * we are serialized. This must be called _before_ the object is 0N/A // remove any security credentials - otherwise the serialized form 0N/A // would store them in the clear 0N/A //if we need to remove props, we must do it to a clone 0N/A //of the environment. cloning is expensive, so we only do 0N/A // set baseCtxEnv depending on whether we removed props or not 0N/A * Retrieves the syntax definition associated with this attribute. 0N/A * @return This attribute's syntax definition. 0N/A // get the syntax id from the attribute def 0N/A getID() +
"does not have a syntax associated with it");
0N/A // look in the schema tree for the syntax definition 0N/A * Retrieves this attribute's schema definition. 0N/A * @return This attribute's schema definition.