Examples of ResultCodeEnum


Examples of org.apache.directory.shared.ldap.model.message.ResultCodeEnum

        LdapResult result = req.getResultResponse().getLdapResult();

        /*
         * Set the result code or guess the best option.
         */
        ResultCodeEnum code;

        if ( e instanceof LdapOperationException )
        {
            code = ( (LdapOperationException) e ).getResultCode();
        }
        else
        {
            code = ResultCodeEnum.getBestEstimate( e, req.getType() );
        }

        result.setResultCode( code );

        /*
         * Setup the error message to put into the request and put entire
         * exception into the message if we are in debug mode.  Note we
         * embed the result code name into the message.
         */
        String msg = code.toString() + ": failed for " + req + ": " + e.getLocalizedMessage();
        LOG.debug( msg, e );

        if ( IS_DEBUG )
        {
            msg += ":\n" + ExceptionUtils.getStackTrace( e );
View Full Code Here

Examples of org.apache.ldap.common.message.ResultCodeEnum

        Attribute objectClass = attrs.get( "objectClass" );
        if ( objectClass.contains( "alias" ) )
        {
            String msg = "Attempt to add entry to alias '" + upName
                    + "' not allowed.";
            ResultCodeEnum rc = ResultCodeEnum.ALIASPROBLEM;
            NamingException e = new LdapNamingException( msg, rc );
            e.setResolvedName( parentDn );
            throw e;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.