public Name parse( String n ) throws NamingException { try { return JndiUtils.toName( new Dn( name.toString() ) ); } catch ( LdapInvalidDnException lide ) { throw new InvalidNameException( lide.getMessage() ); } } };
/** * Matches the equals character. * * @param name the name * @param pos the pos * * @throws LdapInvalidDnException the invalid name exception */ private static void matchEquals( char[] name, Position pos ) throws LdapInvalidDnException { char c = nextChar( name, pos, true ); if ( c != '=' ) { throw new LdapInvalidDnException( ResultCodeEnum.INVALID_DN_SYNTAX, I18n.err( I18n.ERR_13609_EQUAL_EXPECTED, c, pos.start ) ); } }
/** * Creates a new instance of LdapInvalidDnException. * * @param resultCode the ResultCodeEnum for this exception */ public LdapInvalidDnException( ResultCodeEnum resultCode ) { super( null ); checkResultCode( resultCode ); this.resultCode = resultCode; }
case NAMING_VIOLATION: LdapInvalidDnException ldapInvalidDnException = new LdapInvalidDnException( ldapResult.getResultCode(), ldapResult.getDiagnosticMessage() ); ldapInvalidDnException.setResolvedDn( ldapResult.getMatchedDn() );
.getLocalizedMessage() ); LOG.error( msg ); throw new DecoderException( I18n.err( I18n.ERR_05107_INCORRECT_DN_GIVEN, ine.getLocalizedMessage() ), ine );
case NAMING_VIOLATION: LdapInvalidDnException ldapInvalidDnException = new LdapInvalidDnException( ldapResult.getResultCode(), ldapResult.getDiagnosticMessage() ); ldapInvalidDnException.setResolvedDn( ldapResult.getMatchedDn() );
.getLocalizedMessage() ); LOG.error( msg ); throw new DecoderException( I18n.err( I18n.ERR_05107_INCORRECT_DN_GIVEN, ine.getLocalizedMessage() ), ine );
LOG.error( e.getMessage(), e ); throw new LdapException( e.getMessage(), e );
/** * Matches the equals character. * * @param name the name * @param pos the pos * * @throws LdapInvalidDnException the invalid name exception */ private static void matchEquals( char[] name, Position pos ) throws LdapInvalidDnException { char c = nextChar( name, pos, true ); if ( c != '=' ) { throw new LdapInvalidDnException( ResultCodeEnum.INVALID_DN_SYNTAX, I18n.err( I18n.ERR_13609_EQUAL_EXPECTED, c, pos.start ) ); } }
case NAMING_VIOLATION: LdapInvalidDnException ldapInvalidDnException = new LdapInvalidDnException( ldapResult.getResultCode(), ldapResult.getDiagnosticMessage() ); ldapInvalidDnException.setResolvedDn( ldapResult.getMatchedDn() );
/** * Creates a new instance of LdapInvalidDnException. * * @param resultCode the ResultCodeEnum for this exception * @param message The exception message */ public LdapInvalidDnException( ResultCodeEnum resultCode, String message ) { super( message ); checkResultCode( resultCode ); this.resultCode = resultCode; }
.getLocalizedMessage() ); LOG.error( msg ); throw new DecoderException( I18n.err( I18n.ERR_05107_INCORRECT_DN_GIVEN, ine.getLocalizedMessage() ), ine );
public Name parse( String name ) throws NamingException { try { return JndiUtils.toName( new Dn( name ) ); } catch ( LdapInvalidDnException lide ) { throw new InvalidNameException( lide.getMessage() ); } } };
/** * Matches the equals character. * * @param name the name * @param pos the pos * * @throws LdapInvalidDnException the invalid name exception */ private static void matchEquals( char[] name, Position pos ) throws LdapInvalidDnException { char c = nextChar( name, pos, true ); if ( c != '=' ) { throw new LdapInvalidDnException( ResultCodeEnum.INVALID_DN_SYNTAX, I18n.err( I18n.ERR_13609_EQUAL_EXPECTED, c, pos.start ) ); } }
/** * Creates a new instance of LdapInvalidDnException. * * @param resultCode the ResultCodeEnum for this exception */ public LdapInvalidDnException( ResultCodeEnum resultCode ) { super( null ); checkResultCode( resultCode ); this.resultCode = resultCode; }
throw new XmlPullParserException( I18n.err( I18n.ERR_03039_PARSING_ERROR, lide.getLocalizedMessage() ), xpp, lide );
LOG.error( e.getMessage(), e ); throw new LdapException( e.getMessage(), e );
/** * Parses an Dn. * * @param schemaManager The SchemaManager * @param name the string representation of the distinguished name * @param rdns the (empty) list where parsed RDNs are put to * @return The normalized Dn * * @throws LdapInvalidDnException the invalid name exception */ /* No protection*/String parseDn( SchemaManager schemaManager, String name, List<Rdn> rdns ) throws LdapInvalidDnException { AntlrDnParser dnParser = new AntlrDnParser( new AntlrDnLexer( new StringReader( name ) ) ); try { return dnParser.relativeDistinguishedNames( schemaManager, rdns ); } catch ( Exception e ) { throw new LdapInvalidDnException( ResultCodeEnum.INVALID_DN_SYNTAX, e.getMessage(), e ); } }
/** * Creates a new instance of LdapInvalidDnException. * * @param resultCode the ResultCodeEnum for this exception */ public LdapInvalidDnException( ResultCodeEnum resultCode ) { super( null ); checkResultCode( resultCode ); this.resultCode = resultCode; }
.getLocalizedMessage() ); LOG.error( msg );