directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1066507 - in /directory/studio/trunk: ./ application/application-plugins/ plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/ plugins/schemaeditor/src/main/java/org/apache/directory...
Date Wed, 02 Feb 2011 15:56:03 GMT
Author: pamarcelot
Date: Wed Feb  2 15:56:03 2011
New Revision: 1066507

URL: http://svn.apache.org/viewvc?rev=1066507&view=rev
Log:
Removed duplicated dependencies in parent pom.

Modified:
    directory/studio/trunk/application/application-plugins/pom.xml
    directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/KerberosServerPage.java
    directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsViewContentProvider.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsViewLabelProvider.java
    directory/studio/trunk/pom.xml

Modified: directory/studio/trunk/application/application-plugins/pom.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/application/application-plugins/pom.xml?rev=1066507&r1=1066506&r2=1066507&view=diff
==============================================================================
--- directory/studio/trunk/application/application-plugins/pom.xml (original)
+++ directory/studio/trunk/application/application-plugins/pom.xml Wed Feb  2 15:56:03 2011
@@ -163,8 +163,8 @@
                   <artifactId>org.apache.logging.log4j</artifactId>
                 </artifactItem>
                 <artifactItem>
-                  <groupId>org.apache.directory.studio</groupId>
-                  <artifactId>org.apache.mina.core</artifactId>
+                  <groupId>org.apache.mina</groupId>
+                  <artifactId>mina-core</artifactId>
                 </artifactItem>
                 <artifactItem>
                   <groupId>org.apache.directory.studio</groupId>

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/KerberosServerPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/KerberosServerPage.java?rev=1066507&r1=1066506&r2=1066507&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/KerberosServerPage.java
(original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/KerberosServerPage.java
Wed Feb  2 15:56:03 2011
@@ -21,6 +21,7 @@ package org.apache.directory.studio.apac
 
 
 import org.apache.directory.server.config.beans.ChangePasswordServerBean;
+import org.apache.directory.server.config.beans.DirectoryServiceBean;
 import org.apache.directory.server.config.beans.KdcServerBean;
 import org.apache.directory.server.config.beans.TransportBean;
 import org.apache.directory.shared.ldap.model.exception.LdapInvalidDnException;
@@ -377,23 +378,23 @@ public class KerberosServerPage extends 
         ChangePasswordServerBean changePasswordServerBean = getChangePasswordServerBean();
 
         setSelection( enableKerberosCheckbox, kdcServerBean.isEnabled() );
-        setText(kerberosPortText,"" + getKdcServerTransportBean().getSystemPort() );
+        setText( kerberosPortText, "" + getKdcServerTransportBean().getSystemPort() );
 
-        setSelection(enableChangePasswordCheckbox, changePasswordServerBean.isEnabled() );
-        setText(changePasswordPortText, "" + getChangePasswordServerTransportBean().getSystemPort()
);
+        setSelection( enableChangePasswordCheckbox, changePasswordServerBean.isEnabled()
);
+        setText( changePasswordPortText, "" + getChangePasswordServerTransportBean().getSystemPort()
);
 
-        setText(kdcPrincipalText, kdcServerBean.getKrbKdcPrincipal().toString() );
-        setText(kdcSearchBaseDnText, kdcServerBean.getSearchBaseDn().toString() );
-        setText(encryptionTypesText, kdcServerBean.getKrbEncryptionTypes().toString() );
+        setText( kdcPrincipalText, kdcServerBean.getKrbKdcPrincipal().toString() );
+        setText( kdcSearchBaseDnText, kdcServerBean.getSearchBaseDn().toString() );
+        setText( encryptionTypesText, kdcServerBean.getKrbEncryptionTypes().toString() );
 
-        setSelection(verifyBodyChecksumCheckbox, kdcServerBean.isKrbBodyChecksumVerified()
);
+        setSelection( verifyBodyChecksumCheckbox, kdcServerBean.isKrbBodyChecksumVerified()
);
         setSelection( allowEmptyAddressesCheckbox, kdcServerBean.isKrbEmptyAddressesAllowed()
);
-        setSelection(allowForwardableAddressesCheckbox, kdcServerBean.isKrbForwardableAllowed()
);
-        setSelection(requirePreAuthByEncryptedTimestampCheckbox, kdcServerBean.isKrbPaEncTimestampRequired()
);
+        setSelection( allowForwardableAddressesCheckbox, kdcServerBean.isKrbForwardableAllowed()
);
+        setSelection( requirePreAuthByEncryptedTimestampCheckbox, kdcServerBean.isKrbPaEncTimestampRequired()
);
         setSelection( allowPostdatedTicketsCheckbox, kdcServerBean.isKrbPostdatedAllowed()
);
-        setSelection(allowRenewableTicketsCheckbox, kdcServerBean.isKrbRenewableAllowed()
);
-        setText(maximumRenewableLifetimeText, kdcServerBean.getKrbMaximumRenewableLifetime()
+ "" );
-        setText(maximumTicketLifetimeText, kdcServerBean.getKrbMaximumTicketLifetime() +
"" );
+        setSelection( allowRenewableTicketsCheckbox, kdcServerBean.isKrbRenewableAllowed()
);
+        setText( maximumRenewableLifetimeText, kdcServerBean.getKrbMaximumRenewableLifetime()
+ "" );
+        setText( maximumTicketLifetimeText, kdcServerBean.getKrbMaximumTicketLifetime() +
"" );
 
         addListeners();
     }
