Package org.jboss.deployers.plugins.structure

Examples of org.jboss.deployers.plugins.structure.ContextInfoImpl


      return new ClassPathEntryImpl(path);
   }
  
   public void testSetPath()
   {
      ContextInfoImpl context = createDefault();
      assertEquals("", context.getPath());
      assertDefaultNonPath(context);
     
      context.setPath("path");
      assertEquals("path", context.getPath());
      assertDefaultNonPath(context);

      context.setPath("changed");
      assertEquals("changed", context.getPath());
      assertDefaultNonPath(context);
   }
View Full Code Here


      assertDefaultNonPath(context);
   }
  
   public void testSetPathErrors()
   {
      ContextInfoImpl context = createDefault();
      assertEquals("", context.getPath());
      assertDefaultNonPath(context);

      try
      {
         context.setPath(null);
         fail("Should not be here!");
      }
      catch (Exception e)
      {
         checkThrowable(IllegalArgumentException.class, e);
View Full Code Here

      }
   }
  
   public void testAddMetaDataPath()
   {
      ContextInfoImpl context = createDefault();
      assertEquals("", context.getPath());
      assertDefaultNonPath(context);
     
      context.addMetaDataPath("metaDataPath");
      assertDefaultMetaDataPath(context.getMetaDataPath());
      assertDefaultClassPath(context.getClassPath());

      context.addMetaDataPath("added");
      assertEquals(Arrays.asList("metaDataPath", "added"), context.getMetaDataPath());
      assertDefaultClassPath(context.getClassPath());
   }
View Full Code Here

      assertDefaultClassPath(context.getClassPath());
   }

   public void testSetMetaDataPathErrors()
   {
      ContextInfoImpl context = createDefault();
      assertEquals("", context.getPath());
      assertDefaultNonPath(context);

      try
      {
         context.addMetaDataPath(null);
         fail("Should not be here!");
      }
      catch (Exception e)
      {
         checkThrowable(IllegalArgumentException.class, e);
View Full Code Here

      }
   }
  
   public void testSetClassPath()
   {
      ContextInfoImpl context = createDefault();
      assertEquals("", context.getPath());
      assertDefaultNonPath(context);

      List<ClassPathEntry> classPath = createClassPath("classPath");
      context.setClassPath(classPath);
      assertEquals("", context.getPath());
      assertDefaultMetaDataPath(context);
      assertEquals(classPath, context.getClassPath());
     
      classPath = createClassPath("changed");
      context.setClassPath(classPath);
      assertEquals("", context.getPath());
      assertDefaultMetaDataPath(context);
      assertEquals(classPath, context.getClassPath());
     
      classPath = null;
      context.setClassPath(classPath);
      assertEquals("", context.getPath());
      assertDefaultMetaDataPath(context);
      assertEquals(classPath, context.getClassPath());
   }
View Full Code Here

      assertEquals(classPath, context.getClassPath());
   }

   public void testPredeterminedManagedObjectAttachments()
   {
      ContextInfoImpl context = createDefault();
      assertEquals("", context.getPath());
      AttachmentsImpl ai = new AttachmentsImpl();
      ai.addAttachment("key1", "testPredeterminedManagedObjectAttachments");
      context.setPredeterminedManagedObjects(ai);
      String a1 = context.getPredeterminedManagedObjects().getAttachment("key1", String.class);
      assertEquals("key1 attachment", "testPredeterminedManagedObjectAttachments", a1);
   }
View Full Code Here

   {
      super(new AbstractDeploymentContext(deployment.getName(), ""));
      this.deployment = deployment;
      // Create a pre-determined, DEPLOYED deployment
      StructureMetaData structure = new StructureMetaDataImpl();
      ContextInfo rootInfo = new ContextInfoImpl("");
      structure.addContext(rootInfo);
      predeterminedManagedObjects.addAttachment(KnownDeploymentTypes.class, KnownDeploymentTypes.MCBeans);
      predeterminedManagedObjects.addAttachment(StructureMetaData.class, structure);
      predeterminedManagedObjects.addAttachment(KernelDeployment.class, deployment);
      DeploymentContext rootContext = getDeploymentContext();
View Full Code Here

   public Object newChild(StructureMetaDataImpl parent, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
   {
      Object child = null;
      if (localName.equals("context"))
         child = new ContextInfoImpl("", null);
      return child;
   }
View Full Code Here

/*     */
/*     */   public Object newChild(StructureMetaDataImpl parent, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
/*     */   {
/*  61 */     Object child = null;
/*  62 */     if (localName.equals("context"))
/*  63 */       child = new ContextInfoImpl("", null);
/*  64 */     return child;
/*     */   }
View Full Code Here

   public Object newChild(StructureMetaDataImpl parent, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
   {
      if (localName.equals("context"))
      {
         ContextInfoImpl child = new ContextInfoImpl("", null);
         String modificationType = attrs.getValue("modification");
         if (modificationType != null)
            child.setModificationType(ModificationType.getModificationType(modificationType));
         String comparator = attrs.getValue("comparator");
         if (comparator != null)
            child.setComparatorClassName(comparator);
         return child;
      }
      return null;
   }
View Full Code Here

TOP

Related Classes of org.jboss.deployers.plugins.structure.ContextInfoImpl

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.