Package javax.naming

Examples of javax.naming.NoPermissionException


    {
        Dn target = buildTarget( JndiUtils.fromName( name ) );

        if ( target.size() == 0 )
        {
            throw new NoPermissionException( I18n.err( I18n.ERR_492 ) );
        }

        try
        {
            doDeleteOperation( target );
View Full Code Here


        Dn oldDn = buildTarget( JndiUtils.fromName( oldName ) );
        Dn newDn = buildTarget( JndiUtils.fromName( newName ) );

        if ( oldDn.size() == 0 )
        {
            throw new NoPermissionException( I18n.err( I18n.ERR_312 ) );
        }

        // calculate parents
        Dn oldParent = oldDn;
View Full Code Here

            {
                AttributeType attributeType = schemaManager.lookupAttributeTypeRegistry( atav.getUpType() );

                if ( !attributeType.isUserModifiable() )
                {
                    throw new NoPermissionException( "Cannot modify the attribute '" + atav.getUpType() + "'" );
                }
            }
        }

        next.rename( opContext );
View Full Code Here

                if ( !attributeType.equals( MODIFIERS_NAME_ATTRIBUTE_TYPE ) &&
                     !attributeType.equals( MODIFY_TIMESTAMP_ATTRIBUTE_TYPE ) )
                {
                    String msg = I18n.err( I18n.ERR_52, attributeType );
                    LOG.error( msg );
                    throw new NoPermissionException( msg );
                }
            }
           
            switch ( mod.getOperation() )
            {
View Full Code Here

        {
            ne = new NamingException( t.getLocalizedMessage() );
        }
        else if ( t instanceof LdapNoPermissionException )
        {
            ne = new NoPermissionException( t.getLocalizedMessage() );
        }
        else if ( t instanceof LdapNoSuchAttributeException)
        {
            ne = new NoSuchAttributeException( t.getLocalizedMessage() );
        }
View Full Code Here

        {
            ne = new NamingException( t.getLocalizedMessage() );
        }
        else if ( t instanceof LdapNoPermissionException )
        {
            ne = new NoPermissionException( t.getLocalizedMessage() );
        }
        else if ( t instanceof LdapNoSuchAttributeException)
        {
            ne = new NoSuchAttributeException( t.getLocalizedMessage() );
        }
View Full Code Here

     */
    @SuppressWarnings("deprecation") //$NON-NLS-1$
    protected NamingException newNamingException(Throwable e) {
        NamingException ret =
                  (e instanceof AccessException)
                        ? new NoPermissionException()
                : (e instanceof ConnectException)
                        ? new ServiceUnavailableException()
                : (e instanceof ConnectIOException)
               || (e instanceof ExportException)
               || (e instanceof MarshalException)
View Full Code Here

        if (! (System.getSecurityManager() instanceof RMISecurityManager)) {
            try {
                System.setSecurityManager(new RMISecurityManager());
            } catch (SecurityException e) {
                // jndi.84=Cannot install RMISecurityManager
                throw (NoPermissionException) new NoPermissionException(
                        Messages.getString("jndi.84")).initCause(e); //$NON-NLS-1$
            }
        }
    }
View Full Code Here

                Enumeration<ResourceRecord> records = resolver.lookup(nameToLookFor.toString(),
                        types, classes);

                attrs = createAttributesFromRecords(records);
            } catch (SecurityException e) {
                NoPermissionException e2 = new NoPermissionException();

                e2.setRootCause(e);
                throw e2;
            } catch (NamingException e) {
                throw e;
            } catch (Exception e) {
                NamingException ne = new NamingException();
View Full Code Here

                Attributes attrs = createAttributesFromRecords(records);

                result = DirectoryManager.getObjectInstance(
                        resolvedCtx, name, this, environment, attrs);
            } catch (SecurityException e) {
                NoPermissionException e2 =
                        new NoPermissionException(e.getMessage());

                e2.setRootCause(e);
                throw e2;
            } catch (NamingException e) {
                throw e;
            } catch (Exception e) {
                NamingException ne = new NamingException(e.getMessage());
View Full Code Here

TOP

Related Classes of javax.naming.NoPermissionException

Copyright © 2018 www.massapicom. 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.