001 /* 002 * CDDL HEADER START 003 * 004 * The contents of this file are subject to the terms of the 005 * Common Development and Distribution License, Version 1.0 only 006 * (the "License"). You may not use this file except in compliance 007 * with the License. 008 * 009 * You can obtain a copy of the license at 010 * trunk/opends/resource/legal-notices/OpenDS.LICENSE 011 * or https://OpenDS.dev.java.net/OpenDS.LICENSE. 012 * See the License for the specific language governing permissions 013 * and limitations under the License. 014 * 015 * When distributing Covered Code, include this CDDL HEADER in each 016 * file and include the License file at 017 * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, 018 * add the following below this CDDL HEADER, with the fields enclosed 019 * by brackets "[]" replaced with your own identifying information: 020 * Portions Copyright [yyyy] [name of copyright owner] 021 * 022 * CDDL HEADER END 023 * 024 * 025 * Copyright 2008 Sun Microsystems, Inc. 026 */ 027 028 package org.opends.admin.ads; 029 030 import javax.naming.ldap.Control; 031 032 /** 033 * This class implements the LDAP subtree delete control for JNDI. 034 */ 035 public class SubtreeDeleteControl implements Control 036 { 037 /** 038 * The serial version identifier required to satisfy the compiler 039 * because this class implements <CODE>javax.ldap.naming.Control</CODE>, 040 * which extends the <CODE>java.io.Serializable</CODE> interface. 041 * This value was generated using the <CODE>serialver</CODE> 042 * command-line utility included with the Java SDK. 043 */ 044 static final long serialVersionUID = 3941576361457157921L; 045 046 /** 047 * Retrieves the object identifier assigned for the LDAP control. 048 * 049 * @return The non-null object identifier string. 050 */ 051 public String getID() { 052 return "1.2.840.113556.1.4.805"; 053 } 054 055 /** 056 * Determines the criticality of the LDAP control. 057 * A critical control must not be ignored by the server. 058 * In other words, if the server receives a critical control 059 * that it does not support, regardless of whether the control 060 * makes sense for the operation, the operation will not be performed 061 * and an <tt>OperationNotSupportedException</tt> will be thrown. 062 * @return true if this control is critical; false otherwise. 063 */ 064 public boolean isCritical() { 065 return true; 066 } 067 068 /** 069 * Retrieves the ASN.1 BER encoded value of the LDAP control. 070 * The result is the raw BER bytes including the tag and length of 071 * the control's value. It does not include the controls OID or criticality. 072 * 073 * Null is returned if the value is absent. 074 * 075 * @return A possibly null byte array representing the ASN.1 BER encoded 076 * value of the LDAP control. 077 */ 078 public byte[] getEncodedValue() { 079 return new byte[] {}; 080 } 081 082 }