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


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

    public GeronimoPolicyConfiguration getGeronimoPolicyConfiguration(String contextID) throws PolicyContextException {
        GeronimoPolicyConfiguration configuration = 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 void addRoleMapping(String role, Collection principals) throws PolicyContextException {
        Iterator iter = principals.iterator();
        while (iter.hasNext()) {
            Principal principal = (Principal) iter.next();

            if (!(principal instanceof RealmPrincipal)) throw new PolicyContextException("Principal not instance of RealmPrincipal");

            HashSet roles = (HashSet) principalRoleMapping.get(principal);
            if (roles == null) {
                roles = new HashSet();
                principalRoleMapping.put(principal, roles);
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

    public void addRoleMapping(String role, Collection principals) throws PolicyContextException {
        Iterator iter = principals.iterator();
        while (iter.hasNext()) {
            Principal principal = (Principal) iter.next();

            if (!(principal instanceof RealmPrincipal)) throw new PolicyContextException("Principal not instance of RealmPrincipal");

            HashSet roles = (HashSet) principalRoleMapping.get(principal);
            if (roles == null) {
                roles = new HashSet();
                principalRoleMapping.put(principal, roles);
View Full Code Here

    public void addRoleMapping(String role, Collection principals) throws PolicyContextException {
        Iterator iter = principals.iterator();
        while (iter.hasNext()) {
            Principal principal = (Principal) iter.next();

            if (!(principal instanceof RealmPrincipal)) throw new PolicyContextException("Principal not instance of RealmPrincipal");

            HashSet roles = (HashSet) principalRoleMapping.get(principal);
            if (roles == null) {
                roles = new HashSet();
                principalRoleMapping.put(principal, roles);
View Full Code Here

   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

            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

             * to invoke the policy context handler.
             */
            roleMapper = (JACCRoleMapper) PolicyContext.getContext(JACCRoleMapper.HANDLER_KEY);

            if (roleMapper == null) {
                throw new PolicyContextException("RoleMapper.lookup.null");
            }
        } catch (Throwable t) {
            SharedState.getLogger().log(Level.SEVERE, "RoleMapper.lookup.failed", t);
            if (t instanceof PolicyContextException) {
                throw (PolicyContextException) t;
            } else {
                throw new PolicyContextException(t);
            }
        }

        pcwLock.lock();
        try {
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.