@@ -557,12 +558,26 @@ public class KerberosServerPage extends 
      */
     private KdcServerBean getKdcServerBean()
     {
-        KdcServerBean kdcServerBean = getDirectoryServiceBean().getKdcServerBean();
+        return getKdcServerBean( getDirectoryServiceBean() );
+    }
+
+
+    /**
+     * Gets the KDC Server bean.
+     *
+     * @param directoryServiceBean
+     *      the directory service bean
+     * @return
+     *      the KDC Server bean
+     */
+    public static KdcServerBean getKdcServerBean( DirectoryServiceBean directoryServiceBean
)
+    {
+        KdcServerBean kdcServerBean = directoryServiceBean.getKdcServerBean();
 
         if ( kdcServerBean == null )
         {
             kdcServerBean = new KdcServerBean();
-            getDirectoryServiceBean().addServers( kdcServerBean );
+            directoryServiceBean.addServers( kdcServerBean );
         }
 
         return kdcServerBean;
@@ -577,12 +592,26 @@ public class KerberosServerPage extends 
      */
     private ChangePasswordServerBean getChangePasswordServerBean()
     {
-        ChangePasswordServerBean changePasswordServerBean = getDirectoryServiceBean().getChangePasswordServerBean();
+        return getChangePasswordServerBean( getDirectoryServiceBean() );
+    }
+
+
+    /**
+     * Gets the Change Password Server bean.
+     *
+     * @param directoryServiceBean
+     *      the directory service bean
+     * @return
+     *      the Change Password Server bean
+     */
+    public static ChangePasswordServerBean getChangePasswordServerBean( DirectoryServiceBean
directoryServiceBean )
+    {
+        ChangePasswordServerBean changePasswordServerBean = directoryServiceBean.getChangePasswordServerBean();
 
         if ( changePasswordServerBean == null )
         {
             changePasswordServerBean = new ChangePasswordServerBean();
-            getDirectoryServiceBean().addServers( changePasswordServerBean );
+            directoryServiceBean.addServers( changePasswordServerBean );
         }
 
         return changePasswordServerBean;

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java?rev=1066507&r1=1066506&r2=1066507&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java
(original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java
Wed Feb  2 15:56:03 2011
@@ -50,9 +50,11 @@ import org.eclipse.ui.forms.widgets.Tabl
  */
 public class LdapLdapsServersPage extends ServerConfigurationEditorPage
 {
-    private static final int LDAPS_DEFAULT_PORT = 10636;
+    private static final String DEFAULT_ADDRESS = "0.0.0.0";
 
-    private static final int LDAP_DEFAULT_PORT = 10389;
+    private static final int DEFAULT_PORT_LDAPS = 10636;
+
+    private static final int DEFAULT_PORT_LDAP = 10389;
 
     private static final String TRANSPORT_ID_LDAP = "ldap";
 
@@ -538,6 +540,8 @@ public class LdapLdapsServersPage extend
     /**
      * Gets the LDAP Server bean.
      *
+     * @param directoryServiceBean
+     *      the directory service bean
      * @return
      *      the LDAP Server bean
      */
@@ -575,11 +579,6 @@ public class LdapLdapsServersPage extend
      * @return
      *      the LDAP Server transport bean
      */
-    /**
-     * TODO getLdapServerTransportBean.
-     *
-     * @return
-     */
     public static TransportBean getLdapServerTransportBean( DirectoryServiceBean directoryServiceBean
)
     {
         return getTransportBean( directoryServiceBean, TRANSPORT_ID_LDAP );
@@ -629,6 +628,8 @@ public class LdapLdapsServersPage extend
     /**
      * Gets a transport bean based on its id.
      *
+     * @param directoryServiceBean
+     *      the directory service bean
      * @param id
      *      the id
      * @return
@@ -663,15 +664,18 @@ public class LdapLdapsServersPage extend
 
             // ID
             transportBean.setTransportId( id );
+            
+            // Address
+            transportBean.setTransportAddress( DEFAULT_ADDRESS );
 
             // Port
             if ( TRANSPORT_ID_LDAP.equals( id ) )
             {
-                transportBean.setSystemPort( LDAP_DEFAULT_PORT );
+                transportBean.setSystemPort( DEFAULT_PORT_LDAP );
             }
             else if ( TRANSPORT_ID_LDAPS.equals( id ) )
             {
-                transportBean.setSystemPort( LDAPS_DEFAULT_PORT );
+                transportBean.setSystemPort( DEFAULT_PORT_LDAPS );
             }
 
             // SSL

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsViewContentProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsViewContentProvider.java?rev=1066507&r1=1066506&r2=1066507&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsViewContentProvider.java
(original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsViewContentProvider.java
Wed Feb  2 15:56:03 2011
@@ -112,6 +112,7 @@ public class ProblemsViewContentProvider
                         }
                     }
 
+                    // TODO
 //                    SchemaWarning[] warnings = schemaChecker.getWarnings().toArray( new
SchemaWarning[0] );
 //                    if ( !( warnings.length == 0 ) )
 //                    {

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsViewLabelProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsViewLabelProvider.java?rev=1066507&r1=1066506&r2=1066507&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsViewLabelProvider.java
(original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsViewLabelProvider.java
Wed Feb  2 15:56:03 2011
@@ -21,6 +21,8 @@ package org.apache.directory.studio.sche
 
 
 import org.apache.directory.shared.ldap.model.exception.LdapSchemaException;
+import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.shared.ldap.model.schema.SchemaObject;
 import org.apache.directory.studio.schemaeditor.Activator;
 import org.apache.directory.studio.schemaeditor.PluginConstants;
@@ -29,6 +31,7 @@ import org.apache.directory.studio.schem
 import org.apache.directory.studio.schemaeditor.view.wrappers.SchemaWarningWrapper;
 import org.eclipse.jface.viewers.ITableLabelProvider;
 import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.graphics.Image;
 
 
@@ -80,7 +83,7 @@ public class ProblemsViewLabelProvider e
             }
             else if ( columnIndex == 1 )
             {
-                return getDisplayName( errorWrapper.getLdapSchemaException().getSource()
);
+                return getDisplayName( errorWrapper.getLdapSchemaException().getSourceObject()
);
             }
         }
         else if ( element instanceof SchemaWarningWrapper )
@@ -125,166 +128,451 @@ public class ProblemsViewLabelProvider e
     }
 
 
-    //    private String getMessage( SchemaCheckerElement element )
-    //    {
-    //        if ( element instanceof DuplicateAliasError )
-    //        {
-    //            DuplicateAliasError duplicateAliasError = ( DuplicateAliasError ) element;
-    //
-    //            SchemaObject duplicate = duplicateAliasError.getDuplicate();
-    //            if ( duplicate instanceof AttributeType )
-    //            {
-    //                return NLS
-    //                    .bind(
-    //                        Messages.getString( "ProblemsViewLabelProvider.DuplicateAliasErrorAttributeType"
), new String[] { duplicateAliasError.getAlias(), duplicate.getOid() } ); //$NON-NLS-1$
-    //            }
-    //            else if ( duplicate instanceof ObjectClass )
-    //            {
-    //                return NLS
-    //                    .bind(
-    //                        Messages.getString( "ProblemsViewLabelProvider.DuplicateAliasErrorObjectClass"
), new String[] { duplicateAliasError.getAlias(), duplicate.getOid() } ); //$NON-NLS-1$
-    //            }
-    //        }
-    //        else if ( element instanceof DuplicateOidError )
-    //        {
-    //            DuplicateOidError duplicateOidError = ( DuplicateOidError ) element;
-    //            SchemaObject duplicate = duplicateOidError.getDuplicate();
-    //            if ( duplicate instanceof AttributeType )
-    //            {
-    //                return NLS
-    //                    .bind(
-    //                        Messages.getString( "ProblemsViewLabelProvider.DuplicateOidErrorAttributeType"
), new String[] { duplicateOidError.getOid(), duplicate.getName() } ); //$NON-NLS-1$
-    //            }
-    //            else if ( duplicate instanceof ObjectClass )
-    //            {
-    //                return NLS
-    //                    .bind(
-    //                        Messages.getString( "ProblemsViewLabelProvider.DuplicateOidErrorObjectClass"
), new String[] { duplicateOidError.getOid(), duplicate.getName() } ); //$NON-NLS-1$
-    //            }
-    //        }
-    //        else if ( element instanceof NonExistingATSuperiorError )
-    //        {
-    //            NonExistingATSuperiorError nonExistingATSuperiorError = ( NonExistingATSuperiorError
) element;
-    //            return NLS
-    //                .bind(
-    //                    Messages.getString( "ProblemsViewLabelProvider.NonExistingSuperiorAttribute"
), new String[] { nonExistingATSuperiorError.getSuperiorAlias() } ); //$NON-NLS-1$
-    //        }
-    //        else if ( element instanceof NonExistingOCSuperiorError )
-    //        {
-    //            NonExistingOCSuperiorError nonExistingOCSuperiorError = ( NonExistingOCSuperiorError
) element;
-    //            return NLS
-    //                .bind(
-    //                    Messages.getString( "ProblemsViewLabelProvider.NonExistingSuperiorObject"
), new String[] { nonExistingOCSuperiorError.getSuperiorAlias() } ); //$NON-NLS-1$
-    //        }
-    //        else if ( element instanceof NonExistingMandatoryATError )
-    //        {
-    //            NonExistingMandatoryATError nonExistingMandatoryATError = ( NonExistingMandatoryATError
) element;
-    //            return NLS
-    //                .bind(
-    //                    Messages.getString( "ProblemsViewLabelProvider.NonExistingMandatoryAttribute"
), new String[] { nonExistingMandatoryATError.getAlias() } ); //$NON-NLS-1$
-    //        }
-    //        else if ( element instanceof NonExistingOptionalATError )
-    //        {
-    //            NonExistingOptionalATError nonExistingOptionalATError = ( NonExistingOptionalATError
) element;
-    //            return NLS
-    //                .bind(
-    //                    Messages.getString( "ProblemsViewLabelProvider.NonExistingOptionalAttribute"
), new String[] { nonExistingOptionalATError.getAlias() } ); //$NON-NLS-1$
-    //        }
-    //        else if ( element instanceof NonExistingSyntaxError )
-    //        {
-    //            NonExistingSyntaxError nonExistingSyntaxError = ( NonExistingSyntaxError
) element;
-    //            return NLS
-    //                .bind(
-    //                    Messages.getString( "ProblemsViewLabelProvider.NonExistingSyntax"
), new String[] { nonExistingSyntaxError.getSyntaxOid() } ); //$NON-NLS-1$
-    //        }
-    //        else if ( element instanceof NonExistingMatchingRuleError )
-    //        {
-    //            NonExistingMatchingRuleError nonExistingMatchingRuleError = ( NonExistingMatchingRuleError
) element;
-    //            return NLS
-    //                .bind(
-    //                    Messages.getString( "ProblemsViewLabelProvider.NonExistingMatchingRule"
), new String[] { nonExistingMatchingRuleError.getMatchingRuleAlias() } ); //$NON-NLS-1$
-    //        }
-    //        else if ( element instanceof NoAliasWarning )
-    //        {
-    //            NoAliasWarning noAliasWarning = ( NoAliasWarning ) element;
-    //            SchemaObject source = noAliasWarning.getSource();
-    //            if ( source instanceof AttributeType )
-    //            {
-    //                return NLS
-    //                    .bind(
-    //                        Messages.getString( "ProblemsViewLabelProvider.NoAliasWarningAttributeType"
), new String[] { source.getOid() } ); //$NON-NLS-1$
-    //            }
-    //            else if ( source instanceof ObjectClass )
-    //            {
-    //                return NLS
-    //                    .bind(
-    //                        Messages.getString( "ProblemsViewLabelProvider.NoAliasWarningObjectClass"
), new String[] { source.getOid() } ); //$NON-NLS-1$
-    //            }
-    //        }
-    //        else if ( element instanceof ClassTypeHierarchyError )
-    //        {
-    //            ClassTypeHierarchyError classTypeHierarchyError = ( ClassTypeHierarchyError
) element;
-    //            ObjectClass source = ( ObjectClass ) classTypeHierarchyError.getSource();
-    //            ObjectClass superior = ( ObjectClass ) classTypeHierarchyError.getSuperior();
-    //            if ( source.getType().equals( ObjectClassTypeEnum.ABSTRACT ) )
-    //            {
-    //                if ( superior.getType().equals( ObjectClassTypeEnum.STRUCTURAL ) )
-    //                {
-    //                    return NLS
-    //                        .bind(
-    //                            Messages
-    //                                .getString( "ProblemsViewLabelProvider.ClassTypeHierarchyErrorAbstractStructuralObject"
), new String[] { getDisplayName( source ), getDisplayName( superior ) } ); //$NON-NLS-1$
-    //                }
-    //                else if ( superior.getType().equals( ObjectClassTypeEnum.AUXILIARY
) )
-    //                {
-    //                    return NLS
-    //                        .bind(
-    //                            Messages
-    //                                .getString( "ProblemsViewLabelProvider.ClassTypeHierarchyErrorAbstractAuxiliaryObject"
), new String[] { getDisplayName( source ), getDisplayName( superior ) } ); //$NON-NLS-1$
-    //                }
-    //            }
-    //            else if ( source.getType().equals( ObjectClassTypeEnum.AUXILIARY ) )
-    //            {
-    //                if ( superior.getType().equals( ObjectClassTypeEnum.STRUCTURAL ) )
-    //                {
-    //                    return NLS
-    //                        .bind(
-    //                            Messages
-    //                                .getString( "ProblemsViewLabelProvider.ClassTypeHierarchyErrorAuxiliaryStructuralObject"
), new String[] { getDisplayName( source ), getDisplayName( superior ) } ); //$NON-NLS-1$
-    //                }
-    //                else
-    //                {
-    //                    return NLS
-    //                        .bind(
-    //                            Messages.getString( "ProblemsViewLabelProvider.ClassTypeHierarchyErrorAuxiliary"
), new String[] { getDisplayName( source ) } ); //$NON-NLS-1$
-    //                }
-    //            }
-    //        }
-    //        else if ( element instanceof DifferentUsageAsSuperiorError )
-    //        {
-    //            DifferentUsageAsSuperiorError differentUsageAsSuperiorError = ( DifferentUsageAsSuperiorError
) element;
-    //            AttributeType source = ( AttributeType ) differentUsageAsSuperiorError.getSource();
-    //            AttributeType superior = ( AttributeType ) differentUsageAsSuperiorError.getSuperior();
-    //            return NLS
-    //                .bind(
-    //                    Messages.getString( "ProblemsViewLabelProvider.AttributeTypeUsage"
), new String[] { getDisplayName( source ), getDisplayName( superior ) } ); //$NON-NLS-1$
-    //        }
-    //        else if ( element instanceof DifferentCollectiveAsSuperiorError )
-    //        {
-    //            DifferentCollectiveAsSuperiorError differentCollectiveAsSuperiorError =
( DifferentCollectiveAsSuperiorError ) element;
-    //            AttributeType source = ( AttributeType ) differentCollectiveAsSuperiorError.getSource();
-    //            AttributeType superior = ( AttributeType ) differentCollectiveAsSuperiorError.getSuperior();
-    //            return NLS
-    //                .bind(
-    //                    Messages.getString( "ProblemsViewLabelProvider.AttributeTypeCollective"
), new String[] { getDisplayName( source ), getDisplayName( superior ) } ); //$NON-NLS-1$
-    //        }
-    //
-    //        return ""; //$NON-NLS-1$
-    //    }
+    private String getMessage( LdapSchemaException exception )
+    {
+        if ( exception != null )
+        {
+            switch ( exception.getCode() )
+            {
+                // Codes for all Schema Objects
+                case NAME_ALREADY_REGISTERED:
+                    return getMessageNameAlreadyRegistered( exception );
+                case OID_ALREADY_REGISTERED:
+                    return getMessageOidAlreadyRegistered( exception );
+                case NONEXISTENT_SCHEMA:
+                    return getMessageNonExistentSchema( exception );
+
+                    // Codes for Attribute Type
+                case AT_NONEXISTENT_SUPERIOR:
+                    return getMessageATNonExistentSuperior( exception );
+                case AT_CANNOT_SUBTYPE_COLLECTIVE_AT:
+                    return getMessageATCannotSubtypeCollectiveAT( exception );
+                case AT_CYCLE_TYPE_HIERARCHY:
+                    return getMessageATCycleTypeHierarchy( exception );
+                case AT_NONEXISTENT_SYNTAX:
+                    return getMessageATNonExistentSyntax( exception );
+                case AT_SYNTAX_OR_SUPERIOR_REQUIRED:
+                    return getMessageATSyntaxOrSuperiorRequired( exception );
+                case AT_NONEXISTENT_EQUALITY_MATCHING_RULE:
+                    return getMessageATNonExistentEqualityMatchingRule( exception );
+                case AT_NONEXISTENT_ORDERING_MATCHING_RULE:
+                    return getMessageNonExistentOrderingMatchingRule( exception );
+                case AT_NONEXISTENT_SUBSTRING_MATCHING_RULE:
+                    return getMessageNonExistentSubstringMatchingRule( exception );
+                case AT_MUST_HAVE_SAME_USAGE_THAN_SUPERIOR:
+                    return getMessageATMustHaveSameUsageThanSuperior( exception );
+                case AT_USER_APPLICATIONS_USAGE_MUST_BE_USER_MODIFIABLE:
+                    return getMessageATUserApplicationsUsageMustBeUserModifiable( exception
);
+                case AT_COLLECTIVE_MUST_HAVE_USER_APPLICATIONS_USAGE:
+                    return getMessageATCollectiveMustHaveUserApplicationsUsage( exception
);
+                case AT_COLLECTIVE_CANNOT_BE_SINGLE_VALUED:
+                    return getMessageATCollectiveCannotBeSingleValued( exception );
+
+                    // Codes for Object Class
+
+                case OC_ABSTRACT_MUST_INHERIT_FROM_ABSTRACT_OC:
+                    return getMessageOCAbstractOCMustInheritFromAbstractOC( exception );
+                case OC_AUXILIARY_CANNOT_INHERIT_FROM_STRUCTURAL_OC:
+                    return getMessageOCAuxiliaryCannotInheritFromStructuralOC( exception
);
+                case OC_STRUCTURAL_CANNOT_INHERIT_FROM_AUXILIARY_OC:
+                    return getMessageOCStructuralCannotInheritFromAuxiliaryOC( exception
);
+                case OC_NONEXISTENT_SUPERIOR:
+                    return getMessageOCNonExistentSuperior( exception );
+                case OC_CYCLE_CLASS_HIERARCHY:
+                    return getMessageOCCycleClassHierarchy( exception );
+                case OC_COLLECTIVE_NOT_ALLOWED_IN_MUST:
+                    return getMessageOCCollectiveNotAllowedInMust( exception );
+                case OC_COLLECTIVE_NOT_ALLOWED_IN_MAY:
+                    return getMessageOCCollectiveNotAllowedInMay( exception );
+                case OC_DUPLICATE_AT_IN_MUST:
+                    return getMessageOCDuplicateATInMust( exception );
+                case OC_DUPLICATE_AT_IN_MAY:
+                    return getMessageOCDuplicateATInMay( exception );
+                case OC_NONEXISTENT_MUST_AT:
+                    return getMessageOCNonExistentMustAT( exception );
+                case OC_NONEXISTENT_MAY_AT:
+                    return getMessageOCNonExistentMayAT( exception );
+                case OC_DUPLICATE_AT_IN_MAY_AND_MUST:
+                    return getMessageOCDuplicateATInMayAndMust( exception );
+                    // Codes for Matching Rule
+
+                case MR_NONEXISTENT_SYNTAX:
+                    return getMessageMRNonExistentSyntax( exception );
+            }
+        }
+
+        return ""; //$NON-NLS-1$
+
+        //        if ( element instanceof DuplicateAliasError )
+        //        {
+        //            DuplicateAliasError duplicateAliasError = ( DuplicateAliasError ) element;
+        //
+        //            SchemaObject duplicate = duplicateAliasError.getDuplicate();
+        //            if ( duplicate instanceof AttributeType )
+        //            {
+        //                return NLS
+        //                        .bind(
+        //                            Messages.getString( "ProblemsViewLabelProvider.DuplicateAliasErrorAttributeType"
), new String[] { duplicateAliasError.getAlias(), duplicate.getOid() } ); //$NON-NLS-1$
+        //            }
+        //            else if ( duplicate instanceof ObjectClass )
+        //            {
+        //                return NLS
+        //                        .bind(
+        //                            Messages.getString( "ProblemsViewLabelProvider.DuplicateAliasErrorObjectClass"
), new String[] { duplicateAliasError.getAlias(), duplicate.getOid() } ); //$NON-NLS-1$
+        //            }
+        //        }
+        //        else if ( element instanceof DuplicateOidError )
+        //        {
+        //            DuplicateOidError duplicateOidError = ( DuplicateOidError ) element;
+        //            SchemaObject duplicate = duplicateOidError.getDuplicate();
+        //            if ( duplicate instanceof AttributeType )
+        //            {
+        //                return NLS
+        //                        .bind(
+        //                            Messages.getString( "ProblemsViewLabelProvider.DuplicateOidErrorAttributeType"
), new String[] { duplicateOidError.getOid(), duplicate.getName() } ); //$NON-NLS-1$
+        //            }
+        //            else if ( duplicate instanceof ObjectClass )
+        //            {
+        //                return NLS
+        //                        .bind(
+        //                            Messages.getString( "ProblemsViewLabelProvider.DuplicateOidErrorObjectClass"
), new String[] { duplicateOidError.getOid(), duplicate.getName() } ); //$NON-NLS-1$
+        //            }
+        //        }
+        //        else if ( element instanceof NonExistingATSuperiorError )
+        //        {
+        //            NonExistingATSuperiorError nonExistingATSuperiorError = ( NonExistingATSuperiorError
) element;
+        //            return NLS
+        //                    .bind(
+        //                        Messages.getString( "ProblemsViewLabelProvider.NonExistingSuperiorAttribute"
), new String[] { nonExistingATSuperiorError.getSuperiorAlias() } ); //$NON-NLS-1$
+        //        }
+        //        else if ( element instanceof NonExistingOCSuperiorError )
+        //        {
+        //            NonExistingOCSuperiorError nonExistingOCSuperiorError = ( NonExistingOCSuperiorError
) element;
+        //            return NLS
+        //                    .bind(
+        //                        Messages.getString( "ProblemsViewLabelProvider.NonExistingSuperiorObject"
), new String[] { nonExistingOCSuperiorError.getSuperiorAlias() } ); //$NON-NLS-1$
+        //        }
+        //        else if ( element instanceof NonExistingMandatoryATError )
+        //        {
+        //            NonExistingMandatoryATError nonExistingMandatoryATError = ( NonExistingMandatoryATError
) element;
+        //            return NLS
+        //                    .bind(
+        //                        Messages.getString( "ProblemsViewLabelProvider.NonExistingMandatoryAttribute"
), new String[] { nonExistingMandatoryATError.getAlias() } ); //$NON-NLS-1$
+        //        }
+        //        else if ( element instanceof NonExistingOptionalATError )
+        //        {
+        //            NonExistingOptionalATError nonExistingOptionalATError = ( NonExistingOptionalATError
) element;
+        //            return NLS
+        //                    .bind(
+        //                        Messages.getString( "ProblemsViewLabelProvider.NonExistingOptionalAttribute"
), new String[] { nonExistingOptionalATError.getAlias() } ); //$NON-NLS-1$
+        //        }
+        //        else if ( element instanceof NonExistingSyntaxError )
+        //        {
+        //            NonExistingSyntaxError nonExistingSyntaxError = ( NonExistingSyntaxError
) element;
+        //            return NLS
+        //                    .bind(
+        //                        Messages.getString( "ProblemsViewLabelProvider.NonExistingSyntax"
), new String[] { nonExistingSyntaxError.getSyntaxOid() } ); //$NON-NLS-1$
+        //        }
+        //        else if ( element instanceof NonExistingMatchingRuleError )
+        //        {
+        //            NonExistingMatchingRuleError nonExistingMatchingRuleError = ( NonExistingMatchingRuleError
) element;
+        //            return NLS
+        //                    .bind(
+        //                        Messages.getString( "ProblemsViewLabelProvider.NonExistingMatchingRule"
), new String[] { nonExistingMatchingRuleError.getMatchingRuleAlias() } ); //$NON-NLS-1$
+        //        }
+        //        else if ( element instanceof NoAliasWarning )
+        //        {
+        //            NoAliasWarning noAliasWarning = ( NoAliasWarning ) element;
+        //            SchemaObject source = noAliasWarning.getSourceObject();
+        //            if ( source instanceof AttributeType )
+        //            {
+        //                return NLS
+        //                        .bind(
+        //                            Messages.getString( "ProblemsViewLabelProvider.NoAliasWarningAttributeType"
), new String[] { source.getOid() } ); //$NON-NLS-1$
+        //            }
+        //            else if ( source instanceof ObjectClass )
+        //            {
+        //                return NLS
+        //                        .bind(
+        //                            Messages.getString( "ProblemsViewLabelProvider.NoAliasWarningObjectClass"
), new String[] { source.getOid() } ); //$NON-NLS-1$
+        //            }
+        //        }
+        //        else if ( element instanceof ClassTypeHierarchyError )
+        //        {
+        //            ClassTypeHierarchyError classTypeHierarchyError = ( ClassTypeHierarchyError
) element;
+        //            ObjectClass source = ( ObjectClass ) classTypeHierarchyError.getSourceObject();
+        //            ObjectClass superior = ( ObjectClass ) classTypeHierarchyError.getSuperior();
+        //            if ( source.getType().equals( ObjectClassTypeEnum.ABSTRACT ) )
+        //            {
+        //                if ( superior.getType().equals( ObjectClassTypeEnum.STRUCTURAL
) )
+        //                {
+        //                    return NLS
+        //                            .bind(
+        //                                Messages
+        //                                    .getString( "ProblemsViewLabelProvider.ClassTypeHierarchyErrorAbstractStructuralObject"
), new String[] { getDisplayName( source ), getDisplayName( superior ) } ); //$NON-NLS-1$
+        //                }
+        //                else if ( superior.getType().equals( ObjectClassTypeEnum.AUXILIARY
) )
+        //                {
+        //                    return NLS
+        //                            .bind(
+        //                                Messages
+        //                                    .getString( "ProblemsViewLabelProvider.ClassTypeHierarchyErrorAbstractAuxiliaryObject"
), new String[] { getDisplayName( source ), getDisplayName( superior ) } ); //$NON-NLS-1$
+        //                }
+        //            }
+        //            else if ( source.getType().equals( ObjectClassTypeEnum.AUXILIARY )
)
+        //            {
+        //                if ( superior.getType().equals( ObjectClassTypeEnum.STRUCTURAL
) )
+        //                {
+        //                    return NLS
+        //                            .bind(
+        //                                Messages
+        //                                    .getString( "ProblemsViewLabelProvider.ClassTypeHierarchyErrorAuxiliaryStructuralObject"
), new String[] { getDisplayName( source ), getDisplayName( superior ) } ); //$NON-NLS-1$
+        //                }
+        //                else
+        //                {
+        //                    return NLS
+        //                            .bind(
+        //                                Messages.getString( "ProblemsViewLabelProvider.ClassTypeHierarchyErrorAuxiliary"
), new String[] { getDisplayName( source ) } ); //$NON-NLS-1$
+        //                }
+        //            }
+        //        }
+        //        else if ( element instanceof DifferentUsageAsSuperiorError )
+        //        {
+        //            DifferentUsageAsSuperiorError differentUsageAsSuperiorError = ( DifferentUsageAsSuperiorError
) element;
+        //            AttributeType source = ( AttributeType ) differentUsageAsSuperiorError.getSourceObject();
+        //            AttributeType superior = ( AttributeType ) differentUsageAsSuperiorError.getSuperior();
+        //            return NLS
+        //                    .bind(
+        //                        Messages.getString( "ProblemsViewLabelProvider.AttributeTypeUsage"
), new String[] { getDisplayName( source ), getDisplayName( superior ) } ); //$NON-NLS-1$
+        //        }
+        //        else if ( element instanceof DifferentCollectiveAsSuperiorError )
+        //        {
+        //            DifferentCollectiveAsSuperiorError differentCollectiveAsSuperiorError
= ( DifferentCollectiveAsSuperiorError ) element;
+        //            AttributeType source = ( AttributeType ) differentCollectiveAsSuperiorError.getSourceObject();
+        //            AttributeType superior = ( AttributeType ) differentCollectiveAsSuperiorError.getSuperior();
+        //            return NLS
+        //                    .bind(
+        //                        Messages.getString( "ProblemsViewLabelProvider.AttributeTypeCollective"
), new String[] { getDisplayName( source ), getDisplayName( superior ) } ); //$NON-NLS-1$
+        //        }
+
+        //        return ""; //$NON-NLS-1$
+    }
+
+
+    private String getMessageNameAlreadyRegistered( LdapSchemaException exception )
+    {
+        SchemaObject duplicate = exception.getOtherObject();
+        String message = null;
+        if ( duplicate instanceof AttributeType )
+        {
+            message = Messages.getString( "ProblemsViewLabelProvider.DuplicateAliasErrorAttributeType"
); //$NON-NLS-1$
+        }
+        else if ( duplicate instanceof ObjectClass )
+        {
+            message = Messages.getString( "ProblemsViewLabelProvider.DuplicateAliasErrorObjectClass"
); //$NON-NLS-1$
+        }
+
+        return NLS.bind( message, new String[]
+            { exception.getRelatedId(), duplicate.getOid() } );
+    }
+
+
+    private String getMessageOidAlreadyRegistered( LdapSchemaException exception )
+    {
+        SchemaObject duplicate = exception.getOtherObject();
+        String message = null;
+        if ( duplicate instanceof AttributeType )
+        {
+            message = Messages.getString( "ProblemsViewLabelProvider.DuplicateOidErrorAttributeType"
); //$NON-NLS-1$
+        }
+        else if ( duplicate instanceof ObjectClass )
+        {
+            message = Messages.getString( "ProblemsViewLabelProvider.DuplicateOidErrorObjectClass"
); //$NON-NLS-1$
+        }
+        return NLS.bind( message, new String[]
+            { exception.getRelatedId(), duplicate.getName() } );
+    }
+
+
+    private String getMessageNonExistentSchema( LdapSchemaException exception )
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    private String getMessageATNonExistentSuperior( LdapSchemaException exception )
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    private String getMessageATCannotSubtypeCollectiveAT( LdapSchemaException exception )
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    private String getMessageATCycleTypeHierarchy( LdapSchemaException exception )
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    private String getMessageATNonExistentSyntax( LdapSchemaException exception )
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    private String getMessageATSyntaxOrSuperiorRequired( LdapSchemaException exception )
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    private String getMessageATNonExistentEqualityMatchingRule( LdapSchemaException exception
)
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    private String getMessageNonExistentOrderingMatchingRule( LdapSchemaException exception
)
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    private String getMessageNonExistentSubstringMatchingRule( LdapSchemaException exception
)
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    private String getMessageATMustHaveSameUsageThanSuperior( LdapSchemaException exception
)
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
 
-    private String getMessage( LdapSchemaException ldapSchemaException )
+
+    private String getMessageATUserApplicationsUsageMustBeUserModifiable( LdapSchemaException
exception )
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    private String getMessageATCollectiveMustHaveUserApplicationsUsage( LdapSchemaException
exception )
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    private String getMessageATCollectiveCannotBeSingleValued( LdapSchemaException exception
)
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    private String getMessageOCAbstractOCMustInheritFromAbstractOC( LdapSchemaException exception
)
     {
-        return ldapSchemaException.getCode().toString();
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    private String getMessageOCAuxiliaryCannotInheritFromStructuralOC( LdapSchemaException
exception )
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    private String getMessageOCStructuralCannotInheritFromAuxiliaryOC( LdapSchemaException
exception )
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    private String getMessageOCNonExistentSuperior( LdapSchemaException exception )
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    private String getMessageOCCycleClassHierarchy( LdapSchemaException exception )
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    private String getMessageOCCollectiveNotAllowedInMust( LdapSchemaException exception
)
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    private String getMessageOCCollectiveNotAllowedInMay( LdapSchemaException exception )
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    private String getMessageOCDuplicateATInMust( LdapSchemaException exception )
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    private String getMessageOCDuplicateATInMay( LdapSchemaException exception )
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    private String getMessageOCNonExistentMustAT( LdapSchemaException exception )
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    private String getMessageOCNonExistentMayAT( LdapSchemaException exception )
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    private String getMessageOCDuplicateATInMayAndMust( LdapSchemaException exception )
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    private String getMessageMRNonExistentSyntax( LdapSchemaException exception )
+    {
+        // TODO Auto-generated method stub
+        return null;
     }
 
 

Modified: directory/studio/trunk/pom.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/pom.xml?rev=1066507&r1=1066506&r2=1066507&view=diff
==============================================================================
--- directory/studio/trunk/pom.xml (original)
+++ directory/studio/trunk/pom.xml Wed Feb  2 15:56:03 2011
@@ -25,6 +25,7 @@
     <artifactId>project</artifactId>
     <version>19</version>
   </parent>
+  
 
   <groupId>org.apache.directory.studio</groupId>
   <artifactId>parent</artifactId>
@@ -1374,16 +1375,6 @@
       </dependency>
       <dependency>
         <groupId>org.apache.directory.shared</groupId>
-        <artifactId>shared-asn1-api</artifactId>
-        <version>${org.apache.directory.shared.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.directory.shared</groupId>
-        <artifactId>shared-asn1-ber</artifactId>
-        <version>${org.apache.directory.shared.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.directory.shared</groupId>
         <artifactId>shared-dsml-parser</artifactId>
         <version>${org.apache.directory.shared.version}</version>
       </dependency>



Mime
View raw message