You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by pa...@apache.org on 2010/10/08 18:45:17 UTC
svn commit: r1005894 [1/5] - in
/directory/studio/trunk/plugins/schemaeditor: ./
src/main/java/org/apache/directory/studio/schemaeditor/
src/main/java/org/apache/directory/studio/schemaeditor/controller/
src/main/java/org/apache/directory/studio/schema...
Author: pamarcelot
Date: Fri Oct 8 16:45:14 2010
New Revision: 1005894
URL: http://svn.apache.org/viewvc?rev=1005894&view=rev
Log:
Merged the 'shared-trunk-merge' branch back into trunk.
It includes all changes related to the use of the current Shared trunk into Studio (which was stuck at version 0.9.17 until now).
Modified:
directory/studio/trunk/plugins/schemaeditor/pom.xml
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/PluginUtils.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaHandler.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/DeleteSchemaElementAction.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/messages.properties (props changed)
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/messages_de.properties (props changed)
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/messages.properties (props changed)
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/messages_de.properties (props changed)
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/messages.properties (props changed)
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/messages_de.properties (props changed)
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/AttributeTypeImpl.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/DependenciesComputer.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/MatchingRuleImpl.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/ObjectClassImpl.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/SchemaImpl.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/SyntaxImpl.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/difference/DifferenceEngine.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/hierarchy/HierarchyManager.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/ApacheDsSchemaConnector.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/GenericSchemaConnector.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/OpenLdapSchemaFileExporter.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/OpenLdapSchemaFileImporter.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/XMLSchemaFileExporter.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/XMLSchemaFileImporter.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/messages.properties (props changed)
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/messages_de.properties (props changed)
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/messages.properties (props changed)
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/messages_de.properties (props changed)
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/schemachecker/SchemaChecker.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/ViewUtils.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/dialogs/AttributeTypeSelectionDialog.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/dialogs/AttributeTypeSelectionDialogContentProvider.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/dialogs/AttributeTypeSelectionDialogLabelProvider.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/dialogs/EditAliasesDialog.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/dialogs/ObjectClassSelectionDialog.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/dialogs/ObjectClassSelectionDialogContentProvider.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/dialogs/ObjectClassSelectionDialogLabelProvider.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/dialogs/messages.properties (props changed)
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/dialogs/messages_de.properties (props changed)
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/ATEMatchingRulesComboComparator.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/ATESuperiorComboComparator.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/ATESuperiorComboContentProvider.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/ATESuperiorComboLabelProvider.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/ATESyntaxComboComparator.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/ATEUsedByMandatoryTableContentProvider.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/ATEUsedByOptionalTableContentProvider.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/ATEUsedByTablesLabelProvider.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/AttributeTypeEditor.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/AttributeTypeEditorInput.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/AttributeTypeEditorOverviewPage.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/AttributeTypeEditorSourceCodePage.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/AttributeTypeEditorUsedByPage.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/messages.properties (props changed)
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/messages_de.properties (props changed)
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditor.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditorAttributesTableContentProvider.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditorAttributesTableLabelProvider.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditorInput.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditorOverviewPage.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditorSourceCodePage.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditorSuperiorsTableContentProvider.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditorSuperiorsTableLabelProvider.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/messages.properties (props changed)
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/messages_de.properties (props changed)
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/schema/SchemaEditorTableViewerContentProvider.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/schema/SchemaEditorTableViewerLabelProvider.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/schema/messages.properties (props changed)
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/schema/messages_de.properties (props changed)
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/messages.properties (props changed)
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/preferences/messages.properties (props changed)
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/preferences/messages_de.properties (props changed)
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/search/messages.properties (props changed)
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/search/messages_de.properties (props changed)
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/HierarchyView.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/HierarchyViewLabelProvider.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SchemaViewContentProvider.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SchemaViewLabelProvider.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SearchView.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SearchViewContentProvider.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SearchViewLabelProvider.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/messages.properties (props changed)
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/messages_de.properties (props changed)
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/widget/DifferencesWidgetSchemaLabelProvider.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/widget/FirstNameSorter.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/widget/messages.properties (props changed)
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/widget/messages_de.properties (props changed)
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasForADSWizard.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/MergeSchemasSelectionWizardPage.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/MergeSchemasWizard.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewAttributeTypeContentWizardPage.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewAttributeTypeGeneralWizardPage.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewAttributeTypeMatchingRulesWizardPage.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewAttributeTypeWizard.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewObjectClassContentWizardPage.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewObjectClassGeneralPageWizardPage.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewObjectClassMandatoryAttributesPage.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewObjectClassOptionalAttributesPage.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewObjectClassWizard.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/messages.properties (props changed)
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers/FirstNameSorter.java
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers/messages.properties (props changed)
directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers/messages_de.properties (props changed)
directory/studio/trunk/plugins/schemaeditor/src/test/java/org/apache/directory/studio/schemaeditor/model/difference/DifferenceEngineTest.java
Modified: directory/studio/trunk/plugins/schemaeditor/pom.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/pom.xml?rev=1005894&r1=1005893&r2=1005894&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/pom.xml (original)
+++ directory/studio/trunk/plugins/schemaeditor/pom.xml Fri Oct 8 16:45:14 2010
@@ -116,8 +116,7 @@
<Require-Bundle>
org.apache.commons.collections;bundle-version="${org.apache.commons.collections.version}",
org.apache.commons.io;bundle-version="${org.apache.commons.io.version}",
- org.apache.directory.shared.asn1;bundle-version="${org.apache.directory.shared.version}",
- org.apache.directory.shared.ldap;bundle-version="${org.apache.directory.shared.version}",
+ org.apache.directory.shared.ldap;bundle-version="${org.apache.directory.shared.validversion}",
org.apache.directory.studio.common.core,
org.apache.directory.studio.common.ui,
org.apache.directory.studio.connection.core,
@@ -153,26 +152,6 @@
</build>
<dependencies>
- <!-- Libraries dependencies -->
- <dependency>
- <groupId>org.apache.directory.shared</groupId>
- <artifactId>shared-converter</artifactId>
- <exclusions>
- <exclusion>
- <groupId>antlr</groupId>
- <artifactId>antlr</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.directory.shared</groupId>
- <artifactId>shared-ldap</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
<!-- Apache Directory Studio library plugins dependencies -->
<dependency>
<groupId>org.apache.directory.studio</groupId>
@@ -186,11 +165,6 @@
</dependency>
<dependency>
<groupId>org.apache.directory.studio</groupId>
- <artifactId>org.apache.directory.shared.asn1</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.directory.studio</groupId>
<artifactId>org.apache.directory.shared.ldap</artifactId>
<scope>provided</scope>
</dependency>
@@ -320,6 +294,18 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
+
+ <!-- SLF4J for test only -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/PluginUtils.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/PluginUtils.java?rev=1005894&r1=1005893&r2=1005894&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/PluginUtils.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/PluginUtils.java Fri Oct 8 16:45:14 2010
@@ -90,21 +90,21 @@ public class PluginUtils
public static AttributeTypeImpl getClone( AttributeTypeImpl at )
{
AttributeTypeImpl clone = new AttributeTypeImpl( at.getOid() );
- clone.setNames( at.getNamesRef() );
- clone.setSchema( at.getSchema() );
+ clone.setNames( at.getNames() );
+ clone.setSchemaName( at.getSchemaName() );
clone.setSchemaObject( at.getSchemaObject() );
clone.setDescription( at.getDescription() );
- clone.setSuperiorName( at.getSuperiorName() );
+ clone.setSuperiorOid( at.getSuperiorOid() );
clone.setUsage( at.getUsage() );
clone.setSyntaxOid( at.getSyntaxOid() );
- clone.setLength( at.getLength() );
+ clone.setSyntaxLength( at.getSyntaxLength() );
clone.setObsolete( at.isObsolete() );
- clone.setSingleValue( at.isSingleValue() );
+ clone.setSingleValued( at.isSingleValued() );
clone.setCollective( at.isCollective() );
- clone.setCanUserModify( at.isCanUserModify() );
- clone.setEqualityName( at.getEqualityName() );
- clone.setOrderingName( at.getOrderingName() );
- clone.setSubstrName( at.getSubstrName() );
+ clone.setUserModifiable( at.isUserModifiable() );
+ clone.setEqualityOid( at.getEqualityOid() );
+ clone.setOrderingOid( at.getOrderingOid() );
+ clone.setSubstringOid( at.getSubstringOid() );
return clone;
}
@@ -121,15 +121,15 @@ public class PluginUtils
public static ObjectClassImpl getClone( ObjectClassImpl oc )
{
ObjectClassImpl clone = new ObjectClassImpl( oc.getOid() );
- clone.setNames( oc.getNamesRef() );
+ clone.setNames( oc.getNames() );
+ clone.setSchemaName( oc.getSchemaName() );
clone.setSchemaObject( oc.getSchemaObject() );
- clone.setSchema( oc.getSchema() );
clone.setDescription( oc.getDescription() );
- clone.setSuperClassesNames( oc.getSuperClassesNames() );
+ clone.setSuperiorOids( oc.getSuperiorOids() );
clone.setType( oc.getType() );
clone.setObsolete( oc.isObsolete() );
- clone.setMustNamesList( oc.getMustNamesList() );
- clone.setMayNamesList( oc.getMayNamesList() );
+ clone.setMustAttributeTypeOids( oc.getMustAttributeTypeOids() );
+ clone.setMayAttributeTypeOids( oc.getMayAttributeTypeOids() );
return clone;
}
Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaHandler.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaHandler.java?rev=1005894&r1=1005893&r2=1005894&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaHandler.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaHandler.java Fri Oct 8 16:45:14 2010
@@ -524,7 +524,7 @@ public class SchemaHandler
{
AttributeTypeImpl at = ( AttributeTypeImpl ) object;
attributeTypesList.add( at );
- String[] names = at.getNamesRef();
+ List<String> names = at.getNames();
if ( names != null )
{
for ( String name : names )
@@ -538,7 +538,7 @@ public class SchemaHandler
{
MatchingRuleImpl mr = ( MatchingRuleImpl ) object;
matchingRulesList.add( mr );
- String[] names = mr.getNamesRef();
+ List<String> names = mr.getNames();
if ( names != null )
{
for ( String name : names )
@@ -552,7 +552,7 @@ public class SchemaHandler
{
ObjectClassImpl oc = ( ObjectClassImpl ) object;
objectClassesList.add( oc );
- String[] names = oc.getNamesRef();
+ List<String> names = oc.getNames();
if ( names != null )
{
for ( String name : names )
@@ -566,7 +566,7 @@ public class SchemaHandler
{
SyntaxImpl syntax = ( SyntaxImpl ) object;
syntaxesList.add( syntax );
- String[] names = syntax.getNamesRef();
+ List<String> names = syntax.getNames();
if ( names != null )
{
for ( String name : names )
@@ -631,7 +631,7 @@ public class SchemaHandler
{
AttributeTypeImpl at = ( AttributeTypeImpl ) object;
attributeTypesList.remove( at );
- String[] names = at.getNamesRef();
+ List<String> names = at.getNames();
if ( names != null )
{
for ( String name : names )
@@ -645,7 +645,7 @@ public class SchemaHandler
{
MatchingRuleImpl mr = ( MatchingRuleImpl ) object;
matchingRulesList.remove( mr );
- String[] names = mr.getNamesRef();
+ List<String> names = mr.getNames();
if ( names != null )
{
for ( String name : names )
@@ -659,7 +659,7 @@ public class SchemaHandler
{
ObjectClassImpl oc = ( ObjectClassImpl ) object;
objectClassesList.remove( oc );
- String[] names = oc.getNamesRef();
+ List<String> names = oc.getNames();
if ( names != null )
{
for ( String name : names )
@@ -673,7 +673,7 @@ public class SchemaHandler
{
SyntaxImpl syntax = ( SyntaxImpl ) object;
syntaxesList.remove( syntax );
- String[] names = syntax.getNamesRef();
+ List<String> names = syntax.getNames();
if ( names != null )
{
for ( String name : names )
@@ -694,7 +694,7 @@ public class SchemaHandler
*/
public void addAttributeType( AttributeTypeImpl at )
{
- Schema schema = getSchema( at.getSchema() );
+ Schema schema = getSchema( at.getSchemaName() );
if ( schema == null )
{
@@ -724,20 +724,20 @@ public class SchemaHandler
removeSchemaObject( at1 );
// Updating the attribute type
- at1.setNames( at2.getNamesRef() );
+ at1.setNames( at2.getNames() );
at1.setOid( at2.getOid() );
at1.setDescription( at2.getDescription() );
- at1.setSuperiorName( at2.getSuperiorName() );
+ at1.setSuperiorOid( at2.getSuperiorOid() );
at1.setUsage( at2.getUsage() );
at1.setSyntaxOid( at2.getSyntaxOid() );
- at1.setLength( at2.getLength() );
+ at1.setSyntaxLength( at2.getSyntaxLength() );
at1.setObsolete( at2.isObsolete() );
- at1.setSingleValue( at2.isSingleValue() );
+ at1.setSingleValued( at2.isSingleValued() );
at1.setCollective( at2.isCollective() );
- at1.setCanUserModify( at2.isCanUserModify() );
- at1.setEqualityName( at2.getEqualityName() );
- at1.setOrderingName( at2.getOrderingName() );
- at1.setSubstrName( at2.getSubstrName() );
+ at1.setUserModifiable( at2.isUserModifiable() );
+ at1.setEqualityOid( at2.getEqualityOid() );
+ at1.setOrderingOid( at2.getOrderingOid() );
+ at1.setSubstringOid( at2.getSubstringOid() );
// Adding the references (in case of the names or oid have changed)
addSchemaObject( at1 );
@@ -755,7 +755,7 @@ public class SchemaHandler
*/
public void removeAttributeType( AttributeTypeImpl at )
{
- Schema schema = getSchema( at.getSchema() );
+ Schema schema = getSchema( at.getSchemaName() );
if ( schema == null )
{
@@ -778,7 +778,7 @@ public class SchemaHandler
*/
public void addObjectClass( ObjectClassImpl oc )
{
- Schema schema = getSchema( oc.getSchema() );
+ Schema schema = getSchema( oc.getSchemaName() );
if ( schema == null )
{
@@ -808,14 +808,14 @@ public class SchemaHandler
removeSchemaObject( oc1 );
// Updating the object class
- oc1.setNames( oc2.getNamesRef() );
+ oc1.setNames( oc2.getNames() );
oc1.setOid( oc2.getOid() );
oc1.setDescription( oc2.getDescription() );
- oc1.setSuperClassesNames( oc2.getSuperClassesNames() );
+ oc1.setSuperiorOids( oc2.getSuperiorOids() );
oc1.setType( oc2.getType() );
oc1.setObsolete( oc2.isObsolete() );
- oc1.setMustNamesList( oc2.getMustNamesList() );
- oc1.setMayNamesList( oc2.getMayNamesList() );
+ oc1.setMustAttributeTypeOids( oc2.getMustAttributeTypeOids() );
+ oc1.setMayAttributeTypeOids( oc2.getMayAttributeTypeOids() );
// Adding the references (in case of the names or oid have changed)
addSchemaObject( oc1 );
@@ -833,7 +833,7 @@ public class SchemaHandler
*/
public void removeObjectClass( ObjectClassImpl oc )
{
- Schema schema = getSchema( oc.getSchema() );
+ Schema schema = getSchema( oc.getSchemaName() );
if ( schema == null )
{
@@ -892,7 +892,7 @@ public class SchemaHandler
}
// Schema Listeners
- List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( at.getSchema() ) );
+ List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( at.getSchemaName() ) );
if ( listeners != null )
{
for ( Object object : listeners.toArray() )
@@ -918,7 +918,7 @@ public class SchemaHandler
}
// Schema Listeners
- List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( at.getSchema() ) );
+ List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( at.getSchemaName() ) );
if ( listeners != null )
{
for ( Object object : listeners.toArray() )
@@ -944,7 +944,7 @@ public class SchemaHandler
}
// Schema Listeners
- List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( at.getSchema() ) );
+ List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( at.getSchemaName() ) );
if ( listeners != null )
{
for ( Object object : listeners.toArray() )
@@ -980,7 +980,7 @@ public class SchemaHandler
}
// Schema Listeners
- List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( oc.getSchema() ) );
+ List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( oc.getSchemaName() ) );
if ( listeners != null )
{
for ( Object object : listeners.toArray() )
@@ -1006,7 +1006,7 @@ public class SchemaHandler
}
// Schema Listeners
- List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( oc.getSchema() ) );
+ List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( oc.getSchemaName() ) );
if ( listeners != null )
{
for ( Object object : listeners.toArray() )
@@ -1032,7 +1032,7 @@ public class SchemaHandler
}
// Schema Listeners
- List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( oc.getSchema() ) );
+ List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( oc.getSchemaName() ) );
if ( listeners != null )
{
for ( Object object : listeners.toArray() )
@@ -1068,7 +1068,7 @@ public class SchemaHandler
}
// Schema Listeners
- List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( mr.getSchema() ) );
+ List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( mr.getSchemaName() ) );
if ( listeners != null )
{
for ( Object object : listeners.toArray() )
@@ -1094,7 +1094,7 @@ public class SchemaHandler
}
// Schema Listeners
- List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( mr.getSchema() ) );
+ List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( mr.getSchemaName() ) );
if ( listeners != null )
{
for ( Object object : listeners.toArray() )
@@ -1120,7 +1120,7 @@ public class SchemaHandler
}
// Schema Listeners
- List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( mr.getSchema() ) );
+ List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( mr.getSchemaName() ) );
if ( listeners != null )
{
for ( Object object : listeners.toArray() )
@@ -1146,7 +1146,7 @@ public class SchemaHandler
}
// Schema Listeners
- List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( syntax.getSchema() ) );
+ List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( syntax.getSchemaName() ) );
if ( listeners != null )
{
for ( Object object : listeners.toArray() )
@@ -1172,7 +1172,7 @@ public class SchemaHandler
}
// Schema Listeners
- List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( syntax.getSchema() ) );
+ List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( syntax.getSchemaName() ) );
if ( listeners != null )
{
for ( Object object : listeners.toArray() )
@@ -1198,7 +1198,7 @@ public class SchemaHandler
}
// Schema Listeners
- List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( syntax.getSchema() ) );
+ List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( syntax.getSchemaName() ) );
if ( listeners != null )
{
for ( Object object : listeners.toArray() )
Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/DeleteSchemaElementAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/DeleteSchemaElementAction.java?rev=1005894&r1=1005893&r2=1005894&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/DeleteSchemaElementAction.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/DeleteSchemaElementAction.java Fri Oct 8 16:45:14 2010
@@ -179,7 +179,7 @@ public class DeleteSchemaElementAction e
// Removing schema objects
for ( SchemaObject schemaObject : schemaObjectsList )
{
- if ( !schemasMap.containsKey( schemaObject.getSchema().toLowerCase() ) )
+ if ( !schemasMap.containsKey( schemaObject.getSchemaName().toLowerCase() ) )
{
// If the schema object is not part of deleted schema, we need to delete it.
// But, we don't delete schema objects that are part of a deleted schema, since
Propchange: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/messages.properties
('svn:mergeinfo' removed)
Propchange: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/messages_de.properties
('svn:mergeinfo' removed)
Propchange: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/messages.properties
('svn:mergeinfo' removed)
Propchange: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/messages_de.properties
('svn:mergeinfo' removed)
Propchange: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/messages.properties
('svn:mergeinfo' removed)
Propchange: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/messages_de.properties
('svn:mergeinfo' removed)
Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/AttributeTypeImpl.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/AttributeTypeImpl.java?rev=1005894&r1=1005893&r2=1005894&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/AttributeTypeImpl.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/AttributeTypeImpl.java Fri Oct 8 16:45:14 2010
@@ -20,14 +20,7 @@
package org.apache.directory.studio.schemaeditor.model;
-import javax.naming.NamingException;
-
-import org.apache.directory.shared.ldap.schema.AbstractAttributeType;
import org.apache.directory.shared.ldap.schema.AttributeType;
-import org.apache.directory.shared.ldap.schema.MatchingRule;
-import org.apache.directory.shared.ldap.schema.MutableSchemaObject;
-import org.apache.directory.shared.ldap.schema.Syntax;
-import org.apache.directory.shared.ldap.schema.UsageEnum;
/**
@@ -35,28 +28,10 @@ import org.apache.directory.shared.ldap.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
-public class AttributeTypeImpl extends AbstractAttributeType implements MutableSchemaObject
+public class AttributeTypeImpl extends AttributeType
{
private static final long serialVersionUID = 1L;
- /** The object OID */
- private String objectOid;
-
- /** The name of the superior */
- private String superiorName;
-
- /** The OID of the syntax */
- private String syntaxOid;
-
- /** The name of the equality matching rule */
- private String equalityName;
-
- /** The name of the ordering matching rule */
- private String orderingName;
-
- /** The name of the substr matching rule */
- private String substrName;
-
/** The schema object */
private Schema schemaObject;
@@ -70,265 +45,6 @@ public class AttributeTypeImpl extends A
public AttributeTypeImpl( String oid )
{
super( oid );
- objectOid = oid;
- }
-
-
- /* (non-Javadoc)
- * @see org.apache.directory.shared.ldap.schema.AbstractSchemaObject#setNames(java.lang.String[])
- */
- public void setNames( String[] names )
- {
- super.setNames( names );
- }
-
-
- /* (non-Javadoc)
- * @see org.apache.directory.shared.ldap.schema.AbstractSchemaObject#getOid()
- */
- public String getOid()
- {
- return objectOid;
- }
-
-
- /**
- * Set the OID.
- *
- * @param oid
- * the OID value
- */
- public void setOid( String oid )
- {
- objectOid = oid;
- }
-
-
- /* (non-Javadoc)
- * @see org.apache.directory.shared.ldap.schema.AbstractSchemaObject#setDescription(java.lang.String)
- */
- public void setDescription( String description )
- {
- super.setDescription( description );
- }
-
-
- /* (non-Javadoc)
- * @see org.apache.directory.shared.ldap.schema.AbstractSchemaObject#setObsolete(boolean)
- */
- public void setObsolete( boolean obsolete )
- {
- super.setObsolete( obsolete );
- }
-
-
- /* (non-Javadoc)
- * @see org.apache.directory.shared.ldap.schema.AbstractAttributeType#setCanUserModify(boolean)
- */
- public void setCanUserModify( boolean canUserModify )
- {
- super.setCanUserModify( canUserModify );
- }
-
-
- /* (non-Javadoc)
- * @see org.apache.directory.shared.ldap.schema.AbstractAttributeType#setCollective(boolean)
- */
- public void setCollective( boolean collective )
- {
- super.setCollective( collective );
- }
-
-
- /* (non-Javadoc)
- * @see org.apache.directory.shared.ldap.schema.AbstractAttributeType#setSingleValue(boolean)
- */
- public void setSingleValue( boolean singleValue )
- {
- super.setSingleValue( singleValue );
- }
-
-
- /* (non-Javadoc)
- * @see org.apache.directory.shared.ldap.schema.AbstractAttributeType#setUsage(org.apache.directory.shared.ldap.schema.UsageEnum)
- */
- public void setUsage( UsageEnum usage )
- {
- super.setUsage( usage );
- }
-
-
- /**
- * Gets the superior name.
- *
- * @return
- * the superior name
- */
- public String getSuperiorName()
- {
- return superiorName;
- }
-
-
- /**
- * Sets the superior name.
- *
- * @param superiorName
- * the superior name
- */
- public void setSuperiorName( String superiorName )
- {
- this.superiorName = superiorName;
- }
-
-
- /* (non-Javadoc)
- * @see org.apache.directory.shared.ldap.schema.AttributeType#getSuperior()
- */
- public AttributeType getSuperior() throws NamingException
- {
- return null;
- }
-
-
- /**
- * Gets the OID of the syntax.
- *
- * @return
- * the OID of the syntax
- */
- public String getSyntaxOid()
- {
- return syntaxOid;
- }
-
-
- /**
- * Sets the OID of the syntax.
- *
- * @param syntaxOid
- * the OID of the syntax
- */
- public void setSyntaxOid( String syntaxOid )
- {
- this.syntaxOid = syntaxOid;
- }
-
-
- /* (non-Javadoc)
- * @see org.apache.directory.shared.ldap.schema.AttributeType#getSyntax()
- */
- public Syntax getSyntax() throws NamingException
- {
- return null;
- }
-
-
- /* (non-Javadoc)
- * @see org.apache.directory.shared.ldap.schema.AbstractAttributeType#setLength(int)
- */
- public void setLength( int length )
- {
- super.setLength( length );
- }
-
-
- /**
- * Gets the equality matching rule name.
- *
- * @return
- * the equality matching rule name
- */
- public String getEqualityName()
- {
- return equalityName;
- }
-
-
- /**
- * Sets the equality matching rule name.
- *
- * @param equalityName
- * the equality matching rule name
- */
- public void setEqualityName( String equalityName )
- {
- this.equalityName = equalityName;
- }
-
-
- /* (non-Javadoc)
- * @see org.apache.directory.shared.ldap.schema.AttributeType#getEquality()
- */
- public MatchingRule getEquality() throws NamingException
- {
- return null;
- }
-
-
- /**
- * Gets the ordering matching rule name.
- *
- * @return
- * the ordering matching rule name
- */
- public String getOrderingName()
- {
- return orderingName;
- }
-
-
- /**
- * Sets the ordering matching rule name.
- *
- * @param orderingName
- * the ordering matching rule name
- */
- public void setOrderingName( String orderingName )
- {
- this.orderingName = orderingName;
- }
-
-
- /* (non-Javadoc)
- * @see org.apache.directory.shared.ldap.schema.AttributeType#getOrdering()
- */
- public MatchingRule getOrdering() throws NamingException
- {
- return null;
- }
-
-
- /**
- * Gets the substring matching rule name.
- *
- * @return
- * the substring matching rule name
- */
- public String getSubstrName()
- {
- return substrName;
- }
-
-
- /**
- * Sets the substring matching rule name.
- *
- * @param substrName
- * the substring matching rule name
- */
- public void setSubstrName( String substrName )
- {
- this.substrName = substrName;
- }
-
-
- /* (non-Javadoc)
- * @see org.apache.directory.shared.ldap.schema.AttributeType#getSubstr()
- */
- public MatchingRule getSubstr() throws NamingException
- {
- return null;
}
@@ -371,17 +87,17 @@ public class AttributeTypeImpl extends A
}
// Aliases
- if ( ( getNamesRef() == null ) && ( at.getNamesRef() != null ) )
+ if ( ( getNames() == null ) && ( at.getNames() != null ) )
{
return false;
}
- else if ( ( getNamesRef() != null ) && ( at.getNamesRef() == null ) )
+ else if ( ( getNames() != null ) && ( at.getNames() == null ) )
{
return false;
}
- else if ( ( getNamesRef() != null ) && ( at.getNamesRef() != null ) )
+ else if ( ( getNames() != null ) && ( at.getNames() != null ) )
{
- if ( !getNamesRef().equals( at.getNamesRef() ) )
+ if ( !getNames().equals( at.getNames() ) )
{
return false;
}
@@ -405,17 +121,17 @@ public class AttributeTypeImpl extends A
}
// Superior
- if ( ( getSuperiorName() == null ) && ( at.getSuperiorName() != null ) )
+ if ( ( getSuperiorOid() == null ) && ( at.getSuperiorOid() != null ) )
{
return false;
}
- else if ( ( getSuperiorName() != null ) && ( at.getSuperiorName() == null ) )
+ else if ( ( getSuperiorOid() != null ) && ( at.getSuperiorOid() == null ) )
{
return false;
}
- else if ( ( getSuperiorName() != null ) && ( at.getSuperiorName() != null ) )
+ else if ( ( getSuperiorOid() != null ) && ( at.getSuperiorOid() != null ) )
{
- if ( !getSuperiorName().equals( at.getSuperiorName() ) )
+ if ( !getSuperiorOid().equals( at.getSuperiorOid() ) )
{
return false;
}
@@ -456,7 +172,7 @@ public class AttributeTypeImpl extends A
}
// Syntax length
- if ( getLength() != at.getLength() )
+ if ( getSyntaxLength() != at.getSyntaxLength() )
{
return false;
}
@@ -468,7 +184,7 @@ public class AttributeTypeImpl extends A
}
// Single value
- if ( isSingleValue() != at.isSingleValue() )
+ if ( isSingleValued() != at.isSingleValued() )
{
return false;
}
@@ -480,57 +196,57 @@ public class AttributeTypeImpl extends A
}
// No User Modification
- if ( isCanUserModify() != at.isCanUserModify() )
+ if ( isUserModifiable() != at.isUserModifiable() )
{
return false;
}
// Equality matching rule
- if ( ( getEqualityName() == null ) && ( at.getEqualityName() != null ) )
+ if ( ( getEqualityOid() == null ) && ( at.getEqualityOid() != null ) )
{
return false;
}
- else if ( ( getEqualityName() != null ) && ( at.getEqualityName() == null ) )
+ else if ( ( getEqualityOid() != null ) && ( at.getEqualityOid() == null ) )
{
return false;
}
- else if ( ( getEqualityName() != null ) && ( at.getEqualityName() != null ) )
+ else if ( ( getEqualityOid() != null ) && ( at.getEqualityOid() != null ) )
{
- if ( !getEqualityName().equals( at.getEqualityName() ) )
+ if ( !getEqualityOid().equals( at.getEqualityOid() ) )
{
return false;
}
}
// Ordering matching rule
- if ( ( getOrderingName() == null ) && ( at.getOrderingName() != null ) )
+ if ( ( getOrderingOid() == null ) && ( at.getOrderingOid() != null ) )
{
return false;
}
- else if ( ( getOrderingName() != null ) && ( at.getOrderingName() == null ) )
+ else if ( ( getOrderingOid() != null ) && ( at.getOrderingOid() == null ) )
{
return false;
}
- else if ( ( getOrderingName() != null ) && ( at.getOrderingName() != null ) )
+ else if ( ( getOrderingOid() != null ) && ( at.getOrderingOid() != null ) )
{
- if ( !getOrderingName().equals( at.getOrderingName() ) )
+ if ( !getOrderingOid().equals( at.getOrderingOid() ) )
{
return false;
}
}
// Substring matching rule
- if ( ( getSubstrName() == null ) && ( at.getSubstrName() != null ) )
+ if ( ( getSubstringOid() == null ) && ( at.getSubstringOid() != null ) )
{
return false;
}
- else if ( ( getSubstrName() != null ) && ( at.getSubstrName() == null ) )
+ else if ( ( getSubstringOid() != null ) && ( at.getSubstringOid() == null ) )
{
return false;
}
- else if ( ( getSubstrName() != null ) && ( at.getSubstrName() != null ) )
+ else if ( ( getSubstringOid() != null ) && ( at.getSubstringOid() != null ) )
{
- if ( !getSubstrName().equals( at.getSubstrName() ) )
+ if ( !getSubstringOid().equals( at.getSubstringOid() ) )
{
return false;
}
Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/DependenciesComputer.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/DependenciesComputer.java?rev=1005894&r1=1005893&r2=1005894&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/DependenciesComputer.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/DependenciesComputer.java Fri Oct 8 16:45:14 2010
@@ -122,7 +122,7 @@ public class DependenciesComputer
throws DependencyComputerException
{
// Superior
- String superior = attributeType.getSuperiorName();
+ String superior = attributeType.getSuperiorOid();
if ( superior != null )
{
AttributeTypeImpl superiorAT = schemaHandler.getAttributeType( superior );
@@ -162,7 +162,7 @@ public class DependenciesComputer
}
// Equality Matching Rule
- String equalityName = attributeType.getEqualityName();
+ String equalityName = attributeType.getEqualityOid();
if ( equalityName != null )
{
MatchingRuleImpl equalityMatchingRule = schemaHandler.getMatchingRule( equalityName );
@@ -182,7 +182,7 @@ public class DependenciesComputer
}
// Ordering Matching Rule
- String orderingName = attributeType.getEqualityName();
+ String orderingName = attributeType.getOrderingOid();
if ( orderingName != null )
{
MatchingRuleImpl orderingMatchingRule = schemaHandler.getMatchingRule( orderingName );
@@ -202,7 +202,7 @@ public class DependenciesComputer
}
// Substring Matching Rule
- String substringName = attributeType.getEqualityName();
+ String substringName = attributeType.getSubstringOid();
if ( substringName != null )
{
MatchingRuleImpl substringMatchingRule = schemaHandler.getMatchingRule( substringName );
@@ -235,7 +235,7 @@ public class DependenciesComputer
private void computeDependencies( Schema schema, ObjectClassImpl objectClass ) throws DependencyComputerException
{
// Super Classes
- String[] superClassesNames = objectClass.getSuperClassesNames();
+ List<String> superClassesNames = objectClass.getSuperiorOids();
if ( superClassesNames != null )
{
for ( String superClassName : superClassesNames )
@@ -258,7 +258,7 @@ public class DependenciesComputer
}
// Optional attribute types
- String[] optionalAttributeTypes = objectClass.getMayNamesList();
+ List<String> optionalAttributeTypes = objectClass.getMayAttributeTypeOids();
if ( optionalAttributeTypes != null )
{
for ( String optionalAttributeTypeName : optionalAttributeTypes )
@@ -281,7 +281,7 @@ public class DependenciesComputer
}
// Mandatory attribute types
- String[] mandatoryAttributeTypes = objectClass.getMustNamesList();
+ List<String> mandatoryAttributeTypes = objectClass.getMustAttributeTypeOids();
if ( mandatoryAttributeTypes != null )
{
for ( String mandatoryAttributeTypeName : mandatoryAttributeTypes )
@@ -317,7 +317,7 @@ public class DependenciesComputer
*/
private void computeSchemaDependency( Schema schema, SchemaObject object ) throws DependencyComputerException
{
- String schemaName = object.getSchema();
+ String schemaName = object.getSchemaName();
if ( !schemaName.equalsIgnoreCase( schema.getName() ) )
{
Schema schemaFromSuperiorAT = schemaHandler.getSchema( schemaName );
Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/MatchingRuleImpl.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/MatchingRuleImpl.java?rev=1005894&r1=1005893&r2=1005894&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/MatchingRuleImpl.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/MatchingRuleImpl.java Fri Oct 8 16:45:14 2010
@@ -20,14 +20,7 @@
package org.apache.directory.studio.schemaeditor.model;
-import java.util.Comparator;
-
-import javax.naming.NamingException;
-
-import org.apache.directory.shared.ldap.schema.AbstractMatchingRule;
-import org.apache.directory.shared.ldap.schema.MutableSchemaObject;
-import org.apache.directory.shared.ldap.schema.Normalizer;
-import org.apache.directory.shared.ldap.schema.Syntax;
+import org.apache.directory.shared.ldap.schema.MatchingRule;
/**
@@ -35,42 +28,15 @@ import org.apache.directory.shared.ldap.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
-public class MatchingRuleImpl extends AbstractMatchingRule implements MutableSchemaObject
+public class MatchingRuleImpl extends MatchingRule
{
private static final long serialVersionUID = 1L;
- /** The OID of the syntax */
- private String syntaxOid;
-
/** The schema object */
private Schema schemaObject;
/**
- * Gets the OID of the syntax.
- *
- * @return
- * the OID of the syntax
- */
- public String getSyntaxOid()
- {
- return syntaxOid;
- }
-
-
- /**
- * Sets the OID of the syntax.
- *
- * @param syntaxOid
- * the OID of the syntax
- */
- public void setSyntaxOid( String syntaxOid )
- {
- this.syntaxOid = syntaxOid;
- }
-
-
- /**
* Creates a new instance of MatchingRuleImpl.
*
* @param oid
@@ -82,60 +48,6 @@ public class MatchingRuleImpl extends Ab
}
- /* (non-Javadoc)
- * @see org.apache.directory.shared.ldap.schema.MatchingRule#getComparator()
- */
- public Comparator<?> getComparator() throws NamingException
- {
- return null;
- }
-
-
- /* (non-Javadoc)
- * @see org.apache.directory.shared.ldap.schema.MatchingRule#getNormalizer()
- */
- public Normalizer getNormalizer() throws NamingException
- {
- return null;
- }
-
-
- /* (non-Javadoc)
- * @see org.apache.directory.shared.ldap.schema.MatchingRule#getSyntax()
- */
- public Syntax getSyntax() throws NamingException
- {
- return null;
- }
-
-
- /* (non-Javadoc)
- * @see org.apache.directory.shared.ldap.schema.AbstractSchemaObject#setDescription(java.lang.String)
- */
- public void setDescription( String description )
- {
- super.setDescription( description );
- }
-
-
- /* (non-Javadoc)
- * @see org.apache.directory.shared.ldap.schema.AbstractSchemaObject#setNames(java.lang.String[])
- */
- public void setNames( String[] names )
- {
- super.setNames( names );
- }
-
-
- /* (non-Javadoc)
- * @see org.apache.directory.shared.ldap.schema.AbstractSchemaObject#setObsolete(boolean)
- */
- public void setObsolete( boolean obsolete )
- {
- super.setObsolete( obsolete );
- }
-
-
public Schema getSchemaObject()
{
return schemaObject;
Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/ObjectClassImpl.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/ObjectClassImpl.java?rev=1005894&r1=1005893&r2=1005894&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/ObjectClassImpl.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/ObjectClassImpl.java Fri Oct 8 16:45:14 2010
@@ -20,13 +20,7 @@
package org.apache.directory.studio.schemaeditor.model;
-import javax.naming.NamingException;
-
-import org.apache.directory.shared.ldap.schema.AbstractSchemaObject;
-import org.apache.directory.shared.ldap.schema.AttributeType;
-import org.apache.directory.shared.ldap.schema.MutableSchemaObject;
import org.apache.directory.shared.ldap.schema.ObjectClass;
-import org.apache.directory.shared.ldap.schema.ObjectClassTypeEnum;
/**
@@ -34,25 +28,10 @@ import org.apache.directory.shared.ldap.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
-public class ObjectClassImpl extends AbstractSchemaObject implements MutableSchemaObject, ObjectClass
+public class ObjectClassImpl extends ObjectClass
{
private static final long serialVersionUID = 1L;
- /** The object OID */
- private String objectOid;
-
- /** The object class type */
- private ObjectClassTypeEnum type;
-
- /** The optional attribute type names list */
- private String[] mayNamesList = new String[0];
-
- /** The mandatory attribute type names list */
- private String[] mustNamesList = new String[0];
-
- /** The super class names list */
- private String[] superClassesNames = new String[0];
-
/** The schema object */
private Schema schemaObject;
@@ -66,217 +45,6 @@ public class ObjectClassImpl extends Abs
public ObjectClassImpl( String oid )
{
super( oid );
- objectOid = oid;
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.directory.shared.ldap.schema.AbstractSchemaObject#setNames(java.lang.String[])
- */
- public void setNames( String[] names )
- {
- super.setNames( names );
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.directory.shared.ldap.schema.AbstractSchemaObject#getOid()
- */
- public String getOid()
- {
- return objectOid;
- }
-
-
- /**
- * Set the OID.
- *
- * @param oid
- * the OID value
- */
- public void setOid( String oid )
- {
- objectOid = oid;
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.directory.shared.ldap.schema.AbstractSchemaObject#setDescription(java.lang.String)
- */
- public void setDescription( String description )
- {
- super.setDescription( description );
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.directory.shared.ldap.schema.AbstractSchemaObject#setObsolete(boolean)
- */
- public void setObsolete( boolean obsolete )
- {
- super.setObsolete( obsolete );
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.directory.shared.ldap.schema.ObjectClass#getType()
- */
- public ObjectClassTypeEnum getType()
- {
- return type;
- }
-
-
- /**
- * Sets the type of the object class.
- *
- * @param objectClassTypeEnum
- * the type of the object class
- */
- public void setType( ObjectClassTypeEnum objectClassTypeEnum )
- {
- this.type = objectClassTypeEnum;
- }
-
-
- /* (non-Javadoc)
- * @see org.apache.directory.shared.ldap.schema.ObjectClass#isAbstract()
- */
- public boolean isAbstract()
- {
- return ObjectClassTypeEnum.ABSTRACT.equals( getType() );
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.directory.shared.ldap.schema.ObjectClass#isAuxiliary()
- */
- public boolean isAuxiliary()
- {
- return ObjectClassTypeEnum.AUXILIARY.equals( getType() );
- }
-
-
- /* (non-Javadoc)
- * @see org.apache.directory.shared.ldap.schema.ObjectClass#isStructural()
- */
- public boolean isStructural()
- {
- return ObjectClassTypeEnum.STRUCTURAL.equals( getType() );
- }
-
-
- /**
- * gets the names of the super classes.
- *
- * @return the names of the super classes
- */
- public String[] getSuperClassesNames()
- {
- return superClassesNames;
- }
-
-
- /**
- * Sets the names of the super classes.
- *
- * @param superClassesNames
- * the names of the super classes
- */
- public void setSuperClassesNames( String[] superClassesNames )
- {
- this.superClassesNames = superClassesNames;
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.directory.shared.ldap.schema.ObjectClass#getSuperClasses()
- */
- public ObjectClass[] getSuperClasses() throws NamingException
- {
- return null;
- }
-
-
- /**
- * Gets the names of the mandatory attribute types.
- *
- * @return the names of the mandatory attribute types
- */
- public String[] getMustNamesList()
- {
- return mustNamesList;
- }
-
-
- /**
- * Set the names of the mandatory attribute types.
- *
- * @param mustNamesList
- * the names of the mandatory attribute types
- */
- public void setMustNamesList( String[] mustNamesList )
- {
- this.mustNamesList = mustNamesList;
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.directory.shared.ldap.schema.ObjectClass#getMustList()
- */
- public AttributeType[] getMustList() throws NamingException
- {
- return null;
- }
-
-
- /**
- * Gets the names of the optional attribute types.
- *
- * @return the names of the optional attribute types
- */
- public String[] getMayNamesList()
- {
- return mayNamesList;
- }
-
-
- /**
- * Sets the names of the optional attribute types.
- *
- * @param mayNamesList
- * the names of the optional attribute types
- */
- public void setMayNamesList( String[] mayNamesList )
- {
- this.mayNamesList = mayNamesList;
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.directory.shared.ldap.schema.ObjectClass#getMayList()
- */
- public AttributeType[] getMayList() throws NamingException
- {
- return null;
}
@@ -321,17 +89,17 @@ public class ObjectClassImpl extends Abs
}
// Aliases
- if ( ( getNamesRef() == null ) && ( oc.getNamesRef() != null ) )
+ if ( ( getNames() == null ) && ( oc.getNames() != null ) )
{
return false;
}
- else if ( ( getNamesRef() != null ) && ( oc.getNamesRef() == null ) )
+ else if ( ( getNames() != null ) && ( oc.getNames() == null ) )
{
return false;
}
- else if ( ( getNamesRef() != null ) && ( oc.getNamesRef() != null ) )
+ else if ( ( getNames() != null ) && ( oc.getNames() != null ) )
{
- if ( !getNamesRef().equals( oc.getNamesRef() ) )
+ if ( !getNames().equals( oc.getNames() ) )
{
return false;
}
@@ -355,17 +123,17 @@ public class ObjectClassImpl extends Abs
}
// Superiors
- if ( ( getSuperClassesNames() == null ) && ( oc.getSuperClassesNames() != null ) )
+ if ( ( getSuperiorOids() == null ) && ( oc.getSuperiorOids() != null ) )
{
return false;
}
- else if ( ( getSuperClassesNames() != null ) && ( oc.getSuperClassesNames() == null ) )
+ else if ( ( getSuperiorOids() != null ) && ( oc.getSuperiorOids() == null ) )
{
return false;
}
- else if ( ( getSuperClassesNames() != null ) && ( oc.getSuperClassesNames() != null ) )
+ else if ( ( getSuperiorOids() != null ) && ( oc.getSuperiorOids() != null ) )
{
- if ( !getSuperClassesNames().equals( oc.getSuperClassesNames() ) )
+ if ( !getSuperiorOids().equals( oc.getSuperiorOids() ) )
{
return false;
}
@@ -384,34 +152,34 @@ public class ObjectClassImpl extends Abs
}
// Mandatory attributes
- if ( ( getMustNamesList() == null ) && ( oc.getMustNamesList() != null ) )
+ if ( ( getMustAttributeTypeOids() == null ) && ( oc.getMustAttributeTypeOids() != null ) )
{
return false;
}
- else if ( ( getMustNamesList() != null ) && ( oc.getMustNamesList() == null ) )
+ else if ( ( getMustAttributeTypeOids() != null ) && ( oc.getMustAttributeTypeOids() == null ) )
{
return false;
}
- else if ( ( getMustNamesList() != null ) && ( oc.getMustNamesList() != null ) )
+ else if ( ( getMustAttributeTypeOids() != null ) && ( oc.getMustAttributeTypeOids() != null ) )
{
- if ( !getMustNamesList().equals( oc.getMustNamesList() ) )
+ if ( !getMustAttributeTypeOids().equals( oc.getMustAttributeTypeOids() ) )
{
return false;
}
}
// Optional attributes
- if ( ( getMayNamesList() == null ) && ( oc.getMayNamesList() != null ) )
+ if ( ( getMayAttributeTypeOids() == null ) && ( oc.getMayAttributeTypeOids() != null ) )
{
return false;
}
- else if ( ( getMayNamesList() != null ) && ( oc.getMayNamesList() == null ) )
+ else if ( ( getMayAttributeTypeOids() != null ) && ( oc.getMayAttributeTypeOids() == null ) )
{
return false;
}
- else if ( ( getMayNamesList() != null ) && ( oc.getMayNamesList() != null ) )
+ else if ( ( getMayAttributeTypeOids() != null ) && ( oc.getMayAttributeTypeOids() != null ) )
{
- if ( !getMayNamesList().equals( oc.getMayNamesList() ) )
+ if ( !getMayAttributeTypeOids().equals( oc.getMayAttributeTypeOids() ) )
{
return false;
}
Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/SchemaImpl.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/SchemaImpl.java?rev=1005894&r1=1005893&r2=1005894&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/SchemaImpl.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/SchemaImpl.java Fri Oct 8 16:45:14 2010
@@ -105,7 +105,7 @@ public class SchemaImpl implements Schem
{
for ( AttributeTypeImpl at : attributeTypes )
{
- String[] aliases = at.getNamesRef();
+ List<String> aliases = at.getNames();
if ( aliases != null )
{
for ( String alias : aliases )
@@ -142,7 +142,7 @@ public class SchemaImpl implements Schem
{
for ( MatchingRuleImpl mr : matchingRules )
{
- String[] aliases = mr.getNamesRef();
+ List<String> aliases = mr.getNames();
if ( aliases != null )
{
for ( String alias : aliases )
@@ -197,7 +197,7 @@ public class SchemaImpl implements Schem
{
for ( ObjectClassImpl oc : objectClasses )
{
- String[] aliases = oc.getNamesRef();
+ List<String> aliases = oc.getNames();
if ( aliases != null )
{
for ( String alias : aliases )
@@ -234,7 +234,7 @@ public class SchemaImpl implements Schem
{
for ( SyntaxImpl syntax : syntaxes )
{
- String[] aliases = syntax.getNamesRef();
+ List<String> aliases = syntax.getNames();
if ( aliases != null )
{
for ( String alias : aliases )
Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/SyntaxImpl.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/SyntaxImpl.java?rev=1005894&r1=1005893&r2=1005894&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/SyntaxImpl.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/SyntaxImpl.java Fri Oct 8 16:45:14 2010
@@ -20,10 +20,7 @@
package org.apache.directory.studio.schemaeditor.model;
-import javax.naming.NamingException;
-
-import org.apache.directory.shared.ldap.schema.AbstractSyntax;
-import org.apache.directory.shared.ldap.schema.SyntaxChecker;
+import org.apache.directory.shared.ldap.schema.LdapSyntax;
/**
@@ -31,7 +28,7 @@ import org.apache.directory.shared.ldap.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
-public class SyntaxImpl extends AbstractSyntax
+public class SyntaxImpl extends LdapSyntax
{
private static final long serialVersionUID = 1L;
@@ -51,51 +48,6 @@ public class SyntaxImpl extends Abstract
}
- /* (non-Javadoc)
- * @see org.apache.directory.shared.ldap.schema.AbstractSyntax#setHumanReadable(boolean)
- */
- public void setHumanReadable( boolean isHumanReadable )
- {
- super.setHumanReadable( isHumanReadable );
- }
-
-
- /* (non-Javadoc)
- * @see org.apache.directory.shared.ldap.schema.AbstractSchemaObject#setDescription(java.lang.String)
- */
- public void setDescription( String description )
- {
- super.setDescription( description );
- }
-
-
- /* (non-Javadoc)
- * @see org.apache.directory.shared.ldap.schema.AbstractSchemaObject#setNames(java.lang.String[])
- */
- public void setNames( String[] names )
- {
- super.setNames( names );
- }
-
-
- /* (non-Javadoc)
- * @see org.apache.directory.shared.ldap.schema.AbstractSchemaObject#setObsolete(boolean)
- */
- public void setObsolete( boolean obsolete )
- {
- super.setObsolete( obsolete );
- }
-
-
- /* (non-Javadoc)
- * @see org.apache.directory.shared.ldap.schema.Syntax#getSyntaxChecker()
- */
- public SyntaxChecker getSyntaxChecker() throws NamingException
- {
- return null;
- }
-
-
public Schema getSchemaObject()
{
return schemaObject;
Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/difference/DifferenceEngine.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/difference/DifferenceEngine.java?rev=1005894&r1=1005893&r2=1005894&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/difference/DifferenceEngine.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/difference/DifferenceEngine.java Fri Oct 8 16:45:14 2010
@@ -403,29 +403,12 @@ public class DifferenceEngine
{
List<PropertyDifference> differences = new ArrayList<PropertyDifference>();
- String[] so1Names = so1.getNamesRef();
- List<String> so1NamesList = new ArrayList<String>();
- if ( so1Names != null )
- {
- for ( String name : so1Names )
- {
- so1NamesList.add( name );
- }
- }
-
- String[] so2Names = so2.getNamesRef();
- List<String> so2NamesList = new ArrayList<String>();
- if ( so2Names != null )
- {
- for ( String name : so2Names )
- {
- so2NamesList.add( name );
- }
- }
+ List<String> so1Names = so1.getNames();
+ List<String> so2Names = so2.getNames();
- for ( String name : so1NamesList )
+ for ( String name : so1Names )
{
- if ( !so2NamesList.contains( name ) )
+ if ( !so2Names.contains( name ) )
{
PropertyDifference diff = new AliasDifference( so1, so2, DifferenceType.REMOVED );
diff.setOldValue( name );
@@ -433,9 +416,9 @@ public class DifferenceEngine
}
}
- for ( String name : so2NamesList )
+ for ( String name : so2Names )
{
- if ( !so1NamesList.contains( name ) )
+ if ( !so1Names.contains( name ) )
{
PropertyDifference diff = new AliasDifference( so1, so2, DifferenceType.ADDED );
diff.setNewValue( name );
@@ -557,29 +540,12 @@ public class DifferenceEngine
{
List<PropertyDifference> differences = new ArrayList<PropertyDifference>();
- String[] oc1Sups = oc1.getSuperClassesNames();
- List<String> oc1SupsList = new ArrayList<String>();
- if ( oc1Sups != null )
- {
- for ( String name : oc1Sups )
- {
- oc1SupsList.add( name );
- }
- }
-
- String[] oc2Sups = oc2.getSuperClassesNames();
- List<String> oc2SupsList = new ArrayList<String>();
- if ( oc2Sups != null )
- {
- for ( String name : oc2Sups )
- {
- oc2SupsList.add( name );
- }
- }
+ List<String> oc1Sups = oc1.getSuperiorOids();
+ List<String> oc2Sups = oc2.getSuperiorOids();
- for ( String name : oc1SupsList )
+ for ( String name : oc1Sups )
{
- if ( !oc2SupsList.contains( name ) )
+ if ( !oc2Sups.contains( name ) )
{
PropertyDifference diff = new SuperiorOCDifference( oc1, oc2, DifferenceType.REMOVED );
diff.setOldValue( name );
@@ -587,9 +553,9 @@ public class DifferenceEngine
}
}
- for ( String name : oc2SupsList )
+ for ( String name : oc2Sups )
{
- if ( !oc1SupsList.contains( name ) )
+ if ( !oc1Sups.contains( name ) )
{
PropertyDifference diff = new SuperiorOCDifference( oc1, oc2, DifferenceType.ADDED );
diff.setNewValue( name );
@@ -616,29 +582,12 @@ public class DifferenceEngine
{
List<PropertyDifference> differences = new ArrayList<PropertyDifference>();
- String[] oc1Musts = oc1.getMustNamesList();
- List<String> oc1MustsList = new ArrayList<String>();
- if ( oc1Musts != null )
- {
- for ( String name : oc1Musts )
- {
- oc1MustsList.add( name );
- }
- }
-
- String[] oc2Musts = oc2.getMustNamesList();
- List<String> oc2MustsList = new ArrayList<String>();
- if ( oc2Musts != null )
- {
- for ( String name : oc2Musts )
- {
- oc2MustsList.add( name );
- }
- }
+ List<String> oc1Musts = oc1.getMustAttributeTypeOids();
+ List<String> oc2Musts = oc2.getMustAttributeTypeOids();
- for ( String name : oc1MustsList )
+ for ( String name : oc1Musts )
{
- if ( !oc2MustsList.contains( name ) )
+ if ( !oc2Musts.contains( name ) )
{
PropertyDifference diff = new MandatoryATDifference( oc1, oc2, DifferenceType.REMOVED );
diff.setOldValue( name );
@@ -646,9 +595,9 @@ public class DifferenceEngine
}
}
- for ( String name : oc2MustsList )
+ for ( String name : oc2Musts )
{
- if ( !oc1MustsList.contains( name ) )
+ if ( !oc1Musts.contains( name ) )
{
PropertyDifference diff = new MandatoryATDifference( oc1, oc2, DifferenceType.ADDED );
diff.setNewValue( name );
@@ -675,29 +624,12 @@ public class DifferenceEngine
{
List<PropertyDifference> differences = new ArrayList<PropertyDifference>();
- String[] oc1Mays = oc1.getMayNamesList();
- List<String> oc1MaysList = new ArrayList<String>();
- if ( oc1Mays != null )
- {
- for ( String name : oc1Mays )
- {
- oc1MaysList.add( name );
- }
- }
-
- String[] oc2Mays = oc2.getMayNamesList();
- List<String> oc2MaysList = new ArrayList<String>();
- if ( oc2Mays != null )
- {
- for ( String name : oc2Mays )
- {
- oc2MaysList.add( name );
- }
- }
+ List<String> oc1Mays = oc1.getMayAttributeTypeOids();
+ List<String> oc2Mays = oc2.getMayAttributeTypeOids();
- for ( String name : oc1MaysList )
+ for ( String name : oc1Mays )
{
- if ( !oc2MaysList.contains( name ) )
+ if ( !oc2Mays.contains( name ) )
{
PropertyDifference diff = new OptionalATDifference( oc1, oc2, DifferenceType.REMOVED );
diff.setOldValue( name );
@@ -705,9 +637,9 @@ public class DifferenceEngine
}
}
- for ( String name : oc2MaysList )
+ for ( String name : oc2Mays )
{
- if ( !oc1MaysList.contains( name ) )
+ if ( !oc1Mays.contains( name ) )
{
PropertyDifference diff = new OptionalATDifference( oc1, oc2, DifferenceType.ADDED );
diff.setNewValue( name );
@@ -758,8 +690,8 @@ public class DifferenceEngine
*/
private static PropertyDifference getSuperiorDifference( AttributeTypeImpl at1, AttributeTypeImpl at2 )
{
- String at1Superior = at1.getSuperiorName();
- String at2Superior = at2.getSuperiorName();
+ String at1Superior = at1.getSuperiorOid();
+ String at2Superior = at2.getSuperiorOid();
if ( ( at1Superior == null ) && ( at2Superior != null ) )
{
@@ -842,22 +774,22 @@ public class DifferenceEngine
*/
private static PropertyDifference getSyntaxLengthDifference( AttributeTypeImpl at1, AttributeTypeImpl at2 )
{
- int at1SyntaxLength = at1.getLength();
- int at2SyntaxLength = at2.getLength();
+ long at1SyntaxLength = at1.getSyntaxLength();
+ long at2SyntaxLength = at2.getSyntaxLength();
- if ( ( at1SyntaxLength == -1 ) && ( at2SyntaxLength != -1 ) )
+ if ( ( at1SyntaxLength == 0 ) && ( at2SyntaxLength != 0 ) )
{
PropertyDifference diff = new SyntaxLengthDifference( at1, at2, DifferenceType.ADDED );
diff.setNewValue( at2SyntaxLength );
return diff;
}
- else if ( ( at1SyntaxLength != -1 ) && ( at2SyntaxLength == -1 ) )
+ else if ( ( at1SyntaxLength != 0 ) && ( at2SyntaxLength == 0 ) )
{
PropertyDifference diff = new SyntaxLengthDifference( at1, at2, DifferenceType.REMOVED );
diff.setOldValue( at1SyntaxLength );
return diff;
}
- else if ( ( at1SyntaxLength != -1 ) && ( at2SyntaxLength != -1 ) )
+ else if ( ( at1SyntaxLength != 0 ) && ( at2SyntaxLength != 0 ) )
{
if ( at1SyntaxLength != at2SyntaxLength )
{
@@ -884,14 +816,14 @@ public class DifferenceEngine
*/
private static PropertyDifference getSingleValueDifference( AttributeTypeImpl at1, AttributeTypeImpl at2 )
{
- boolean at1SingleValue = at1.isSingleValue();
- boolean at2SingleValue = at2.isSingleValue();
+ boolean at1SingleValued = at1.isSingleValued();
+ boolean at2SingleValued = at2.isSingleValued();
- if ( at1SingleValue != at2SingleValue )
+ if ( at1SingleValued != at2SingleValued )
{
PropertyDifference diff = new SingleValueDifference( at1, at2 );
- diff.setOldValue( at1SingleValue );
- diff.setNewValue( at2SingleValue );
+ diff.setOldValue( at1SingleValued );
+ diff.setNewValue( at2SingleValued );
return diff;
}
@@ -938,14 +870,14 @@ public class DifferenceEngine
*/
private static PropertyDifference getNoUserModificationDifference( AttributeTypeImpl at1, AttributeTypeImpl at2 )
{
- boolean at1CanUserModify = at1.isCanUserModify();
- boolean at2CanUserModify = at2.isCanUserModify();
+ boolean at1IsUserModifiable = at1.isUserModifiable();
+ boolean at2IsUserModifiable = at2.isUserModifiable();
- if ( at1CanUserModify != at2CanUserModify )
+ if ( at1IsUserModifiable != at2IsUserModifiable )
{
PropertyDifference diff = new NoUserModificationDifference( at1, at2 );
- diff.setOldValue( at1CanUserModify );
- diff.setNewValue( at2CanUserModify );
+ diff.setOldValue( at1IsUserModifiable );
+ diff.setNewValue( at2IsUserModifiable );
return diff;
}
@@ -965,8 +897,8 @@ public class DifferenceEngine
*/
private static PropertyDifference getEqualityDifference( AttributeTypeImpl at1, AttributeTypeImpl at2 )
{
- String at1Equality = at1.getEqualityName();
- String at2Equality = at2.getEqualityName();
+ String at1Equality = at1.getEqualityOid();
+ String at2Equality = at2.getEqualityOid();
if ( ( at1Equality == null ) && ( at2Equality != null ) )
{
@@ -1007,8 +939,8 @@ public class DifferenceEngine
*/
private static PropertyDifference getOrderingDifference( AttributeTypeImpl at1, AttributeTypeImpl at2 )
{
- String at1Ordering = at1.getOrderingName();
- String at2Ordering = at2.getOrderingName();
+ String at1Ordering = at1.getOrderingOid();
+ String at2Ordering = at2.getOrderingOid();
if ( ( at1Ordering == null ) && ( at2Ordering != null ) )
{
@@ -1049,8 +981,8 @@ public class DifferenceEngine
*/
private static PropertyDifference getSubstringDifference( AttributeTypeImpl at1, AttributeTypeImpl at2 )
{
- String at1Substring = at1.getSubstrName();
- String at2Substring = at2.getSubstrName();
+ String at1Substring = at1.getSubstringOid();
+ String at2Substring = at2.getSubstringOid();
if ( ( at1Substring == null ) && ( at2Substring != null ) )
{
Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/hierarchy/HierarchyManager.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/hierarchy/HierarchyManager.java?rev=1005894&r1=1005893&r2=1005894&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/hierarchy/HierarchyManager.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/hierarchy/HierarchyManager.java Fri Oct 8 16:45:14 2010
@@ -20,7 +20,6 @@
package org.apache.directory.studio.schemaeditor.model.hierarchy;
-import java.util.Arrays;
import java.util.List;
import org.apache.commons.collections.map.MultiValueMap;
@@ -80,7 +79,7 @@ public class HierarchyManager
// Checking Aliases and OID
checkAliasesAndOID( at );
- String superiorName = at.getSuperiorName();
+ String superiorName = at.getSuperiorOid();
if ( superiorName != null )
// The attribute type has a superior
{
@@ -122,8 +121,8 @@ public class HierarchyManager
// Checking Aliases and OID
checkAliasesAndOID( oc );
- String[] superClasseNames = oc.getSuperClassesNames();
- if ( ( superClasseNames != null ) && ( superClasseNames.length > 0 ) )
+ List<String> superClasseNames = oc.getSuperiorOids();
+ if ( ( superClasseNames != null ) && ( superClasseNames.size() > 0 ) )
// The object class has one or more superiors
{
for ( String superClassName : superClasseNames )
@@ -232,7 +231,7 @@ public class HierarchyManager
private void checkAliasesAndOID( SchemaObject object )
{
// Aliases
- String[] aliases = object.getNamesRef();
+ List<String> aliases = object.getNames();
if ( aliases != null )
{
for ( String alias : aliases )
@@ -408,7 +407,7 @@ public class HierarchyManager
private void removeAttributeType( AttributeTypeImpl at )
{
// Removing the attribute type as child of its superior
- String superiorName = at.getSuperiorName();
+ String superiorName = at.getSuperiorOid();
if ( ( superiorName != null ) && ( !"".equals( superiorName ) ) ) //$NON-NLS-1$
{
AttributeTypeImpl superiorAT = schemaHandler.getAttributeType( superiorName );
@@ -438,7 +437,7 @@ public class HierarchyManager
parentsMap.put( child, root );
childrenMap.put( root, child );
- String childSuperiorName = childAT.getSuperiorName();
+ String childSuperiorName = childAT.getSuperiorOid();
if ( ( childSuperiorName != null ) && ( !"".equals( childSuperiorName ) ) ) //$NON-NLS-1$
{
parentsMap.put( child, childSuperiorName.toLowerCase() );
@@ -455,8 +454,8 @@ public class HierarchyManager
private void removeObjectClass( ObjectClassImpl oc )
{
// Removing the object class as child of its superiors
- String[] superClassesNames = oc.getSuperClassesNames();
- if ( ( superClassesNames != null ) && ( superClassesNames.length > 0 ) )
+ List<String> superClassesNames = oc.getSuperiorOids();
+ if ( ( superClassesNames != null ) && ( superClassesNames.size() > 0 ) )
{
for ( String superClassName : superClassesNames )
{
@@ -510,8 +509,8 @@ public class HierarchyManager
parentsMap.put( child, root );
childrenMap.put( root, child );
- String[] childSuperClassesNames = childOC.getSuperClassesNames();
- if ( ( childSuperClassesNames != null ) && ( childSuperClassesNames.length > 0 ) )
+ List<String> childSuperClassesNames = childOC.getSuperiorOids();
+ if ( ( childSuperClassesNames != null ) && ( childSuperClassesNames.size() > 0 ) )
{
String correctSuperClassName = getCorrectSuperClassName( oc, childSuperClassesNames );
if ( correctSuperClassName != null )
@@ -533,11 +532,11 @@ public class HierarchyManager
}
- private String getCorrectSuperClassName( ObjectClassImpl oc, String[] childSuperClassesNames )
+ private String getCorrectSuperClassName( ObjectClassImpl oc, List<String> childSuperClassesNames )
{
if ( childSuperClassesNames != null )
{
- List<String> aliases = Arrays.asList( oc.getNamesRef() );
+ List<String> aliases = oc.getNames();
if ( aliases != null )
{
for ( String childSuperClassName : childSuperClassesNames )