Package java.security

Examples of java.security.AccessControlException


          if (!aLines[0].startsWith("# Password record")) {
            if (DebugFile.trace) {
              DebugFile.writeln("AccessControlException Invalid password or encryption method");
              DebugFile.decIdent();
            }
            throw new AccessControlException("Invalid password or encryption method");
          } // fi # Password record

          for (int l=1; l<aLines.length; l++) {
            String[] aLine = Gadgets.split(aLines[l],'|');
            PasswordRecordLine oRecLin = new PasswordRecordLine(aLine[0],aLine[1].charAt(0),aLine[2]);
View Full Code Here


        while ( strok.hasMoreTokens() )
        {
            String element = strok.nextToken();
            if ( element.indexOf( '*' ) >= 0 )
            {
                throw new AccessControlException( WrapperManager.getRes().getString( "can't define '*' inside a sequence." ) );
            }
            int range = element.indexOf( "-" );
            if ( range >= 0 )
            {
                if ( range == 0 )
                {
                    if ( m_eventArr.size() != 0 )
                    {
                        throw new AccessControlException( WrapperManager.getRes().getString( "Value {0} has to be first element in sequence.", element ) );
                    }
                    else
                    {
                        lastValue = Integer.parseInt( element.substring( 1 ) );
                        if ( lastValue <= EVENT_MIN || lastValue > EVENT_MAX )
                        {
                            throw new AccessControlException( WrapperManager.getRes().getString( "Value {0} is out of bounds.", new Integer( lastValue ) ) );
                        }
                        m_eventArr.add( new String( EVENT_MIN + "-" + lastValue ) );
                    }
                }
                else if ( range == element.length() - 1 )
                {
                    currentValue = Integer.parseInt( element.substring( 0, element.length() - 1 ) );
                    if ( currentValue <= EVENT_MIN || currentValue > EVENT_MAX )
                    {
                        throw new AccessControlException( WrapperManager.getRes().getString( "Value {0} is out of bounds.", new Integer( lastValue ) ) );
                    }
                    if ( currentValue < lastValue )
                    {
                        throw new AccessControlException( WrapperManager.getRes().getString( "Value {0} is not sorted.", new Integer( currentValue ) ) );
                    }
                    lastValue = currentValue;
                    if ( strok.hasMoreTokens() )
                    {
                        throw new AccessControlException( WrapperManager.getRes().getString( "Value {0} has to be last element in sequence.", element ) );
                    }
                    m_eventArr.add( currentValue + "-" + EVENT_MAX );
                }
                else
                {
                    currentValue = Integer.parseInt( element.substring( 0, range ) );
                    if ( currentValue <= EVENT_MIN || currentValue > EVENT_MAX )
                    {
                        throw new AccessControlException( WrapperManager.getRes().getString( "Value {0} is out of bounds.", new Integer( lastValue ) ) );
                    }
                    if ( currentValue < lastValue )
                    {
                        throw new AccessControlException( WrapperManager.getRes().getString( "Value {0} is not sorted.", new Integer( currentValue ) ) );
                    }
                    lastValue = currentValue;
                    currentValue = Integer.parseInt( element.substring( range + 1 ) );
                    if ( currentValue <= EVENT_MIN || currentValue > EVENT_MAX )
                    {
                        throw new AccessControlException( WrapperManager.getRes().getString( "Value {0} is out of bounds.", new Integer( lastValue ) ) );
                    }
                    if ( currentValue < lastValue )
                    {
                        throw new AccessControlException( WrapperManager.getRes().getString( "Value {0} is not sorted.", new Integer( currentValue ) ) );
                    }
                    m_eventArr.add( lastValue + "-" + currentValue );
                    lastValue = currentValue;
                }
            }
View Full Code Here

                clazz = Class.forName( cName );
                classCache.put( cName, clazz );
            }
            else
            {
                throw new AccessControlException( "EJOE does not permit usage of \"" + cName
                        + "\" for remote reflection calls!" );
            }
        }

        return clazz;
View Full Code Here

    /** {@inheritDoc} */
    public void checkPermission(String path, String actions)
            throws AccessControlException, RepositoryException {
        if (!hasPermission(path, actions)) {
            throw new AccessControlException(
                    "No permission for " + actions + " on " + path);
        }
    }
View Full Code Here

    /**
     * @see javax.jcr.Session#checkPermission(String, String)
     */
    public void checkPermission(String absPath, String actions) throws AccessControlException, RepositoryException {
        if (!hasPermission(absPath, actions)) {
            throw new AccessControlException("Access control violation: path = " + absPath + ", actions = " + actions);
        }
    }
View Full Code Here

    {
        if(desiredState == State.DELETED)
        {
            if (!_broker.getSecurityManager().authoriseConfiguringBroker(getName(), KeyStore.class, Operation.DELETE))
            {
                throw new AccessControlException("Deletion of key store is denied");
            }
        }
    }
View Full Code Here

    private void authoriseSetAttribute()
    {
        if (!_broker.getSecurityManager().authoriseConfiguringBroker(getName(), KeyStore.class, Operation.UPDATE))
        {
            throw new AccessControlException("Setting key store attributes is denied");
        }
    }
View Full Code Here

        {
            _exchange.getExchange().removeBinding(_binding);
        }
        catch(AMQSecurityException e)
        {
            throw new AccessControlException(e.getMessage());
        }
        catch(AMQInternalException e)
        {
            throw new IllegalStateException(e);
        }
View Full Code Here

            {
                saveAuthorisedSubject(session, subject, actor);
            }
            else
            {
                throw new AccessControlException("Access to the management interface denied");
            }
        }
    }
View Full Code Here

         });

         MBeanTrustPermission permission = new MBeanTrustPermission("register");
         if (!domain.implies(permission))
         {
            throw new AccessControlException("Access denied " + permission + ": MBean class " + cls.getName() + " is not trusted for registration");
         }
      }
   }
View Full Code Here

TOP

Related Classes of java.security.AccessControlException

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.