Package org.jboss.security.xacml.sunxacml.ctx

Examples of org.jboss.security.xacml.sunxacml.ctx.RequestCtx


      attributeModules.add(new SelectorModule());
      attributeFinder.setModules(attributeModules);

      org.jboss.security.xacml.sunxacml.PDP pdp =
         new org.jboss.security.xacml.sunxacml.PDP(new PDPConfig(attributeFinder, policyFinder, null));
      RequestCtx req = (RequestCtx) request.get(XACMLConstants.REQUEST_CTX);
      if (req == null)
         throw new IllegalStateException("Request Context does not contain a request");

      ResponseCtx resp = pdp.evaluate(req);
View Full Code Here


    */
   public void readRequest(InputStream is) throws IOException
   {
      try
      {
         RequestCtx request = RequestCtx.getInstance(getRequest(is));
         set(XACMLConstants.REQUEST_CTX, request);
      }
      catch (Exception e)
      {
         throw new RuntimeException(e);
View Full Code Here

    */
   public void readRequest(Node node) throws IOException
   {
      try
      {
         RequestCtx request = RequestCtx.getInstance(node);
         set(XACMLConstants.REQUEST_CTX, request);
      }
      catch (Exception e)
      {
         throw new RuntimeException(e);
View Full Code Here

   /**
    * @see RequestContext#marshall(OutputStream)
    */
   public void marshall(OutputStream os) throws IOException
   {
      RequestCtx storedRequest = get(XACMLConstants.REQUEST_CTX);   
      if(storedRequest != null)
         storedRequest.encode(os);
   }
View Full Code Here

   /**
    * @see PolicyDecisionPoint#evaluate(RequestContext)
    */
   public ResponseContext evaluate(RequestContext request)
   {
      RequestCtx req = (RequestCtx) request.get(XACMLConstants.REQUEST_CTX);
      if (req == null)
         throw new IllegalStateException("Request Context does not contain a request");

      //Check if PDP is null
      if(policyDecisionPoint == null)
View Full Code Here

     * @param input a stream that contains an XML RequestType
     *
     * @return a stream that contains an XML ResponseType
     */
    public OutputStream evaluate(InputStream input) {
        RequestCtx request = null;
        ResponseCtx response = null;

        try {
            request = RequestCtx.getInstance(input);
        } catch (Exception pe) {
View Full Code Here

    * @throws ParsingException if the Request is invalid
    */
   public ResponseCtx evaluate(String requestFile) throws IOException, ParsingException
   {
      // setup the request based on the file
      RequestCtx request = RequestCtx.getInstance(new FileInputStream(requestFile));

      // evaluate the request
      return pdp.evaluate(request);
   }
View Full Code Here

   @SuppressWarnings("unchecked")
   public void testMultipleResourceIds() throws Exception
   {
      String fileName = "src/test/resources/requests/multiple-resourceid.xml";
     
      RequestCtx req = RequestCtx.getInstance(new FileInputStream(new File(fileName)));
      assertNotNull("Request is not null", req);
      Set resources = req.getResource();
      assertTrue("Multiple resources", resources.size() > 1);
   }
View Full Code Here

   }
  
   public ResponseCtx evaluate(String requestFile) throws Exception
   {
      InputStream is = new FileInputStream(requestFile);
      RequestCtx request = RequestCtx.getInstance(is);
      return pdp.evaluate(request);
   }
View Full Code Here

    * @throws ParsingException if the Request is invalid
    */
   public ResponseCtx evaluate(String requestFile) throws IOException, ParsingException
   {
      // setup the request based on the file
      RequestCtx request = RequestCtx.getInstance(new FileInputStream(requestFile));

      // evaluate the request
      return pdp.evaluate(request);
   }
View Full Code Here

TOP

Related Classes of org.jboss.security.xacml.sunxacml.ctx.RequestCtx

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.