Examples of PersistedManagedObject


Examples of org.jboss.profileservice.persistence.xml.PersistedManagedObject

      @Override
      protected PersistedComponent createComponent(Object attachment, ManagedComponent component)
      {
         // Note: this is using the TestMgtComponentImpl to get the MO
         ManagedObject mo = (ManagedObject) component.getParent();
         PersistedManagedObject persisted = getPersistencePlugin().createPersistedManagedObject(mo);
         PersistedComponent persistedComponent = new PersistedComponent(persisted);
         setComponentName(persistedComponent, mo);
         return persistedComponent;
      }
View Full Code Here

Examples of org.jboss.profileservice.persistence.xml.PersistedManagedObject

     
      protected PersistedComponent createComponent(Object attachment, ManagedComponent component)
      {
         // Note: this is using the TestMgtComponentImpl to get the MO
         ManagedObject mo = (ManagedObject) component.getParent();
         PersistedManagedObject persisted = getPersistencePlugin().createPersistedManagedObject(mo);
         PersistedComponent persistedComponent = new PersistedComponent(persisted);
         setComponentName(persistedComponent, mo);
         return persistedComponent;
      }
View Full Code Here

Examples of org.jboss.profileservice.persistence.xml.PersistedManagedObject

     
      protected PersistedComponent createComponent(Object attachment, ManagedComponent component)
      {
         // Note: this is using the TestMgtComponentImpl to get the MO
         ManagedObject mo = (ManagedObject) component.getParent();
         PersistedManagedObject persisted = getPersistencePlugin().createPersistedManagedObject(mo);
         PersistedComponent persistedComponent = new PersistedComponent(persisted);
         setComponentName(persistedComponent, mo);
         return persistedComponent;
      }
View Full Code Here

Examples of org.jboss.profileservice.persistence.xml.PersistedManagedObject

      ManagedObjectPersistencePlugin plugin = getPersistenceFactory().getPersistencePlugin();
      for(ServiceMetaData md : deployment.getServices())
      {
         // Bypass the ServiceMetaDataICF...
         ManagedObject mo = getMOF().initManagedObject(md, null);
         PersistedManagedObject persisted = plugin.createPersistedManagedObject(mo);
        
         // Fix the names, as we don't use the ServiceMetaDataICF
         String name = md.getObjectName().getCanonicalName();
         persisted.setName(name);
         persisted.setOriginalName(name);
         persisted.setModificationInfo(ModificationInfo.ADDED);
        
         components.add(new PersistedComponent(persisted));
      }
     
      PersistenceRoot root = new PersistenceRoot();
View Full Code Here

Examples of org.jboss.profileservice.persistence.xml.PersistedManagedObject

      @Override
      protected PersistedComponent createComponent(Object attachment, ManagedComponent component)
      {
         // Note: this is using the TestMgtComponentImpl to get the MO
         ManagedObject mo = (ManagedObject) component.getParent();
         PersistedManagedObject persisted = getPersistencePlugin().createPersistedManagedObject(mo);
         PersistedComponent persistedComponent = new PersistedComponent(persisted);
         setComponentName(persistedComponent, mo);
         return persistedComponent;
      }
View Full Code Here

Examples of org.jboss.system.server.profileservice.persistence.xml.PersistedManagedObject

   }
  
   public void test() throws Throwable
   {
      ManagedObject mo = initMO();
      PersistedManagedObject moElement = restore(mo);
      assertNotNull(moElement);
     
      ManagedObject restored = update(new CollectionMetaData(), moElement);
     
      assertNotNull(restored);
View Full Code Here

Examples of org.jboss.system.server.profileservice.persistence.xml.PersistedManagedObject

   @Override
   protected PersistedComponent createComponent(Object attachment, ManagedComponent component)
   {
      // Note: this is using the TestMgtComponentImpl to get the MO
      ManagedObject mo = (ManagedObject) component.getParent();
      PersistedManagedObject persistedMO = getPersistencePlugin().createPersistedManagedObject(mo);
      PersistedComponent persisted = new PersistedComponent(persistedMO);
      setComponentName(persisted, mo);
      return persisted;
   }
View Full Code Here

Examples of org.jboss.system.server.profileservice.persistence.xml.PersistedManagedObject

      assertNotNull(value);
      assertNotNull(value.get("test1"));
      getLog().debug("keys: " + value.getMetaType().itemSet());
     
      enableTrace("org.jboss.system");
      PersistedManagedObject moElement = restore(mo);
      assertNotNull(moElement);
     
      ManagedObject restored = update(new SimpleStringMapMetaData(), moElement);
      assertNotNull(restored);
      SimpleStringMapMetaData metadata = (SimpleStringMapMetaData) restored.getAttachment();
View Full Code Here

Examples of org.jboss.system.server.profileservice.persistence.xml.PersistedManagedObject

      return getMOF().initManagedObject(o, null);
   }
  
   protected PersistedManagedObject restore(ManagedObject mo) throws Exception
   {
      PersistedManagedObject moElement = plugin.createPersistedManagedObject(mo);
     
      File file = File.createTempFile("test", null);
      serialize(moElement, file);
      return deserialize(file);
   }
View Full Code Here

Examples of org.jboss.system.server.profileservice.persistence.xml.PersistedManagedObject

   }
  
   public void testSimpleArray() throws Throwable
   {
      ManagedObject mo = initMO();
      PersistedManagedObject moElement = restore(mo);
     
      assertNotNull(moElement);
      ManagedObject restored = update(new SimpleArrayMetaData(), moElement);
     
      assertNotNull(restored.getProperties());
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.