You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by se...@apache.org on 2010/11/06 15:24:14 UTC
svn commit: r1032070 - in /directory/sandbox/studio-persistence-tooling: ./
persistence-core/
persistence-core/src/main/java/org/apache/directory/studio/persistence/core/
persistence-core/src/test/java/org/apache/directory/studio/persistence/core/
pers...
Author: seelmann
Date: Sat Nov 6 14:24:13 2010
New Revision: 1032070
URL: http://svn.apache.org/viewvc?rev=1032070&view=rev
Log:
DIRSTUDIO-700 (Update dependencies to studio trunk): Applied patch from Kasun Lakpriya
Modified:
directory/sandbox/studio-persistence-tooling/persistence-core/pom.xml
directory/sandbox/studio-persistence-tooling/persistence-core/src/main/java/org/apache/directory/studio/persistence/core/LdapEntryAnalyzer.java
directory/sandbox/studio-persistence-tooling/persistence-core/src/main/java/org/apache/directory/studio/persistence/core/SchemaUtils2.java
directory/sandbox/studio-persistence-tooling/persistence-core/src/test/java/org/apache/directory/studio/persistence/core/CodeGenIntegrationTest.java
directory/sandbox/studio-persistence-tooling/persistence-core/src/test/java/org/apache/directory/studio/persistence/core/LdapEntryAnalyzerTest.java
directory/sandbox/studio-persistence-tooling/persistence-core/src/test/java/org/apache/directory/studio/persistence/core/SchemaUtilsTest.java
directory/sandbox/studio-persistence-tooling/persistence-ui/pom.xml
directory/sandbox/studio-persistence-tooling/pom.xml
Modified: directory/sandbox/studio-persistence-tooling/persistence-core/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/studio-persistence-tooling/persistence-core/pom.xml?rev=1032070&r1=1032069&r2=1032070&view=diff
==============================================================================
--- directory/sandbox/studio-persistence-tooling/persistence-core/pom.xml (original)
+++ directory/sandbox/studio-persistence-tooling/persistence-core/pom.xml Sat Nov 6 14:24:13 2010
@@ -110,9 +110,10 @@
<Bundle-Activator>org.apache.directory.studio.persistence.core.Activator</Bundle-Activator>
<Require-Bundle>org.eclipse.core.runtime,
org.eclipse.search,
- org.apache.directory.studio.jars,
org.apache.directory.studio.ldifparser,
org.apache.directory.studio.connection.core,
+ org.apache.directory.studio.common.core,
+ org.apache.directory.shared.ldap,
org.apache.directory.studio.ldapbrowser.core
</Require-Bundle>
<Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
@@ -144,10 +145,11 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>jars</artifactId>
+ <groupId>org.apache.directory.shared</groupId>
+ <artifactId>shared-ldap</artifactId>
<scope>provided</scope>
</dependency>
+
<dependency>
<groupId>org.apache.directory.studio</groupId>
<artifactId>ldifparser</artifactId>
@@ -158,6 +160,11 @@
<artifactId>connection.core</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.directory.studio</groupId>
+ <artifactId>common.core</artifactId>
+ <scope>provided</scope>
+ </dependency>
<!-- Eclipse plugins dependencies -->
<dependency>
@@ -210,5 +217,25 @@
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.directory.studio</groupId>
+ <artifactId>org.slf4j.log4j12</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.directory.studio</groupId>
+ <artifactId>org.apache.logging.log4j</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.5</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>3.2.1</version>
+ </dependency>
</dependencies>
</project>
Modified: directory/sandbox/studio-persistence-tooling/persistence-core/src/main/java/org/apache/directory/studio/persistence/core/LdapEntryAnalyzer.java
URL: http://svn.apache.org/viewvc/directory/sandbox/studio-persistence-tooling/persistence-core/src/main/java/org/apache/directory/studio/persistence/core/LdapEntryAnalyzer.java?rev=1032070&r1=1032069&r2=1032070&view=diff
==============================================================================
--- directory/sandbox/studio-persistence-tooling/persistence-core/src/main/java/org/apache/directory/studio/persistence/core/LdapEntryAnalyzer.java (original)
+++ directory/sandbox/studio-persistence-tooling/persistence-core/src/main/java/org/apache/directory/studio/persistence/core/LdapEntryAnalyzer.java Sat Nov 6 14:24:13 2010
@@ -27,10 +27,10 @@ import java.util.Collections;
import java.util.List;
import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.name.LdapDN;
-import org.apache.directory.shared.ldap.name.Rdn;
-import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription;
-import org.apache.directory.shared.ldap.schema.parsers.ObjectClassDescription;
+import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.RDN;
+import org.apache.directory.shared.ldap.schema.AttributeType;
+import org.apache.directory.shared.ldap.schema.ObjectClass;
import org.apache.directory.studio.connection.core.DnUtils;
import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
@@ -39,30 +39,33 @@ import org.apache.directory.studio.ldapb
/**
* TODO LdapEntryAnalyzer.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory
+ * Project</a>
*/
public class LdapEntryAnalyzer
{
/**
- * Analyze the entry and set all the values to a
+ * Analyze the entry and set all the values to a
+ *
* @CodeGeneratorContext object
*
- *
- * @param entry the entry to be analyzed
+ *
+ * @param entry
+ * the entry to be analyzed
* @return CodeGeneratorContext with all required values injected
*/
public CodeGeneratorContext analyze( IEntry entry )
{
CodeGeneratorContext codeGeneratorContext = new CodeGeneratorContext();
- Collection<ObjectClassDescription> ocds = entry.getObjectClassDescriptions();
+ Collection<ObjectClass> ocds = entry.getObjectClassDescriptions();
Schema schema = entry.getBrowserConnection().getSchema();
String packageName = computePackageName( entry.getDn() );
codeGeneratorContext.setPackageName( packageName );
- ObjectClassDescription strucObjClass = SchemaUtils2.getStructuralObjectClass( ocds, schema );
+ ObjectClass strucObjClass = SchemaUtils2.getStructuralObjectClass( ocds, schema );
String className = getClassName( strucObjClass );
codeGeneratorContext.setClassName( className );
@@ -72,7 +75,7 @@ public class LdapEntryAnalyzer
codeGeneratorContext.setPort( entry.getBrowserConnection().getConnection().getPort() );
codeGeneratorContext.setBindDn( entry.getBrowserConnection().getConnection().getBindPrincipal() );
List<String> objClasses = new ArrayList<String>();
- for ( ObjectClassDescription ocd : ocds )
+ for ( ObjectClass ocd : ocds )
{
objClasses.add( ocd.getNames().get( 0 ) );
}
@@ -87,7 +90,7 @@ public class LdapEntryAnalyzer
Collection<String> attributes = extractAttributes( ocds, schema );
for ( String attrib : attributes )
{
- AttributeTypeDescription atd = schema.getAttributeTypeDescription( attrib );
+ AttributeType atd = schema.getAttributeTypeDescription( attrib );
EntryProperties entryProperties = new EntryProperties();
entryProperties.setLdapAttributeName( attrib );
entryProperties.setJavaMemberName( attrib );
@@ -105,12 +108,15 @@ public class LdapEntryAnalyzer
/**
* Compute the Java type according to the syntax oid of the attribute
- *
- * @param atd the attribute type description of the attribute of the selected entry
- * @param schema the schema of the entry
- * @return the Java type of the attribute
+ *
+ * @param atd
+ * the attribute type description of the attribute of the
+ * selected entry
+ * @param schema
+ * the schema of the entry
+ * @return the Java type of the attribute
*/
- public static JavaType getJavaType( AttributeTypeDescription atd, Schema schema )
+ public static JavaType getJavaType( AttributeType atd, Schema schema )
{
String syntaxOid = SchemaUtils.getSyntaxNumericOidTransitive( atd, schema );
boolean isBinary = SchemaUtils.isBinary( atd, schema );
@@ -137,16 +143,20 @@ public class LdapEntryAnalyzer
}
}
+
/**
* Compute the cardinality of the given attribute
- *
- * @param atd the attribute type description of the attribute of the selected entry
- * @param ocds the Object Class Descriptions of the entry
- * @param schema the schema of the entry
+ *
+ * @param atd
+ * the attribute type description of the attribute of the
+ * selected entry
+ * @param ocds
+ * the Object Class Descriptions of the entry
+ * @param schema
+ * the schema of the entry
* @return the cardinality of the attribute
*/
- public static Cardinality getCardinality( AttributeTypeDescription atd, Collection<ObjectClassDescription> ocds,
- Schema schema )
+ public static Cardinality getCardinality( AttributeType atd, Collection<ObjectClass> ocds, Schema schema )
{
boolean isLowerBoundOne = SchemaUtils2.isMustAttribute( atd, ocds, schema );
boolean isUpperBoundOne = atd.isSingleValued();
@@ -164,7 +174,7 @@ public class LdapEntryAnalyzer
return Cardinality.ZERO_OR_ONE;
}
else
- //if(!isLowerBoundOne && !isUpperBoundOne)
+ // if(!isLowerBoundOne && !isUpperBoundOne)
{
return Cardinality.ZERO_OR_MANY_SET;
}
@@ -180,14 +190,15 @@ public class LdapEntryAnalyzer
/**
- * Computes the default package name for an DN. The package name is
- * composed of all RDN values of the DN's parent. If the given DN or
- * it's parent is null or empty the empty string is returned.
- *
- * @param dn the DN
+ * Computes the default package name for an DN. The package name is composed
+ * of all RDN values of the DN's parent. If the given DN or it's parent is
+ * null or empty the empty string is returned.
+ *
+ * @param dn
+ * the DN
* @return the computed package name
*/
- public static String computePackageName( LdapDN dn )
+ public static String computePackageName( DN dn )
{
if ( dn == null || dn.isEmpty() )
{
@@ -195,19 +206,20 @@ public class LdapEntryAnalyzer
}
// get the parent DN
- LdapDN parentDn = DnUtils.getParent( dn );
+ DN parentDn = DnUtils.getParent( dn );
if ( parentDn == null || parentDn.isEmpty() )
{
return "";
}
// now concatenate all RDN values to the package name
- List<Rdn> rdns = parentDn.getRdns();
+ List<RDN> tempRdns = parentDn.getRdns();
+ List<RDN> rdns = new ArrayList<RDN>( tempRdns );
Collections.reverse( rdns );
String packageName = "";
- for ( Rdn rdn : rdns )
+ for ( RDN rdn : rdns )
{
- String rdnVal = rdn.getUpValue();
+ String rdnVal = rdn.getUpValue().toString();
String validValue = JavaUtils.getValidValue( rdnVal );
packageName += "." + validValue.toString().toLowerCase();
}
@@ -216,14 +228,15 @@ public class LdapEntryAnalyzer
/**
- * Computes the class name for the bean class to be generated from
+ * Computes the class name for the bean class to be generated from
* structural object class of the given entry
- *
- * @param strucObjClass structural object class of the given entry
- * @return the structural object class as the name of the bean class
- * to be generated with first letter capitalized
+ *
+ * @param strucObjClass
+ * structural object class of the given entry
+ * @return the structural object class as the name of the bean class to be
+ * generated with first letter capitalized
*/
- public static String getClassName( ObjectClassDescription strucObjClass )
+ public static String getClassName( ObjectClass strucObjClass )
{
String objClassName = strucObjClass.getNames().get( 0 );
return firstToUpperCase( JavaUtils.getValidValue( objClassName ) );
@@ -233,12 +246,14 @@ public class LdapEntryAnalyzer
/**
* Extracts the attributes for an entry from its object class descriptions
* and the schema
- *
- * @param ocd Object class descriptions of the given entry
- * @param schema the schema of the entry
+ *
+ * @param ocd
+ * Object class descriptions of the given entry
+ * @param schema
+ * the schema of the entry
* @return all the attributes of the entry
*/
- public static Collection<String> extractAttributes( Collection<ObjectClassDescription> ocd, Schema schema )
+ public static Collection<String> extractAttributes( Collection<ObjectClass> ocd, Schema schema )
{
List<String> attributes = new ArrayList<String>();
attributes.addAll( SchemaUtils2.getAllAttributes( ocd, schema ) );
Modified: directory/sandbox/studio-persistence-tooling/persistence-core/src/main/java/org/apache/directory/studio/persistence/core/SchemaUtils2.java
URL: http://svn.apache.org/viewvc/directory/sandbox/studio-persistence-tooling/persistence-core/src/main/java/org/apache/directory/studio/persistence/core/SchemaUtils2.java?rev=1032070&r1=1032069&r2=1032070&view=diff
==============================================================================
--- directory/sandbox/studio-persistence-tooling/persistence-core/src/main/java/org/apache/directory/studio/persistence/core/SchemaUtils2.java (original)
+++ directory/sandbox/studio-persistence-tooling/persistence-core/src/main/java/org/apache/directory/studio/persistence/core/SchemaUtils2.java Sat Nov 6 14:24:13 2010
@@ -27,17 +27,18 @@ import java.util.HashSet;
import java.util.List;
import org.apache.directory.shared.ldap.schema.ObjectClassTypeEnum;
-import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription;
-import org.apache.directory.shared.ldap.schema.parsers.ObjectClassDescription;
+import org.apache.directory.shared.ldap.schema.AttributeType;
+import org.apache.directory.shared.ldap.schema.ObjectClass;
import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
/**
- * This is only a temporary utils class, should be merged into
+ * This is only a temporary utils class, should be merged into
* org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory
+ * Project</a>
*/
public class SchemaUtils2
{
@@ -62,19 +63,19 @@ public class SchemaUtils2
* when the object class description list contains values which are not in the same
* superclass chain
*/
- public static ObjectClassDescription getStructuralObjectClass( Collection<ObjectClassDescription> ocds, Schema schema )
+ public static ObjectClass getStructuralObjectClass( Collection<ObjectClass> ocds, Schema schema )
throws IllegalArgumentException
{
if ( ocds == null || ocds.isEmpty() )
{
throw new IllegalArgumentException();
}
- List<ObjectClassDescription> strucObjClasses = new ArrayList<ObjectClassDescription>();
- List<ObjectClassDescription> superiorObjClasses = new ArrayList<ObjectClassDescription>();
- ObjectClassDescription specificObjectClass;
- for ( ObjectClassDescription objClassDesc : ocds )
+ List<ObjectClass> strucObjClasses = new ArrayList<ObjectClass>();
+ List<ObjectClass> superiorObjClasses = new ArrayList<ObjectClass>();
+ ObjectClass specificObjectClass;
+ for ( ObjectClass objClassDesc : ocds )
{
- if ( objClassDesc.getKind().equals( ObjectClassTypeEnum.STRUCTURAL ) )
+ if ( objClassDesc.getType().equals( ObjectClassTypeEnum.STRUCTURAL ) )
{
strucObjClasses.add( objClassDesc );
}
@@ -86,7 +87,7 @@ public class SchemaUtils2
throw new IllegalArgumentException();
}
- for ( ObjectClassDescription objClass : superiorObjClasses )
+ for ( ObjectClass objClass : superiorObjClasses )
{
if ( strucObjClasses.contains( objClass ) )
{
@@ -96,7 +97,7 @@ public class SchemaUtils2
specificObjectClass = strucObjClasses.get( 0 );
strucObjClasses.remove( 0 );
- if ( specificObjectClass.getSuperiorObjectClasses().containsAll( strucObjClasses ) )
+ if ( specificObjectClass.getSuperiors().containsAll( strucObjClasses ) )
{
return specificObjectClass;
}
@@ -111,18 +112,21 @@ public class SchemaUtils2
/**
* Gets the attributes of all given object class descriptions including all
* attributes of all superior object class descriptions (transitively).
- *
- * @param ocds the object class descriptions
- * @param schema the schema
+ *
+ * @param ocds
+ * the object class descriptions
+ * @param schema
+ * the schema
* @return the list of all attributes
*/
- public static Collection<String> getAllAttributes( Collection<ObjectClassDescription> ocds, Schema schema )
+ public static Collection<String> getAllAttributes( Collection<ObjectClass> ocds, Schema schema )
{
- // Use a hash set here because the same attribute can be defined in different object classes
+ // Use a hash set here because the same attribute can be defined in
+ // different object classes
// and we don't want duplicate attributes.
Collection<String> attributes = new HashSet<String>();
- for ( ObjectClassDescription ocd : ocds )
+ for ( ObjectClass ocd : ocds )
{
Collection<String> mayAttributes = SchemaUtils.getMayAttributeTypeDescriptionNamesTransitive( ocd, schema );
Collection<String> mustAttributes = SchemaUtils
@@ -136,29 +140,32 @@ public class SchemaUtils2
/**
- * Checks if the given attribute type is defined as MUST attribute in one of the
- * object classes.
- *
- * @param atd the attribute type description
- * @param ocds the object class descriptions
- * @param schema the schema
- * @return true if the attribute is defined as MUST in one of the object classes
+ * Checks if the given attribute type is defined as MUST attribute in one of
+ * the object classes.
+ *
+ * @param atd
+ * the attribute type description
+ * @param ocds
+ * the object class descriptions
+ * @param schema
+ * the schema
+ * @return true if the attribute is defined as MUST in one of the object
+ * classes
*/
- public static boolean isMustAttribute( AttributeTypeDescription atd, Collection<ObjectClassDescription> ocds,
- Schema schema )
+ public static boolean isMustAttribute( AttributeType atd, Collection<ObjectClass> ocds, Schema schema )
{
if ( atd == null || ocds == null || schema == null )
{
throw new IllegalArgumentException();
}
- for ( ObjectClassDescription ocd : ocds )
+ for ( ObjectClass ocd : ocds )
{
Collection<String> musts = SchemaUtils.getMustAttributeTypeDescriptionNamesTransitive( ocd, schema );
for ( String must : musts )
{
- AttributeTypeDescription mustAtd = schema.getAttributeTypeDescription( must );
- if ( atd.getNumericOid().equals( mustAtd.getNumericOid() ) )
+ AttributeType mustAtd = schema.getAttributeTypeDescription( must );
+ if ( atd.getOid().equals( mustAtd.getOid() ) )
{
return true;
}
Modified: directory/sandbox/studio-persistence-tooling/persistence-core/src/test/java/org/apache/directory/studio/persistence/core/CodeGenIntegrationTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/studio-persistence-tooling/persistence-core/src/test/java/org/apache/directory/studio/persistence/core/CodeGenIntegrationTest.java?rev=1032070&r1=1032069&r2=1032070&view=diff
==============================================================================
--- directory/sandbox/studio-persistence-tooling/persistence-core/src/test/java/org/apache/directory/studio/persistence/core/CodeGenIntegrationTest.java (original)
+++ directory/sandbox/studio-persistence-tooling/persistence-core/src/test/java/org/apache/directory/studio/persistence/core/CodeGenIntegrationTest.java Sat Nov 6 14:24:13 2010
@@ -35,6 +35,7 @@ import java.util.ArrayList;
import java.util.List;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Test;
@@ -74,12 +75,12 @@ public class CodeGenIntegrationTest
entryProperties_1.setJavaType( JavaType.STRING );
entryProperties_1.setLdapAttributeName( "attrib_1" );
- //adding EntryProperties object to List<EntryProperties>
+ // adding EntryProperties object to List<EntryProperties>
entryProperties = new ArrayList<EntryProperties>();
entryProperties.add( entryProperties_0 );
entryProperties.add( entryProperties_1 );
- //setting up CodeGeneratorContext object
+ // setting up CodeGeneratorContext object
generatorContext = new CodeGeneratorContext();
generatorContext.setClassName( "TesterClass" );
generatorContext.setPackageName( packageName );
@@ -99,6 +100,7 @@ public class CodeGenIntegrationTest
}
+ @Ignore
@Test
public void integrationTest() throws IOException
{
Modified: directory/sandbox/studio-persistence-tooling/persistence-core/src/test/java/org/apache/directory/studio/persistence/core/LdapEntryAnalyzerTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/studio-persistence-tooling/persistence-core/src/test/java/org/apache/directory/studio/persistence/core/LdapEntryAnalyzerTest.java?rev=1032070&r1=1032069&r2=1032070&view=diff
==============================================================================
--- directory/sandbox/studio-persistence-tooling/persistence-core/src/test/java/org/apache/directory/studio/persistence/core/LdapEntryAnalyzerTest.java (original)
+++ directory/sandbox/studio-persistence-tooling/persistence-core/src/test/java/org/apache/directory/studio/persistence/core/LdapEntryAnalyzerTest.java Sat Nov 6 14:24:13 2010
@@ -32,13 +32,13 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
-import javax.naming.InvalidNameException;
+import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.name.LdapDN;
-import org.apache.directory.shared.ldap.name.Rdn;
-import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription;
-import org.apache.directory.shared.ldap.schema.parsers.ObjectClassDescription;
+import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.RDN;
+import org.apache.directory.shared.ldap.schema.AttributeType;
+import org.apache.directory.shared.ldap.schema.ObjectClass;
import org.apache.directory.studio.connection.core.Connection;
import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
import org.apache.directory.studio.ldapbrowser.core.BrowserCorePreferences;
@@ -54,8 +54,9 @@ import org.powermock.modules.junit4.Powe
/**
* TODO LdapEntryAnalyzerTest.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory
+ * Project</a>
*/
@RunWith(PowerMockRunner.class)
@PrepareForTest(BrowserCorePlugin.class)
@@ -94,7 +95,7 @@ public class LdapEntryAnalyzerTest
@Test
public void testGetClassName_1()
{
- ObjectClassDescription ocd = Schema.DEFAULT_SCHEMA.getObjectClassDescription( "inetOrgPerson" );
+ ObjectClass ocd = Schema.DEFAULT_SCHEMA.getObjectClassDescription( "inetOrgPerson" );
String actualTestValue = LdapEntryAnalyzer.getClassName( ocd );
assertEquals( "InetOrgPerson", actualTestValue );
}
@@ -103,7 +104,7 @@ public class LdapEntryAnalyzerTest
@Test
public void testGetClassName_3()
{
- ObjectClassDescription ocd = Schema.DEFAULT_SCHEMA.getObjectClassDescription( "RFC822localPart" );
+ ObjectClass ocd = Schema.DEFAULT_SCHEMA.getObjectClassDescription( "RFC822localPart" );
String actualTestValue = LdapEntryAnalyzer.getClassName( ocd );
assertEquals( "RFC822localPart", actualTestValue );
}
@@ -112,8 +113,9 @@ public class LdapEntryAnalyzerTest
@Test
public void testGetClassName_2()
{
- // expect non java identifiers (e.g.e the "dash") is removed and the first character is capitalized
- ObjectClassDescription ocd = Schema.DEFAULT_SCHEMA.getObjectClassDescription( "certificationAuthority-V2" );
+ // expect non java identifiers (e.g.e the "dash") is removed and the
+ // first character is capitalized
+ ObjectClass ocd = Schema.DEFAULT_SCHEMA.getObjectClassDescription( "certificationAuthority-V2" );
String actualTestValue = LdapEntryAnalyzer.getClassName( ocd );
assertEquals( "CertificationAuthorityV2", actualTestValue );
}
@@ -122,50 +124,51 @@ public class LdapEntryAnalyzerTest
@Test
public void testComputePackageName_0()
{
- String actualPackageName = LdapEntryAnalyzer.computePackageName( LdapDN.EMPTY_LDAPDN );
+ String actualPackageName = LdapEntryAnalyzer.computePackageName( DN.EMPTY_DN );
assertEquals( "", actualPackageName );
}
@Test
- public void testComputePackageName_1() throws InvalidNameException
+ public void testComputePackageName_1() throws LdapInvalidDnException
{
- LdapDN dn = new LdapDN( "ou=system" );
+ DN dn = new DN( "ou=system" );
String actualPackageName = LdapEntryAnalyzer.computePackageName( dn );
assertEquals( "", actualPackageName );
}
@Test
- public void testComputePackageName_2() throws InvalidNameException
+ public void testComputePackageName_2() throws LdapInvalidDnException
{
- LdapDN dn = new LdapDN( "uid=admin,ou=system" );
+ DN dn = new DN( "uid=admin,ou=system" );
String actualPackageName = LdapEntryAnalyzer.computePackageName( dn );
assertEquals( "system", actualPackageName );
}
@Test
- public void testComputePackageName_3() throws InvalidNameException
+ public void testComputePackageName_3() throws LdapInvalidDnException
{
- LdapDN dn = new LdapDN( "cn=Foo Bar , dc=example , dc=com" );
+ DN dn = new DN( "cn=Foo Bar,dc=example , dc=com" );
String actualPackageName = LdapEntryAnalyzer.computePackageName( dn );
assertEquals( "com.example", actualPackageName );
}
@Test
- public void testComputePackageName_4() throws InvalidNameException
+ public void testComputePackageName_4() throws LdapInvalidDnException
{
- // expect that non java identifiers are removed and the package name is lower cased
- LdapDN dn = new LdapDN( " cn = Foo Bar , ou = External Users , dc = example , dc = com " );
+ // expect that non java identifiers are removed and the package name is
+ // lower cased
+ DN dn = new DN( " cn = Foo Bar , ou = External Users , dc = example , dc = com " );
String actualPackageName = LdapEntryAnalyzer.computePackageName( dn );
assertEquals( "com.example.externalusers", actualPackageName );
}
@Test
- public void testAnalyze_1() throws InvalidNameException
+ public void testAnalyze_1() throws LdapInvalidDnException
{
// setup an entry
Connection connection = mock( Connection.class );
@@ -180,10 +183,10 @@ public class LdapEntryAnalyzerTest
IEntry entry = mock( IEntry.class );
when( entry.getBrowserConnection() ).thenReturn( browserConnection );
- when( entry.getDn() ).thenReturn( new LdapDN( "uid=foobar,ou=users,dc=example,dc=com" ) );
- when( entry.getRdn() ).thenReturn( new Rdn( "uid=foobar" ) );
+ when( entry.getDn() ).thenReturn( new DN( "uid=foobar,ou=users,dc=example,dc=com" ) );
+ when( entry.getRdn() ).thenReturn( new RDN( "uid=foobar" ) );
- Collection<ObjectClassDescription> ocds = new HashSet<ObjectClassDescription>();
+ Collection<ObjectClass> ocds = new HashSet<ObjectClass>();
ocds.add( Schema.DEFAULT_SCHEMA.getObjectClassDescription( "top" ) );
ocds.add( Schema.DEFAULT_SCHEMA.getObjectClassDescription( "person" ) );
ocds.add( Schema.DEFAULT_SCHEMA.getObjectClassDescription( "organizationalPerson" ) );
@@ -207,13 +210,15 @@ public class LdapEntryAnalyzerTest
List<EntryProperties> properties = ctx.getEntryProperties();
assertNotNull( properties );
- assertEquals( 50, properties.size() ); // inetOrgPerson object class chain defines 51 attributes
+ assertEquals( 50, properties.size() ); // inetOrgPerson object class chain
+ // defines 51 attributes
for ( EntryProperties property : properties )
{
// TODO: assert properties
- //assertTrue(property.isGen());
- //property.getJavaType();
- //assertTrue(property.getLdapAttributeName().equals( property.getJavaMemberName() ));
+ // assertTrue(property.isGen());
+ // property.getJavaType();
+ // assertTrue(property.getLdapAttributeName().equals(
+ // property.getJavaMemberName() ));
}
}
@@ -221,7 +226,7 @@ public class LdapEntryAnalyzerTest
@Test
public void testGetJavaType_1()
{
- AttributeTypeDescription atd = Schema.DEFAULT_SCHEMA.getAttributeTypeDescription( "supportedLDAPVersion" );
+ AttributeType atd = Schema.DEFAULT_SCHEMA.getAttributeTypeDescription( "supportedLDAPVersion" );
JavaType javaType = LdapEntryAnalyzer.getJavaType( atd, Schema.DEFAULT_SCHEMA );
assertEquals( JavaType.INT, javaType );
}
@@ -230,7 +235,7 @@ public class LdapEntryAnalyzerTest
@Test
public void testGetJavaType_2()
{
- AttributeTypeDescription atd = Schema.DEFAULT_SCHEMA.getAttributeTypeDescription( "hasSubordinates" );
+ AttributeType atd = Schema.DEFAULT_SCHEMA.getAttributeTypeDescription( "hasSubordinates" );
JavaType javaType = LdapEntryAnalyzer.getJavaType( atd, Schema.DEFAULT_SCHEMA );
assertEquals( JavaType.BOOLEAN, javaType );
}
@@ -239,7 +244,7 @@ public class LdapEntryAnalyzerTest
@Test
public void testGetJavaType_3()
{
- AttributeTypeDescription atd = Schema.DEFAULT_SCHEMA.getAttributeTypeDescription( "modifyTimestamp" );
+ AttributeType atd = Schema.DEFAULT_SCHEMA.getAttributeTypeDescription( "modifyTimestamp" );
JavaType javaType = LdapEntryAnalyzer.getJavaType( atd, Schema.DEFAULT_SCHEMA );
assertEquals( JavaType.CALENDAR, javaType );
}
@@ -248,7 +253,7 @@ public class LdapEntryAnalyzerTest
@Test
public void testGetJavaType_4()
{
- AttributeTypeDescription atd = Schema.DEFAULT_SCHEMA.getAttributeTypeDescription( "userPassword" );
+ AttributeType atd = Schema.DEFAULT_SCHEMA.getAttributeTypeDescription( "userPassword" );
JavaType javaType = LdapEntryAnalyzer.getJavaType( atd, Schema.DEFAULT_SCHEMA );
assertEquals( JavaType.BYTE_ARRAY, javaType );
}
@@ -257,7 +262,7 @@ public class LdapEntryAnalyzerTest
@Test
public void testGetJavaType_5()
{
- AttributeTypeDescription atd = Schema.DEFAULT_SCHEMA.getAttributeTypeDescription( "cn" );
+ AttributeType atd = Schema.DEFAULT_SCHEMA.getAttributeTypeDescription( "cn" );
JavaType javaType = LdapEntryAnalyzer.getJavaType( atd, Schema.DEFAULT_SCHEMA );
assertEquals( JavaType.STRING, javaType );
}
@@ -266,8 +271,8 @@ public class LdapEntryAnalyzerTest
@Test
public void testGetCardinality()
{
- AttributeTypeDescription atd = Schema.DEFAULT_SCHEMA.getAttributeTypeDescription( "cn" );
- Collection<ObjectClassDescription> ocds = new HashSet<ObjectClassDescription>();
+ AttributeType atd = Schema.DEFAULT_SCHEMA.getAttributeTypeDescription( "cn" );
+ Collection<ObjectClass> ocds = new HashSet<ObjectClass>();
ocds.add( Schema.DEFAULT_SCHEMA.getObjectClassDescription( "inetOrgPerson" ) );
Cardinality cardinality = LdapEntryAnalyzer.getCardinality( atd, ocds, Schema.DEFAULT_SCHEMA );
assertEquals( Cardinality.ONE_OR_MANY_SET, cardinality );
@@ -277,8 +282,8 @@ public class LdapEntryAnalyzerTest
@Test
public void testGetCardinality_2()
{
- AttributeTypeDescription atd = Schema.DEFAULT_SCHEMA.getAttributeTypeDescription( "givenName" );
- Collection<ObjectClassDescription> ocds = new HashSet<ObjectClassDescription>();
+ AttributeType atd = Schema.DEFAULT_SCHEMA.getAttributeTypeDescription( "givenName" );
+ Collection<ObjectClass> ocds = new HashSet<ObjectClass>();
ocds.add( Schema.DEFAULT_SCHEMA.getObjectClassDescription( "inetOrgPerson" ) );
Cardinality cardinality = LdapEntryAnalyzer.getCardinality( atd, ocds, Schema.DEFAULT_SCHEMA );
assertEquals( Cardinality.ZERO_OR_MANY_SET, cardinality );
@@ -288,8 +293,8 @@ public class LdapEntryAnalyzerTest
@Test
public void testGetCardinality_3()
{
- AttributeTypeDescription atd = Schema.DEFAULT_SCHEMA.getAttributeTypeDescription( "aliasedObjectName" );
- Collection<ObjectClassDescription> ocds = new HashSet<ObjectClassDescription>();
+ AttributeType atd = Schema.DEFAULT_SCHEMA.getAttributeTypeDescription( "aliasedObjectName" );
+ Collection<ObjectClass> ocds = new HashSet<ObjectClass>();
ocds.add( Schema.DEFAULT_SCHEMA.getObjectClassDescription( "alias" ) );
Cardinality cardinality = LdapEntryAnalyzer.getCardinality( atd, ocds, Schema.DEFAULT_SCHEMA );
assertEquals( Cardinality.ONE, cardinality );
@@ -299,8 +304,8 @@ public class LdapEntryAnalyzerTest
@Test
public void testGetCardinality_4()
{
- AttributeTypeDescription atd = Schema.DEFAULT_SCHEMA.getAttributeTypeDescription( "displayName" );
- Collection<ObjectClassDescription> ocds = new HashSet<ObjectClassDescription>();
+ AttributeType atd = Schema.DEFAULT_SCHEMA.getAttributeTypeDescription( "displayName" );
+ Collection<ObjectClass> ocds = new HashSet<ObjectClass>();
ocds.add( Schema.DEFAULT_SCHEMA.getObjectClassDescription( "inetOrgPerson" ) );
Cardinality cardinality = LdapEntryAnalyzer.getCardinality( atd, ocds, Schema.DEFAULT_SCHEMA );
assertEquals( Cardinality.ZERO_OR_ONE, cardinality );
Modified: directory/sandbox/studio-persistence-tooling/persistence-core/src/test/java/org/apache/directory/studio/persistence/core/SchemaUtilsTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/studio-persistence-tooling/persistence-core/src/test/java/org/apache/directory/studio/persistence/core/SchemaUtilsTest.java?rev=1032070&r1=1032069&r2=1032070&view=diff
==============================================================================
--- directory/sandbox/studio-persistence-tooling/persistence-core/src/test/java/org/apache/directory/studio/persistence/core/SchemaUtilsTest.java (original)
+++ directory/sandbox/studio-persistence-tooling/persistence-core/src/test/java/org/apache/directory/studio/persistence/core/SchemaUtilsTest.java Sat Nov 6 14:24:13 2010
@@ -30,8 +30,8 @@ import java.util.Collection;
import java.util.Collections;
import java.util.List;
-import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription;
-import org.apache.directory.shared.ldap.schema.parsers.ObjectClassDescription;
+import org.apache.directory.shared.ldap.schema.AttributeType;
+import org.apache.directory.shared.ldap.schema.ObjectClass;
import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
import org.junit.Before;
import org.junit.Test;
@@ -40,101 +40,102 @@ import org.junit.Test;
/**
* TODO SchemaUtilsTest.
*
- * From RFC 4512, Section 2.4.2 (http://tools.ietf.org/html/rfc4512#section-2.4.2):
- * An object or alias entry is characterized by precisely one
- * structural object class superclass chain which has a single
- * structural object class as the most subordinate object class.
- * This structural object class is referred to as the structural
- * object class of the entry.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * From RFC 4512, Section 2.4.2
+ * (http://tools.ietf.org/html/rfc4512#section-2.4.2): An object or alias entry
+ * is characterized by precisely one structural object class superclass chain
+ * which has a single structural object class as the most subordinate object
+ * class. This structural object class is referred to as the structural object
+ * class of the entry.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory
+ * Project</a>
*/
public class SchemaUtilsTest
{
/**
- * Contains multiple structural object classes of different superclass chains.
- * That is invalid because an entry must contain exactly one structural
- * object class superclass chain.
+ * Contains multiple structural object classes of different superclass
+ * chains. That is invalid because an entry must contain exactly one
+ * structural object class superclass chain.
*/
- private List<ObjectClassDescription> ocdList1;
+ private List<ObjectClass> ocdList1;
/**
- * Contains exactly one structural object class (nisObject)
- * and the special auxiliary class extensibleObject.
+ * Contains exactly one structural object class (nisObject) and the special
+ * auxiliary class extensibleObject.
*/
- private List<ObjectClassDescription> ocdList2;
+ private List<ObjectClass> ocdList2;
/**
- * Contains exactly one structural object class (applicationEntity)
- * and an auxiliary class (ieee802Device).
+ * Contains exactly one structural object class (applicationEntity) and an
+ * auxiliary class (ieee802Device).
*/
- private List<ObjectClassDescription> ocdList3;
+ private List<ObjectClass> ocdList3;
/**
- * Contains exactly one structural object class: inetOrgPerson.
- * Note: the list doesn't contain the classes contained in the superclass chain.
+ * Contains exactly one structural object class: inetOrgPerson. Note: the
+ * list doesn't contain the classes contained in the superclass chain.
*/
- private List<ObjectClassDescription> ocdList4;
+ private List<ObjectClass> ocdList4;
/**
- * Contains exactly one structural object class chain including all
- * object classes of the superclass chain and an additional auxiliary object class:
+ * Contains exactly one structural object class chain including all object
+ * classes of the superclass chain and an additional auxiliary object class:
* inetOrgPerson, organizationalPerson, person, top, posixAccount
*/
- private List<ObjectClassDescription> ocdList5;
+ private List<ObjectClass> ocdList5;
/**
- * Contains no structural object class.
- * That is invalid because an entry must contain an structural object class.
+ * Contains no structural object class. That is invalid because an entry
+ * must contain an structural object class.
*/
- private List<ObjectClassDescription> ocdList6;
+ private List<ObjectClass> ocdList6;
/** structural, superiors: organizationalPerson, person, top */
- private ObjectClassDescription inetOrgPerson;
+ private ObjectClass inetOrgPerson;
/** structural, superiors: person, top */
- private ObjectClassDescription organizationalPerson;
+ private ObjectClass organizationalPerson;
/** structural, superiors: person, top */
- private ObjectClassDescription person;
+ private ObjectClass person;
/** structural, superiors: top */
- private ObjectClassDescription nisMap;
+ private ObjectClass nisMap;
/** structural, superiors: top */
- private ObjectClassDescription nisNetgroup;
+ private ObjectClass nisNetgroup;
/** auxiliary, superiors: top */
- private ObjectClassDescription ieee802Device;
+ private ObjectClass ieee802Device;
/** structural, superiors: top */
- private ObjectClassDescription nisObject;
+ private ObjectClass nisObject;
/** abstract, superiors: - */
- private ObjectClassDescription top;
+ private ObjectClass top;
/** auxiliary, superiors: top */
- private ObjectClassDescription extensibleObject;
+ private ObjectClass extensibleObject;
/** structural, superiors: top */
- private ObjectClassDescription openLDAProotDSE;
+ private ObjectClass openLDAProotDSE;
/** structural, superiors: top */
- private ObjectClassDescription applicationEntity;
+ private ObjectClass applicationEntity;
/** auxiliary, superiors: top */
- private ObjectClassDescription posixAccount;
+ private ObjectClass posixAccount;
@Before
public void setUp()
{
- ocdList1 = new ArrayList<ObjectClassDescription>();
- ocdList2 = new ArrayList<ObjectClassDescription>();
- ocdList3 = new ArrayList<ObjectClassDescription>();
- ocdList4 = new ArrayList<ObjectClassDescription>();
- ocdList5 = new ArrayList<ObjectClassDescription>();
- ocdList6 = new ArrayList<ObjectClassDescription>();
+ ocdList1 = new ArrayList<ObjectClass>();
+ ocdList2 = new ArrayList<ObjectClass>();
+ ocdList3 = new ArrayList<ObjectClass>();
+ ocdList4 = new ArrayList<ObjectClass>();
+ ocdList5 = new ArrayList<ObjectClass>();
+ ocdList6 = new ArrayList<ObjectClass>();
inetOrgPerson = Schema.DEFAULT_SCHEMA.getObjectClassDescription( "inetOrgPerson" );
organizationalPerson = Schema.DEFAULT_SCHEMA.getObjectClassDescription( "organizationalPerson" );
@@ -149,32 +150,32 @@ public class SchemaUtilsTest
applicationEntity = Schema.DEFAULT_SCHEMA.getObjectClassDescription( "applicationEntity" );
posixAccount = Schema.DEFAULT_SCHEMA.getObjectClassDescription( "posixAccount" );
- //add some values to list1
+ // add some values to list1
ocdList1.add( inetOrgPerson );
ocdList1.add( nisMap );
ocdList1.add( nisNetgroup );
- //add some values to list2
+ // add some values to list2
ocdList2.add( nisObject );
ocdList2.add( top );
ocdList2.add( extensibleObject );
- //add some values to list3
+ // add some values to list3
ocdList3.add( ieee802Device );
ocdList3.add( top );
ocdList3.add( applicationEntity );
- //add some values to list4
+ // add some values to list4
ocdList4.add( inetOrgPerson );
- //add some values to list5
+ // add some values to list5
ocdList5.add( posixAccount );
ocdList5.add( organizationalPerson );
ocdList5.add( person );
ocdList5.add( inetOrgPerson );
ocdList5.add( top );
- //add some values to list6
+ // add some values to list6
ocdList6.add( posixAccount );
ocdList6.add( ieee802Device );
}
@@ -190,36 +191,36 @@ public class SchemaUtilsTest
@Test
public void testGetStructuralObjectClass_list2()
{
- ObjectClassDescription ocd = SchemaUtils2.getStructuralObjectClass( ocdList2, Schema.DEFAULT_SCHEMA );
+ ObjectClass ocd = SchemaUtils2.getStructuralObjectClass( ocdList2, Schema.DEFAULT_SCHEMA );
assertEquals( nisObject, ocd );
- assertEquals( "1.3.6.1.1.1.2.10", ocd.getNumericOid() );
+ assertEquals( "1.3.6.1.1.1.2.10", ocd.getOid() );
}
@Test
public void testGetStructuralObjectClass_list3()
{
- ObjectClassDescription ocd = SchemaUtils2.getStructuralObjectClass( ocdList3, Schema.DEFAULT_SCHEMA );
+ ObjectClass ocd = SchemaUtils2.getStructuralObjectClass( ocdList3, Schema.DEFAULT_SCHEMA );
assertEquals( applicationEntity, ocd );
- assertEquals( "2.5.6.12", ocd.getNumericOid() );
+ assertEquals( "2.5.6.12", ocd.getOid() );
}
@Test
public void testGetSpecificStructuralObjectClass_list4()
{
- ObjectClassDescription ocd = SchemaUtils2.getStructuralObjectClass( ocdList4, Schema.DEFAULT_SCHEMA );
+ ObjectClass ocd = SchemaUtils2.getStructuralObjectClass( ocdList4, Schema.DEFAULT_SCHEMA );
assertEquals( inetOrgPerson, ocd );
- assertEquals( "2.16.840.1.113730.3.2.2", ocd.getNumericOid() );
+ assertEquals( "2.16.840.1.113730.3.2.2", ocd.getOid() );
}
@Test
public void testGetStructuralObjectClass_list5()
{
- ObjectClassDescription ocd = SchemaUtils2.getStructuralObjectClass( ocdList5, Schema.DEFAULT_SCHEMA );
+ ObjectClass ocd = SchemaUtils2.getStructuralObjectClass( ocdList5, Schema.DEFAULT_SCHEMA );
assertEquals( inetOrgPerson, ocd );
- assertEquals( "2.16.840.1.113730.3.2.2", ocd.getNumericOid() );
+ assertEquals( "2.16.840.1.113730.3.2.2", ocd.getOid() );
}
@@ -298,7 +299,8 @@ public class SchemaUtilsTest
Collection<String> attributes = SchemaUtils2.getAllAttributes( ocdList5, Schema.DEFAULT_SCHEMA );
// inetOrgPerson object class chain defines 51 attributes
- // posixAccount defines 10 attributes, but 5 of them are already defined in inetOrgPerson object class chain
+ // posixAccount defines 10 attributes, but 5 of them are already defined
+ // in inetOrgPerson object class chain
assertEquals( 56, attributes.size() );
// from 'top'
@@ -329,7 +331,7 @@ public class SchemaUtilsTest
@Test
public void testIsMustAttribute_1()
{
- AttributeTypeDescription atd = Schema.DEFAULT_SCHEMA.getAttributeTypeDescription( "objectClass" );
+ AttributeType atd = Schema.DEFAULT_SCHEMA.getAttributeTypeDescription( "objectClass" );
assertTrue( SchemaUtils2.isMustAttribute( atd, ocdList4, Schema.DEFAULT_SCHEMA ) );
}
@@ -337,7 +339,7 @@ public class SchemaUtilsTest
@Test
public void testIsMustAttribute_2()
{
- AttributeTypeDescription atd = Schema.DEFAULT_SCHEMA.getAttributeTypeDescription( "cn" );
+ AttributeType atd = Schema.DEFAULT_SCHEMA.getAttributeTypeDescription( "cn" );
assertTrue( SchemaUtils2.isMustAttribute( atd, ocdList4, Schema.DEFAULT_SCHEMA ) );
}
@@ -345,7 +347,7 @@ public class SchemaUtilsTest
@Test
public void testIsMustAttribute_3()
{
- AttributeTypeDescription atd = Schema.DEFAULT_SCHEMA.getAttributeTypeDescription( "givenName" );
+ AttributeType atd = Schema.DEFAULT_SCHEMA.getAttributeTypeDescription( "givenName" );
assertFalse( SchemaUtils2.isMustAttribute( atd, ocdList4, Schema.DEFAULT_SCHEMA ) );
}
@@ -353,7 +355,7 @@ public class SchemaUtilsTest
@Test
public void testIsMustAttribute_4()
{
- AttributeTypeDescription atd = Schema.DEFAULT_SCHEMA.getAttributeTypeDescription( "xyz" );
+ AttributeType atd = Schema.DEFAULT_SCHEMA.getAttributeTypeDescription( "xyz" );
assertFalse( SchemaUtils2.isMustAttribute( atd, ocdList4, Schema.DEFAULT_SCHEMA ) );
}
@@ -361,7 +363,7 @@ public class SchemaUtilsTest
@Test(expected = IllegalArgumentException.class)
public void testIsMustAttribute_5()
{
- AttributeTypeDescription atd = null;
+ AttributeType atd = null;
assertFalse( SchemaUtils2.isMustAttribute( atd, ocdList4, Schema.DEFAULT_SCHEMA ) );
}
Modified: directory/sandbox/studio-persistence-tooling/persistence-ui/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/studio-persistence-tooling/persistence-ui/pom.xml?rev=1032070&r1=1032069&r2=1032070&view=diff
==============================================================================
--- directory/sandbox/studio-persistence-tooling/persistence-ui/pom.xml (original)
+++ directory/sandbox/studio-persistence-tooling/persistence-ui/pom.xml Sat Nov 6 14:24:13 2010
@@ -127,7 +127,6 @@
org.eclipse.ui.views,
org.eclipse.ui.forms,
org.eclipse.jface.text,
- org.apache.directory.studio.jars,
org.apache.directory.studio.ldifparser,
org.apache.directory.studio.connection.core,
org.apache.directory.studio.connection.ui,
@@ -178,11 +177,6 @@
</dependency>
<dependency>
<groupId>org.apache.directory.studio</groupId>
- <artifactId>jars</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.directory.studio</groupId>
<artifactId>ldifparser</artifactId>
<scope>provided</scope>
</dependency>
Modified: directory/sandbox/studio-persistence-tooling/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/studio-persistence-tooling/pom.xml?rev=1032070&r1=1032069&r2=1032070&view=diff
==============================================================================
--- directory/sandbox/studio-persistence-tooling/pom.xml (original)
+++ directory/sandbox/studio-persistence-tooling/pom.xml Sat Nov 6 14:24:13 2010
@@ -1,167 +1,172 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<!--
- @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>parent</artifactId>
- <version>1.5.3.v20100330</version>
- </parent>
-
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>persistence-parent</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <name>Apache Directory Studio LDAP Persistence Tooling</name>
- <packaging>pom</packaging>
-
- <url>http://code.google.com/p/dirstudio-ldap-tooling/</url>
-
- <organization>
- <name>Apache Software Foundation</name>
- <url>http://www.apache.org</url>
- </organization>
-
- <modules>
- <module>persistence-core</module>
- <module>persistence-ui</module>
- <module>persistence-example</module>
- </modules>
-
- <properties>
- <apache.directory.studio.version>1.5.3.v20100330</apache.directory.studio.version>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <!-- Modules dependencies -->
- <dependency>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>persistence.core</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>persistence.ui</artifactId>
- <version>${project.version}</version>
- </dependency>
- <!-- Apache Directory Studio dependencies -->
- <dependency>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>aciitemeditor</artifactId>
- <version>${apache.directory.studio.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>apacheds</artifactId>
- <version>${apache.directory.studio.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>apacheds.configuration</artifactId>
- <version>${apache.directory.studio.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>common.ui</artifactId>
- <version>${apache.directory.studio.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>connection.core</artifactId>
- <version>${apache.directory.studio.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>connection.ui</artifactId>
- <version>${apache.directory.studio.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>jars</artifactId>
- <version>${apache.directory.studio.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>ldapbrowser.common</artifactId>
- <version>${apache.directory.studio.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>ldapbrowser.core</artifactId>
- <version>${apache.directory.studio.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>ldapbrowser.ui</artifactId>
- <version>${apache.directory.studio.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>ldifparser</artifactId>
- <version>${apache.directory.studio.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>ldifeditor</artifactId>
- <version>${apache.directory.studio.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>schemaeditor</artifactId>
- <version>${apache.directory.studio.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>valueeditors</artifactId>
- <version>${apache.directory.studio.version}</version>
- </dependency>
- <!-- External dependencies -->
- <dependency>
- <groupId>org.apache.velocity</groupId>
- <artifactId>velocity</artifactId>
- <version>1.6.4</version>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <version>1.8.5</version>
- </dependency>
- <dependency>
- <groupId>org.powermock.modules</groupId>
- <artifactId>powermock-module-junit4</artifactId>
- <version>1.4</version>
- </dependency>
- <dependency>
- <groupId>org.powermock.api</groupId>
- <artifactId>powermock-api-mockito</artifactId>
- <version>1.4</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <repositories>
- <repository>
- <id>powermock-repo</id>
- <url>http://powermock.googlecode.com/svn/repo/</url>
- </repository>
- </repositories>
+ <!--
+ 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.
+ -->
+ <!--
+ @author <a href="mailto:dev@directory.apache.org">Apache Directory
+ Project</a>
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.directory.studio</groupId>
+ <artifactId>parent</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.apache.directory.studio</groupId>
+ <artifactId>persistence-parent</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <name>Apache Directory Studio LDAP Persistence Tooling</name>
+ <packaging>pom</packaging>
+
+ <url>http://code.google.com/p/dirstudio-ldap-tooling/</url>
+
+ <organization>
+ <name>Apache Software Foundation</name>
+ <url>http://www.apache.org</url>
+ </organization>
+
+ <modules>
+ <module>persistence-core</module>
+ <module>persistence-ui</module>
+ <module>persistence-example</module>
+ </modules>
+
+ <properties>
+ <apache.directory.studio.version>2.0.0-SNAPSHOT</apache.directory.studio.version>
+ </properties>
+
+ <dependencyManagement>
+ <dependencies>
+ <!-- Modules dependencies -->
+ <dependency>
+ <groupId>org.apache.directory.studio</groupId>
+ <artifactId>persistence.core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.directory.studio</groupId>
+ <artifactId>persistence.ui</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <!-- Apache Directory Studio dependencies -->
+ <dependency>
+ <groupId>org.apache.directory.studio</groupId>
+ <artifactId>aciitemeditor</artifactId>
+ <version>${apache.directory.studio.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.directory.studio</groupId>
+ <artifactId>apacheds</artifactId>
+ <version>${apache.directory.studio.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.directory.studio</groupId>
+ <artifactId>apacheds.configuration</artifactId>
+ <version>${apache.directory.studio.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.directory.studio</groupId>
+ <artifactId>common.ui</artifactId>
+ <version>${apache.directory.studio.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.directory.studio</groupId>
+ <artifactId>common.core</artifactId>
+ <version>${apache.directory.studio.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.directory.studio</groupId>
+ <artifactId>connection.core</artifactId>
+ <version>${apache.directory.studio.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.directory.studio</groupId>
+ <artifactId>connection.ui</artifactId>
+ <version>${apache.directory.studio.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.directory.studio</groupId>
+ <artifactId>ldapbrowser.common</artifactId>
+ <version>${apache.directory.studio.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.directory.studio</groupId>
+ <artifactId>ldapbrowser.core</artifactId>
+ <version>${apache.directory.studio.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.directory.studio</groupId>
+ <artifactId>ldapbrowser.ui</artifactId>
+ <version>${apache.directory.studio.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.directory.studio</groupId>
+ <artifactId>ldifparser</artifactId>
+ <version>${apache.directory.studio.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.directory.studio</groupId>
+ <artifactId>ldifeditor</artifactId>
+ <version>${apache.directory.studio.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.directory.studio</groupId>
+ <artifactId>schemaeditor</artifactId>
+ <version>${apache.directory.studio.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.directory.studio</groupId>
+ <artifactId>valueeditors</artifactId>
+ <version>${apache.directory.studio.version}</version>
+ </dependency>
+
+
+ <!-- External dependencies -->
+ <dependency>
+ <groupId>org.apache.velocity</groupId>
+ <artifactId>velocity</artifactId>
+ <version>1.6.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-core</artifactId>
+ <version>1.8.5</version>
+ </dependency>
+ <dependency>
+ <groupId>org.powermock.modules</groupId>
+ <artifactId>powermock-module-junit4</artifactId>
+ <version>1.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.powermock.api</groupId>
+ <artifactId>powermock-api-mockito</artifactId>
+ <version>1.4</version>
+ </dependency>
+
+ </dependencies>
+ </dependencyManagement>
+
+ <repositories>
+ <repository>
+ <id>powermock-repo</id>
+ <url>http://powermock.googlecode.com/svn/repo/</url>
+ </repository>
+ </repositories>
</project>