directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r208925 - /directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/ModifyDNRequest.java
Date Sun, 03 Jul 2005 14:59:53 GMT
Author: elecharny
Date: Sun Jul  3 07:59:53 2005
New Revision: 208925

URL: http://svn.apache.org/viewcvs?rev=208925&view=rev
Log:
Added the ModifyDNRequest pojo

Added:
    directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/ModifyDNRequest.java

Added: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/ModifyDNRequest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/ModifyDNRequest.java?rev=208925&view=auto
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/ModifyDNRequest.java
(added)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/ModifyDNRequest.java
Sun Jul  3 07:59:53 2005
@@ -0,0 +1,139 @@
+/*
+ *   Copyright 2005 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.asn1.ldap.pojo;
+
+import org.apache.asn1.Asn1Object;
+import org.apache.asn1.ldap.codec.primitives.LdapDN;
+import org.apache.asn1.ldap.codec.primitives.RelativeLdapDN;
+
+
+/**
+ * A ModifyDNRequest Message. Its syntax is :
+ * ModifyDNRequest ::= [APPLICATION 12] SEQUENCE {
+ *                 entry           LDAPDN,
+ *                 newrdn          RelativeLDAPDN,
+ *                 deleteoldrdn    BOOLEAN,
+ *                 newSuperior     [0] LDAPDN OPTIONAL }
+ *  
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class ModifyDNRequest extends Asn1Object
+{
+    //~ Instance fields ----------------------------------------------------------------------------
+
+    /** The DN to be modified. */
+    private LdapDN entry;
+
+    /** The new RDN to be added to the RDN or to the new superior, if present */
+    private RelativeLdapDN newRDN;
+
+    /** If the previous RDN is to be deleted, this flag will be set to true */
+    private boolean deleteOldRDN;
+
+    /** Th eoptionnal superior, which will be concatened to the newRdn */
+    private LdapDN newSuperior;
+
+    //~ Constructors -------------------------------------------------------------------------------
+
+    /**
+     * Creates a new ModifyDNRequest object.
+     */
+    public ModifyDNRequest()
+    {
+        super( );
+    }
+
+    //~ Methods ------------------------------------------------------------------------------------
+
+    /**
+     * Get the modification's DN
+     * @return Returns the entry.
+     */
+    public String getEntry()
+    {
+        return ( ( entry == null ) ? "" : entry.toString() );
+    }
+
+    /**
+     * Set the modification DN.
+     * @param entry The entry to set.
+     */
+    public void setEntry( LdapDN entry )
+    {
+        this.entry = entry;
+    }
+
+    /**
+     * Tells if the old RDN is to be deleted
+     *
+     * @return Returns the deleteOldRDN.
+     */
+    public boolean isDeleteOldRDN()
+    {
+        return deleteOldRDN;
+    }
+
+    /**
+     * Set the flag to delete the old RDN
+     *
+     * @param deleteOldRDN The deleteOldRDN to set.
+     */
+    public void setDeleteOldRDN( boolean deleteOldRDN )
+    {
+        this.deleteOldRDN = deleteOldRDN;
+    }
+
+    /**
+     * Get the new RDN
+     *
+     * @return Returns the newRDN.
+     */
+    public String getNewRDN()
+    {
+        return (newRDN == null ? "" : newRDN.toString());
+    }
+
+    /**
+     * Set the new RDN
+     *
+     * @param newRDN The newRDN to set.
+     */
+    public void setNewRDN( RelativeLdapDN newRDN )
+    {
+        this.newRDN = newRDN;
+    }
+
+    /**
+     * Get the newSuperior
+     *
+     * @return Returns the newSuperior.
+     */
+    public String getNewSuperior()
+    {
+        return (newSuperior == null ? "" : newSuperior.toString());
+    }
+
+    /**
+     * Set the new superior
+     *
+     * @param newSuperior The newSuperior to set.
+     */
+    public void setNewSuperior( LdapDN newSuperior )
+    {
+        this.newSuperior = newSuperior;
+    }
+}



Mime
View raw message