private String getMessage()

in plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsViewLabelProvider.java [134:207]


    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 getMessageATNonExistentOrderingMatchingRule( exception );
                case AT_NONEXISTENT_SUBSTRING_MATCHING_RULE:
                    return getMessageATNonExistentSubstringMatchingRule( 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 getMessageOCAbstractMustInheritFromAbstractOC( 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$
    }