Package org.jboss.deployers.vfs.spi.structure

Examples of org.jboss.deployers.vfs.spi.structure.VFSDeploymentContext


      saveAttachment(ctx, comp, false);
   }

   public void saveAttachment(String deploymentName, ManagedComponent component, boolean remove) throws Exception
   {
      VFSDeploymentContext ctx = getDeploymentContext(deploymentName);
      if(ctx == null)
         throw new IllegalStateException("Cannot persist attachment, failed to find deployment: " + deploymentName);

      // Create the path
      String deploymentPath = createRelativeDeploymentPath(ctx.getName(), ctx.getSimpleName());

      // Load previous saved information
      RepositoryAttachmentMetaData repositoryMetaData = loadAttachmentMetaData(deploymentPath);
      if(repositoryMetaData == null)
      {
         repositoryMetaData = RepositoryAttachmentMetaDataFactory.createInstance();
         repositoryMetaData.setDeploymentName(ctx.getSimpleName());
      }

      // Get the parent MO
      ManagedCommon parent = component;
      while(parent.getParent() != null)
View Full Code Here


            getCache().invalidateCache(root.getPathName());
         }
         return result;
      }

      VFSDeploymentContext deploymentContext;
      try
      {
         String name = root.toURI().toString();
         deploymentContext = getDeploymentContext(name);
         if (deploymentContext != null)
View Full Code Here

   public boolean hasStructureBeenModified(VFSDeployment deployment) throws IOException
   {
      if (deployment == null)
         throw new IllegalArgumentException("Null deployment");

      VFSDeploymentContext deploymentContext = getDeploymentContext(deployment.getName());
      return deploymentContext != null && hasStructureBeenModified(deploymentContext);
   }
View Full Code Here

   protected DeploymentContext createChildDeploymentContext(DeploymentContext parent, ContextInfo child) throws Exception
   {
      if (parent instanceof VFSDeploymentContext)
      {
         VFSDeploymentContext vfsParent = (VFSDeploymentContext) parent;
         String path = child.getPath();
         try
         {
            VirtualFile parentFile = vfsParent.getRoot();
            @SuppressWarnings("deprecation")
            VirtualFile file = parentFile.findChild(path); // leaving the findChild usage
            return new AbstractVFSDeploymentContext(applyModification(file, child), path);
         }
         catch (Throwable t)
         {
            throw DeploymentException.rethrowAsDeploymentException("Unable to determine child " + path + " from parent " + vfsParent.getRoot().getName(), t);
         }
      }
      return super.createChildDeploymentContext(parent, child);
   }
View Full Code Here

      {
         boolean trace = log.isTraceEnabled();
         if (trace)
            log.trace("Apply context: " + context.getName() + " " + contextInfo);
        
         VFSDeploymentContext vfsContext = (VFSDeploymentContext) context;
         List<String> metaDataPath = contextInfo.getMetaDataPath();
         if (metaDataPath != null && metaDataPath.isEmpty() == false)
            vfsContext.setMetaDataPath(contextInfo.getMetaDataPath());
        
         boolean classPathHadVF = false;

         List<ClassPathEntry> classPathEntries = contextInfo.getClassPath();
         VFSDeploymentContext top = vfsContext.getTopLevel();
         VirtualFile root = top.getRoot();
         List<VirtualFile> classPath = new ArrayList<VirtualFile>();

         if (classPathEntries != null)
         {
            for (ClassPathEntry entry : classPathEntries)
View Full Code Here

   public void prepareContextInfo(DeploymentContext parentDeploymentContext, ContextInfo contextInfo)
   {
      if (parentDeploymentContext instanceof VFSDeploymentContext == false || contextInfo == null)
         return;

      VFSDeploymentContext vfsParentDeploymentContext = VFSDeploymentContext.class.cast(parentDeploymentContext);
      VirtualFile root = vfsParentDeploymentContext.getFile(contextInfo.getPath());
      checkForModification(root, contextInfo);
   }
View Full Code Here

   protected DeploymentContext createChildDeploymentContext(DeploymentContext parent, ContextInfo child) throws Exception
   {
      if (parent instanceof VFSDeploymentContext)
      {
         VFSDeploymentContext vfsParent = (VFSDeploymentContext) parent;
         String path = child.getPath();
         try
         {
            VirtualFile parentFile = vfsParent.getRoot();
            VirtualFile file = parentFile.findChild(path); // leaving the findChild usage
            return new AbstractVFSDeploymentContext(applyModification(file, child), path);
         }
         catch (Throwable t)
         {
            throw DeploymentException.rethrowAsDeploymentException("Unable to determine child " + path + " from parent " + vfsParent.getRoot().getName(), t);
         }
      }
      return super.createChildDeploymentContext(parent, child);
   }
View Full Code Here

      {
         boolean trace = log.isTraceEnabled();
         if (trace)
            log.trace("Apply context: " + context.getName() + " " + contextInfo);
        
         VFSDeploymentContext vfsContext = (VFSDeploymentContext) context;
         List<String> metaDataPath = contextInfo.getMetaDataPath();
         if (metaDataPath != null && metaDataPath.isEmpty() == false)
            vfsContext.setMetaDataPath(contextInfo.getMetaDataPath());
        
         boolean classPathHadVF = false;

         List<ClassPathEntry> classPathEntries = contextInfo.getClassPath();
         VFSDeploymentContext top = vfsContext.getTopLevel();
         VirtualFile root = top.getRoot();
         List<VirtualFile> classPath = new ArrayList<VirtualFile>();

         if (classPathEntries != null)
         {
            for (ClassPathEntry entry : classPathEntries)
View Full Code Here

      return hasStructureBeenModified(root, getDeploymentContext(name));
   }
  
   public boolean hasStructureBeenModified(VirtualFile root) throws IOException
   {
      VFSDeploymentContext deploymentContext = null;
      try
      {
         String name = root.toURI().toString();
         deploymentContext = getDeploymentContext(name);
      }
View Full Code Here

   protected DeploymentContext createChildDeploymentContext(DeploymentContext parent, ContextInfo child) throws Exception
   {
      if (parent instanceof VFSDeploymentContext)
      {
         VFSDeploymentContext vfsParent = (VFSDeploymentContext) parent;
         String path = child.getPath();
         try
         {
            VirtualFile parentFile = vfsParent.getRoot();
            @SuppressWarnings("deprecation")
            VirtualFile file = parentFile.findChild(path); // leaving the findChild usage
            return new AbstractVFSDeploymentContext(applyModification(file, child), path);
         }
         catch (Throwable t)
         {
            throw DeploymentException.rethrowAsDeploymentException("Unable to determine child " + path + " from parent " + vfsParent.getRoot().getName(), t);
         }
      }
      return super.createChildDeploymentContext(parent, child);
   }
View Full Code Here

TOP

Related Classes of org.jboss.deployers.vfs.spi.structure.VFSDeploymentContext

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.