Examples of UnifiedVirtualFile


Examples of org.jboss.wsf.spi.deployment.UnifiedVirtualFile

      return builder;
   }

   public void processPolicyAnnotations(EndpointMetaData epMetaData, Class<?> sepClass)
   {
      UnifiedVirtualFile vfRoot = epMetaData.getServiceMetaData().getUnifiedMetaData().getRootFile();
      for (org.jboss.ws.extensions.policy.annotation.Policy anPolicy : sepClass.getAnnotation(PolicyAttachment.class).value())
      {
         InputStream is = null;
         try
         {
            String policyFileLocation = anPolicy.policyFileLocation();
            if (policyFileLocation.length() == 0)
               throw new IllegalStateException("Cannot obtain @Policy.policyFileLocation");
           
            // The root virtual file is the uniform way to obtain resources
            // It should work in all containers, server/client side
            UnifiedVirtualFile vfPolicyFile = vfRoot.findChild(policyFileLocation);
            is = vfPolicyFile.toURL().openStream();
           
            DOMPolicyReader reader = (DOMPolicyReader)PolicyFactory.getPolicyReader(PolicyFactory.DOM_POLICY_READER);
            Policy unnormalizedPolicy = reader.readPolicy(is);
            Policy normPolicy = (Policy)unnormalizedPolicy.normalize();
            log.info("Deploying Annotated Policy = " + policyFileLocation);
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.