You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by tr...@apache.org on 2006/11/01 04:21:38 UTC
svn commit: r469768 - in /directory/trunks/apacheds/mitosis/src:
main/java/org/apache/directory/mitosis/common/
main/java/org/apache/directory/mitosis/operation/
main/java/org/apache/directory/mitosis/service/
main/java/org/apache/directory/mitosis/ser...
Author: trustin
Date: Tue Oct 31 19:21:38 2006
New Revision: 469768
URL: http://svn.apache.org/viewvc?view=rev&rev=469768
Log:
* Fixed compilation warnings
Modified:
directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/common/SimpleCSN.java
directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddEntryOperation.java
directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java
directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java
directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java
directory/trunks/apacheds/mitosis/src/test/java/org/apache/directory/mitosis/store/derby/DerbyReplicationStoreTest.java
Modified: directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/common/SimpleCSN.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/common/SimpleCSN.java?view=diff&rev=469768&r1=469767&r2=469768
==============================================================================
--- directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/common/SimpleCSN.java (original)
+++ directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/common/SimpleCSN.java Tue Oct 31 19:21:38 2006
@@ -130,10 +130,10 @@
((long)(value[1] & 0x00FF) << 48) |
((long)(value[2] & 0x00FF) << 40) |
((long)(value[3] & 0x00FF) << 32) |
- ((long)(value[4] << 24) & 0x00000000FF000000L) |
- ((long)(value[5] << 16) & 0x0000000000FF0000L) |
- ((long)(value[6] << 8) & 0x000000000000FF00L) |
- ((long)value[7] & 0x00000000000000FFL);
+ ((value[4] << 24) & 0x00000000FF000000L) |
+ ((value[5] << 16) & 0x0000000000FF0000L) |
+ ((value[6] << 8) & 0x000000000000FF00L) |
+ (value[7] & 0x00000000000000FFL);
operationSequence = ((value[8] & 0x00FF) << 24) +
((value[9] & 0x00FF) << 16) +
Modified: directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddEntryOperation.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddEntryOperation.java?view=diff&rev=469768&r1=469767&r2=469768
==============================================================================
--- directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddEntryOperation.java (original)
+++ directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddEntryOperation.java Tue Oct 31 19:21:38 2006
@@ -26,12 +26,12 @@
import javax.naming.directory.Attributes;
import javax.naming.directory.DirContext;
-import org.apache.directory.server.core.partition.PartitionNexus;
-import org.apache.directory.shared.ldap.name.LdapDN;
-import org.apache.directory.shared.ldap.util.NamespaceTools;
import org.apache.directory.mitosis.common.CSN;
import org.apache.directory.mitosis.operation.support.EntryUtil;
import org.apache.directory.mitosis.store.ReplicationStore;
+import org.apache.directory.server.core.partition.PartitionNexus;
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.util.NamespaceTools;
/**
* An {@link Operation} that adds a new entry.
@@ -43,7 +43,6 @@
private static final long serialVersionUID = 2294492811671880570L;
private final Name normalizedName;
- private final String userProvidedName;
private final Attributes entry;
/**
@@ -51,16 +50,14 @@
*
* @param entry an entry
*/
- public AddEntryOperation( CSN csn, Name normalizedName, String userProvidedName, Attributes entry )
+ public AddEntryOperation( CSN csn, Name normalizedName, Attributes entry )
{
super( csn );
assert normalizedName != null;
- assert userProvidedName != null;
assert entry != null;
this.normalizedName = normalizedName;
- this.userProvidedName = userProvidedName;
this.entry = ( Attributes ) entry.clone();
}
@@ -71,11 +68,11 @@
protected void execute0( PartitionNexus nexus, ReplicationStore store ) throws NamingException
{
- if( !EntryUtil.isEntryUpdatable( nexus, (LdapDN)normalizedName, getCSN() ) )
+ if( !EntryUtil.isEntryUpdatable( nexus, normalizedName, getCSN() ) )
{
return;
}
- EntryUtil.createGlueEntries( nexus, (LdapDN)normalizedName, false );
+ EntryUtil.createGlueEntries( nexus, normalizedName, false );
// Replace the entry if an entry with the same name exists.
Attributes oldEntry = nexus.lookup( (LdapDN)normalizedName );
Modified: directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java?view=diff&rev=469768&r1=469767&r2=469768
==============================================================================
--- directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java (original)
+++ directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java Tue Oct 31 19:21:38 2006
@@ -68,12 +68,12 @@
this.csnFactory = cfg.getCsnFactory();
}
- public Operation newAdd( String userProvidedName, Name normalizedName, Attributes entry ) throws NamingException
+ public Operation newAdd( Name normalizedName, Attributes entry ) throws NamingException
{
- return newAdd( newCSN(), userProvidedName, normalizedName, entry );
+ return newAdd( newCSN(), normalizedName, entry );
}
- private Operation newAdd( CSN csn, String userProvidedName, Name normalizedName, Attributes entry ) throws NamingException
+ private Operation newAdd( CSN csn, Name normalizedName, Attributes entry ) throws NamingException
{
// Check an entry already exists.
checkBeforeAdd( normalizedName );
@@ -92,7 +92,7 @@
// MODIFY operation)
entry.put( Constants.ENTRY_CSN, csn.toOctetString() );
- result.add( new AddEntryOperation( csn, normalizedName, userProvidedName, entry ) );
+ result.add( new AddEntryOperation( csn, normalizedName, entry ) );
return result;
}
@@ -247,7 +247,7 @@
// Add the new entry
//// FIXME Get UPDN somehow
- result.add( newAdd( csn, newEntryName.toString(), newEntryName, entry ) );
+ result.add( newAdd( csn, newEntryName, entry ) );
// Add default operations to the old entry.
// Please note that newAdd() already added default operations
Modified: directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java?view=diff&rev=469768&r1=469767&r2=469768
==============================================================================
--- directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java (original)
+++ directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java Tue Oct 31 19:21:38 2006
@@ -277,43 +277,43 @@
}
}
- public void add( NextInterceptor nextInterceptor, String userProvidedName, Name normalizedName, Attributes entry ) throws NamingException
+ public void add( NextInterceptor nextInterceptor, LdapDN normalizedName, Attributes entry ) throws NamingException
{
- Operation op = operationFactory.newAdd( userProvidedName, normalizedName, entry );
+ Operation op = operationFactory.newAdd( normalizedName, entry );
op.execute( nexus, store );
}
- public void delete( NextInterceptor nextInterceptor, Name name ) throws NamingException
+ public void delete( NextInterceptor nextInterceptor, LdapDN name ) throws NamingException
{
Operation op = operationFactory.newDelete( name );
op.execute( nexus, store );
}
- public void modify( NextInterceptor next, Name name, int modOp, Attributes attrs ) throws NamingException
+ public void modify( NextInterceptor next, LdapDN name, int modOp, Attributes attrs ) throws NamingException
{
Operation op = operationFactory.newModify( name, modOp, attrs );
op.execute( nexus, store );
}
- public void modify( NextInterceptor next, Name name, ModificationItem[] items ) throws NamingException
+ public void modify( NextInterceptor next, LdapDN name, ModificationItem[] items ) throws NamingException
{
Operation op = operationFactory.newModify( name, items );
op.execute( nexus, store );
}
- public void modifyRn( NextInterceptor next, Name oldName, String newRDN, boolean deleteOldRDN ) throws NamingException
+ public void modifyRn( NextInterceptor next, LdapDN oldName, String newRDN, boolean deleteOldRDN ) throws NamingException
{
Operation op = operationFactory.newModifyRn( oldName, newRDN, deleteOldRDN );
op.execute( nexus, store );
}
- public void move( NextInterceptor next, Name oldName, Name newParentName, String newRDN, boolean deleteOldRDN ) throws NamingException
+ public void move( NextInterceptor next, LdapDN oldName, LdapDN newParentName, String newRDN, boolean deleteOldRDN ) throws NamingException
{
Operation op = operationFactory.newMove( oldName, newParentName, newRDN, deleteOldRDN );
op.execute( nexus, store );
}
- public void move( NextInterceptor next, Name oldName, Name newParentName ) throws NamingException
+ public void move( NextInterceptor next, LdapDN oldName, LdapDN newParentName ) throws NamingException
{
Operation op = operationFactory.newMove( oldName, newParentName );
op.execute( nexus, store );
Modified: directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java?view=diff&rev=469768&r1=469767&r2=469768
==============================================================================
--- directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java (original)
+++ directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java Tue Oct 31 19:21:38 2006
@@ -343,7 +343,7 @@
// Convert the entry into AddEntryOperation log.
Operation op = new AddEntryOperation(
csn,
- new LdapDN( sr.getName() ), sr.getName(), attrs );
+ new LdapDN( sr.getName() ), attrs );
// Send a LogEntry message for the entry.
ctx.getSession().write( new LogEntryMessage( ctx.getNextSequence(), op ) );
Modified: directory/trunks/apacheds/mitosis/src/test/java/org/apache/directory/mitosis/store/derby/DerbyReplicationStoreTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/mitosis/src/test/java/org/apache/directory/mitosis/store/derby/DerbyReplicationStoreTest.java?view=diff&rev=469768&r1=469767&r2=469768
==============================================================================
--- directory/trunks/apacheds/mitosis/src/test/java/org/apache/directory/mitosis/store/derby/DerbyReplicationStoreTest.java (original)
+++ directory/trunks/apacheds/mitosis/src/test/java/org/apache/directory/mitosis/store/derby/DerbyReplicationStoreTest.java Tue Oct 31 19:21:38 2006
@@ -177,7 +177,7 @@
{
CSN csn = csnFactory.newInstance( REPLICA_ID );
CompositeOperation op1 = new CompositeOperation( csn );
- op1.add( new AddEntryOperation( csn, new LdapName( "ou=a" ), "ou=a", new BasicAttributes() ) );
+ op1.add( new AddEntryOperation( csn, new LdapName( "ou=a" ), new BasicAttributes() ) );
op1.add( new AddAttributeOperation( csn, new LdapName( "ou=a" ), new BasicAttribute( "id", "valie" ) ) );
op1.add( new ReplaceAttributeOperation( csn, new LdapName( "ou=a" ), new BasicAttribute( "id", "valie" ) ) );
op1.add( new DeleteAttributeOperation( csn, new LdapName( "ou=a" ), new BasicAttribute( "id", "valie" ) ) );
@@ -187,7 +187,7 @@
csn = csnFactory.newInstance( OTHER_REPLICA_ID );
CompositeOperation op2 = new CompositeOperation( csn );
- op2.add( new AddEntryOperation( csn, new LdapName( "ou=a" ), "ou=a", new BasicAttributes() ) );
+ op2.add( new AddEntryOperation( csn, new LdapName( "ou=a" ), new BasicAttributes() ) );
op2.add( new AddAttributeOperation( csn, new LdapName( "ou=a" ), new BasicAttribute( "id", "valie" ) ) );
op2.add( new ReplaceAttributeOperation( csn, new LdapName( "ou=a" ), new BasicAttribute( "id", "valie" ) ) );
op2.add( new DeleteAttributeOperation( csn, new LdapName( "ou=a" ), new BasicAttribute( "id", "valie" ) ) );