You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2007/04/11 18:41:11 UTC

svn commit: r527572 - /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/ReplaceServiceContext.java

Author: elecharny
Date: Wed Apr 11 09:41:09 2007
New Revision: 527572

URL: http://svn.apache.org/viewvc?view=rev&rev=527572
Log:
Added a Replace context for the modifyRdn with a oldDn and a new DN

Added:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/ReplaceServiceContext.java

Added: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/ReplaceServiceContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/ReplaceServiceContext.java?view=auto&rev=527572
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/ReplaceServiceContext.java (added)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/ReplaceServiceContext.java Wed Apr 11 09:41:09 2007
@@ -0,0 +1,84 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you 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.directory.server.core.interceptor.context;
+
+import org.apache.directory.shared.ldap.name.LdapDN;
+
+/**
+ * A Replace context used for Interceptors. It contains all the informations
+ * needed for the modify DN operation, and used by all the interceptors
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ReplaceServiceContext extends AbstractServiceContext
+{
+    /** The parent DN */
+    private LdapDN parent;
+    
+    /**
+     * 
+     * Creates a new instance of ReplaceServiceContext.
+     *
+     */
+    public ReplaceServiceContext()
+    {
+    	super();
+    }
+
+    /**
+     * 
+     * Creates a new instance of ReplaceServiceContext.
+     *
+     */
+    public ReplaceServiceContext( LdapDN oldDn, LdapDN parent )
+    {
+        super( oldDn );
+        this.parent = parent;
+    }
+
+    /**
+     *  @return The parent DN
+     */
+    public LdapDN getParent()
+    {
+        return parent;
+    }
+
+    /**
+     * Set the parent DN
+     *
+     * @param parent The parent
+     */
+    public void setParent( LdapDN parent )
+    {
+        this.parent = parent;
+    }
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return "ReplaceContext for old DN '" + getDn().getUpName() + "'" +
+        ", parent '" + parent + "'";
+    }
+
+}