Package javax.security.jacc

Examples of javax.security.jacc.PolicyContextException


   synchronized ContextPolicy getContextPolicy(String contextID)
      throws PolicyContextException
   {
      ContextPolicy policy = (ContextPolicy) openPolicies.get(contextID);
      if (policy == null)
         throw new PolicyContextException("No ContextPolicy exists for contextID=" + contextID);
      return policy;
   }
View Full Code Here


         configStateMachine.nextState(action);
      }
      catch(IllegalTransitionException e)
      {
         log.debug("validateState failure", e);
         throw new PolicyContextException("Operation not allowed", e);
      }
   }
View Full Code Here

            } else if (pae.getException() instanceof InstantiationException) {
                throw new ClassNotFoundException(factoryClassName[0] + " could not be instantiated");
            } else if (pae.getException() instanceof IllegalAccessException) {
                throw new ClassNotFoundException("Illegal access to " + factoryClassName);
            }
            throw new PolicyContextException(pae.getException());
        }
    }
View Full Code Here

            } else if (pae.getException() instanceof InstantiationException) {
                throw new ClassNotFoundException(factoryClassName[0] + " could not be instantiated");
            } else if (pae.getException() instanceof IllegalAccessException) {
                throw new ClassNotFoundException("Illegal access to " + factoryClassName);
            }
            throw new PolicyContextException(pae.getException());
        }
    }
View Full Code Here

    public GeronimoPolicyConfiguration getGeronimoPolicyConfiguration(String contextID) throws PolicyContextException {
        GeronimoPolicyConfiguration configuration = (GeronimoPolicyConfiguration) configurations.get(contextID);

        if (configuration == null) {
            throw new PolicyContextException("No policy configuration registered for contextID: " + contextID);
        }

        log.trace("Get policy configuration " + contextID);
        return configuration;
    }
View Full Code Here

    public GeronimoPolicyConfiguration getGeronimoPolicyConfiguration(String contextID) throws PolicyContextException {
        GeronimoPolicyConfiguration configuration = (GeronimoPolicyConfiguration) configurations.get(contextID);

        if (configuration == null) {
            throw new PolicyContextException("No policy configuration registered for contextID: " + contextID);
        }

        log.trace("Get policy configuration " + contextID);
        return configuration;
    }
View Full Code Here

    public Object getContext(String key, Object data) throws PolicyContextException {
        try {
            return ContextManager.getCurrentCaller();
        } catch (Exception e) {
            throw new PolicyContextException(e);
        }
    }
View Full Code Here

            throws PolicyContextException {
        PolicyConfigurationFactory pfi = null;
        try {
            pfi = PolicyConfigurationFactory.getPolicyConfigurationFactory();
        } catch (java.lang.ClassNotFoundException cne) {
            throw new PolicyContextException(cne);
        }
        return pfi.getPolicyConfiguration(contextId, false);
    }
View Full Code Here

        if (pcf == null) {
            try {
                pcf = PolicyConfigurationFactory.getPolicyConfigurationFactory();
            } catch (ClassNotFoundException cnfe) {
                logger.severe("jaccfactory.notfound");
                throw new PolicyContextException(cnfe);
            } catch (PolicyContextException pce) {
                logger.severe("jaccfactory.notfound");
                throw pce;
            }
        }
View Full Code Here

    throw new ClassNotFoundException(msg,cnfe);
      } catch(java.lang.IllegalAccessException iae){
    msg = new String
        ("JACC:Error PolicyConfigurationFactory : cannot access class : "
         + classname[0]);
    throw new PolicyContextException(msg,iae);
      } catch(java.lang.InstantiationException ie){
    msg = new String
        ("JACC:Error PolicyConfigurationFactory : cannot instantiate : "
         + classname[0]);
    throw new PolicyContextException(msg,ie);
      } catch(java.lang.ClassCastException cce){
    msg = new String
        ("JACC:Error PolicyConfigurationFactory : class not PolicyConfigurationFactory : "+ classname[0]);
    throw new ClassCastException(msg);
      }
View Full Code Here

TOP

Related Classes of javax.security.jacc.PolicyContextException

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.