Examples of PolicyReader


Examples of com.sun.xacml.support.finder.PolicyReader

    }

    @Override
    public void init(PolicyFinder finder) {

        PolicyReader reader = null;
        try {

            if (validate)
                reader = new PolicyReader(finder, logger, new File(GeoXACML.getPolicyXMLSchemaURL()
                        .toURI()));
            else
                reader = new PolicyReader(finder, logger);
        } catch (URISyntaxException e) {
            // should not happen
        }
        readPolicies(policiesByReference, BY_REFERENCE_DIR, reader);
        readPolicies(policiesByRequest, BY_REQUEST_DIR, reader);
View Full Code Here

Examples of com.sun.xacml.support.finder.PolicyReader

    */
   public void init(PolicyFinder finder)
   {
      String clazzName = getClass().getName();
       // Load the policies
       PolicyReader reader = new PolicyReader(finder,
             java.util.logging.Logger.getLogger(clazzName), schemaFile);

       Iterator it = policyList.iterator();
       while (it.hasNext())
       {
           String str = (String)(it.next());
           AbstractPolicy policy = null;
           try
           {
              try
              {
                      // first try to load it as a URL
                      URL url = new URL(str);
                      policy = reader.readPolicy(url);
               }
               catch (MalformedURLException murle)
               {
                      // assume that this is a filename, and try again
                      policy = reader.readPolicy(new File(str));
               }
           }
           catch (ParsingException e)
           {
              this.encounteredParsingException = true;
View Full Code Here

Examples of com.sun.xacml.support.finder.PolicyReader

    */
   public void init(PolicyFinder finder)
   {
      String clazzName = getClass().getName();
       // Load the policies
       PolicyReader reader = new PolicyReader(finder,
             java.util.logging.Logger.getLogger(clazzName), schemaFile);

       Iterator it = policyList.iterator();
       while (it.hasNext())
       {
           String str = (String)(it.next());
           AbstractPolicy policy = null;
           try
           {
              try
              {
                      // first try to load it as a URL
                      URL url = new URL(str);
                      policy = reader.readPolicy(url);
               }
               catch (MalformedURLException murle)
               {
                      // assume that this is a filename, and try again
                      policy = reader.readPolicy(new File(str));
               }
           }
           catch (ParsingException e)
           {
              this.encounteredParsingException = true;
View Full Code Here

Examples of com.sun.xacml.support.finder.PolicyReader

/*     */
/*     */   public void init(PolicyFinder finder)
/*     */   {
/* 214 */     String clazzName = getClass().getName();
/*     */
/* 216 */     PolicyReader reader = new PolicyReader(finder, java.util.logging.Logger.getLogger(clazzName), this.schemaFile);
/*     */
/* 219 */     Iterator it = this.policyList.iterator();
/* 220 */     while (it.hasNext())
/*     */     {
/* 222 */       String str = (String)(String)it.next();
/* 223 */       AbstractPolicy policy = null;
/*     */       try
/*     */       {
/*     */         try
/*     */         {
/* 229 */           URL url = new URL(str);
/* 230 */           policy = reader.readPolicy(url);
/*     */         }
/*     */         catch (MalformedURLException murle)
/*     */         {
/* 235 */           policy = reader.readPolicy(new File(str));
/*     */         }
/*     */       }
/*     */       catch (ParsingException e)
/*     */       {
/* 240 */         this.encounteredParsingException = true;
View Full Code Here

Examples of com.sun.xacml.support.finder.PolicyReader

    }

    @Override
    public void init(PolicyFinder finder) {

        PolicyReader reader = null;
        try {

            if (validate)
                reader = new PolicyReader(finder, logger, new File(GeoXACML.getPolicyXMLSchemaURL()
                        .toURI()));
            else
                reader = new PolicyReader(finder, logger);
        } catch (URISyntaxException e) {
            // should not happen
        }
        readPolicies(policiesByReference, BY_REFERENCE_DIR, reader);
        readPolicies(policiesByRequest, BY_REQUEST_DIR, reader);
View Full Code Here

Examples of de.netsysit.model.PolicyReader

    public static void readPolicyFile(File f, DataBaseModel m) {
        if (f == null) {
            return;
        }
       
        PolicyReader pr = new XMLPolicyReader();
        pr.loadPolicy(f, m);
    }
View Full Code Here

Examples of org.apache.ws.policy.util.PolicyReader

         "      </wsse:SecurityToken>" +
         "    </wsp:All>" +
         "  </wsp:ExactlyOne>" +
         "</wsp:Policy>";

      PolicyReader reader = PolicyFactory.getPolicyReader(PolicyFactory.DOM_POLICY_READER);
      PolicyWriter writer = PolicyFactory.getPolicyWriter(PolicyFactory.StAX_POLICY_WRITER);
      Policy p = reader.readPolicy(new ByteArrayInputStream(inStr.getBytes()));

      //writer.writePolicy(p, System.out);     
   }
View Full Code Here

Examples of org.apache.ws.policy.util.PolicyReader

        return null;
    }

    private Policy getPolicyFromElement(Element element) {
        InputStream policyInputStream = createInputStream(element);
        PolicyReader reader = PolicyFactory
                .getPolicyReader(PolicyFactory.OM_POLICY_READER);
        return reader.readPolicy(policyInputStream);
    }
View Full Code Here

Examples of org.apache.ws.policy.util.PolicyReader

            Policy policy = reg.lookup(uriString);
            if (policy == null) {
                try {
                    URI policyURI = new URI(uriString);
                    URL policyURL = policyURI.toURL();
                    PolicyReader reader = PolicyFactory
                            .getPolicyReader(PolicyFactory.OM_POLICY_READER);
                    Policy newPolicy = reader
                            .readPolicy(policyURL.openStream());
                    reg.register(uriString, newPolicy);

                } catch (Exception e) {
                    e.printStackTrace();
View Full Code Here

Examples of org.codehaus.loom.xmlpolicy.reader.PolicyReader

    {
        final SarPolicyResolver resolver = new SarPolicyResolver(
            baseDirectory, workDirectory );
        setupLogger( resolver );
        final PolicyBuilder builder = new PolicyBuilder();
        final PolicyReader reader = new PolicyReader();
        final SarPolicyVerifier verifier = new SarPolicyVerifier();
        setupLogger( verifier );

        final Element element = ConfigurationUtil.toElement( configuration );
        final HashMap newData = new HashMap();
        newData.putAll( m_data );
        newData.putAll( data );
        newData.put( "/", File.separator );

        m_expander.expandValues( element, newData );

        element.setAttribute( "version", "1.0" );
        try
        {
            final PolicyMetaData policy = reader.readPolicy( element );
            verifier.verifyPolicy( policy );
            return builder.buildPolicy( policy, resolver );
        }
        catch( final Exception e )
        {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.