Package org.jboss.system.server.profileservice.persistence.component

Examples of org.jboss.system.server.profileservice.persistence.component.ComponentMapper


         // Set the classloader
         recreationHelper.setLoader(classLoader);
         try
         {
            // Restore the components
            ComponentMapper mapper = getComponentMapper(root);
            for(PersistedComponent component : root.getComponents())
            {
               mapper.restoreComponent(parentAttachment, component);
            }
         }
         finally
         {
            recreationHelper.setLoader(null);
View Full Code Here


   @Override
   public PersistenceRoot addComponent(PersistenceRoot root, ManagedObject parent, ManagedComponent component)
   {
      if(root == null)
         throw new IllegalArgumentException("null persistence root");
      ComponentMapper mapper = getComponentMapper(parent);
      PersistedComponent persistedComponent = mapper.addComponent(parent.getAttachment(), component);
      return addPersistedComponent(root, persistedComponent);
   }
View Full Code Here

   public PersistenceRoot removeComponent(PersistenceRoot root, ManagedObject parent, ManagedComponent component)
   {
      if(root == null)
         throw new IllegalArgumentException("null persistence root");
     
      ComponentMapper mapper = getComponentMapper(parent);
      PersistedComponent persistedComponent = mapper.removeComponent(parent.getAttachment(), component);
      return addPersistedComponent(root, persistedComponent);
   }
View Full Code Here

   public PersistenceRoot updateComponent(PersistenceRoot root, ManagedObject parent, ManagedComponent component)
   {
      if(root == null)
         throw new IllegalArgumentException("null persistence root");
     
      ComponentMapper mapper = getComponentMapper(parent);
      PersistedComponent persistedComponent = mapper.updateComponent(parent.getAttachment(), component);
      return addPersistedComponent(root, persistedComponent);
   }
View Full Code Here

    * @return the updated persistence root
    */
   @Override
   public PersistenceRoot resetComponent(PersistenceRoot root, ManagedObject parent, ManagedComponent component)
   {
      ComponentMapper mapper = getComponentMapper(parent);
      PersistedComponent persistedComponent = mapper.updateComponent(parent.getAttachment(), component);
      // Map the components
      Map<String, PersistedComponent> components = mapComponents(root);
      // Remove the component
      PersistedComponent previous = components.remove(persistedComponent.getOriginalName());
      if(previous == null)
View Full Code Here

    * @return the component mapper
    * @throws IllegalStateException if no mapper is registered for this type
    */
   protected ComponentMapper getComponentMapper(ManagedObject parent)
   {
      ComponentMapper mapper = null;
      if(parent.getAttachmentName() != null)
         mapper = getComponentMapper(parent.getAttachmentName());
      if(mapper == null && parent.getAttachment() != null)
         mapper = getComponentMapper(parent.getAttachment().getClass().getName());

View Full Code Here

    * @return the component mapper
    * @throws IllegalStateException if no mapper is registered for this type
    */
   protected ComponentMapper getComponentMapper(PersistenceRoot root)
   {
      ComponentMapper mapper = null;
      if(root.getName() != null)
         mapper = getComponentMapper(root.getName());
      if(root.getClassName() != null)
         mapper = getComponentMapper(root.getClassName());
     
View Full Code Here

TOP

Related Classes of org.jboss.system.server.profileservice.persistence.component.ComponentMapper

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.