Package org.jboss.system.server.profileservice.repository.clustered.sync

Examples of org.jboss.system.server.profileservice.repository.clustered.sync.ContentModification


            {
               stream.close();
            }
            catch (IOException e)
            {
               ContentModification mod = getRepositoryContentModification();
               getLogger().debug("Caught exception closing stream for " + mod.getRootName() +
                     " " + mod.getItem().getRelativePath(), e);
            }
            finally
            {
               stream = null;
            }
View Full Code Here



   @Override
   protected void updateContentMetadata()
   {
      ContentModification mod = getRepositoryContentModification();
      RepositoryItemMetadata modItem = mod.getItem();
      if (modItem.isRemoved())
      {
         // Just record it
         super.updateContentMetadata();
      }
      else if (mod.getType() == Type.REMOVE_FROM_CLUSTER)
      {
         // An addition has been rejected. We don't record the item as
         // removed in the metadata, we just remove it.
         RepositoryContentMetadata contentMetadata = getContext().getInProgressMetadata();
         RepositoryRootMetadata rmd = contentMetadata.getRepositoryRootMetadata(mod.getRootName());
         rmd.getContent().remove(modItem);        
      }
      else
      {
         // Add a record of the item, marked as removed
         RepositoryItemMetadata markedRemoved = getMarkedRemovedItem(mod);
         RepositoryContentMetadata contentMetadata = getContext().getInProgressMetadata();
         RepositoryRootMetadata rmd = contentMetadata.getRepositoryRootMetadata(mod.getRootName());
         rmd.getContent().add(markedRemoved);
      }
   }
View Full Code Here

      {
         if (action.prepare() == false)
         {           
            if (log.isTraceEnabled())
            {
               ContentModification mod = action.getRepositoryContentModification();
               log.trace("prepare failed for " + mod.getType() + " " + mod.getItem().getRelativePath());
            }
            return false;
         }
      }
     
View Full Code Here

         {
            stream.close();
         }
         catch (IOException e)
         {
            ContentModification mod = getRepositoryContentModification();
            log.debug("Caught exception closing stream for " + mod.getRootName() +
                  " " + mod.getItem().getRelativePath(), e);
         }
      }
   }
View Full Code Here

   @Override
   protected void doComplete() throws Exception
   {
      if (getLogger().isTraceEnabled())
      {
         ContentModification mod = getRepositoryContentModification();
         getLogger().trace("doComplete(): " + mod.getType() + " for " + mod.getItem().getRelativePath());
      }
   }
View Full Code Here

         }
        
         boolean result = modifyTarget();
         if (getLogger().isTraceEnabled())
         {
            ContentModification mod = getRepositoryContentModification();
            getLogger().trace("doPrepare(): modifyTarget result for " +
                  mod.getType() + " for " + mod.getItem().getRelativePath() +
                  " is " + result);
         }
         return result;
      }
      catch (Exception e)
View Full Code Here


   @Override
   protected void updateContentMetadata()
   {
      ContentModification mod = getRepositoryContentModification();
      RepositoryItemMetadata modItem = mod.getItem();
      if (modItem.isRemoved())
      {
         // Just record it
         super.updateContentMetadata();
      }
      else if (mod.getType() == Type.REMOVE_FROM_CLUSTER)
      {
         // An addition has been rejected. We don't record the item as
         // removed in the metadata, we just remove it.
         RepositoryContentMetadata contentMetadata = getContext().getInProgressMetadata();
         RepositoryRootMetadata rmd = contentMetadata.getRepositoryRootMetadata(mod.getRootName());
         rmd.removeItemMetadata(modItem.getRelativePathElements());        
      }
      else
      {
         // Add a record of the item, marked as removed
         RepositoryItemMetadata markedRemoved = getMarkedRemovedItem(mod);
         RepositoryContentMetadata contentMetadata = getContext().getInProgressMetadata();
         RepositoryRootMetadata rmd = contentMetadata.getRepositoryRootMetadata(mod.getRootName());
         rmd.addItemMetadata(markedRemoved);
      }
   }
View Full Code Here

      {
         if (action.prepare() == false)
         {           
            if (log.isTraceEnabled())
            {
               ContentModification mod = action.getRepositoryContentModification();
               log.trace("prepare failed for " + mod.getType() + " " + mod.getItem().getRelativePath());
            }
            return false;
         }
      }
     
View Full Code Here

            {
               stream.close();
            }
            catch (IOException e)
            {
               ContentModification mod = getRepositoryContentModification();
               getLogger().debug("Caught exception closing stream for " + mod.getRootName() +
                     " " + mod.getItem().getRelativePath(), e);
            }
            finally
            {
               stream = null;
            }
View Full Code Here

   protected void doComplete() throws Exception
   {
      safeCloseStream();
      if (log.isTraceEnabled())
      {
         ContentModification mod = getRepositoryContentModification();
         log.trace("doComplete(): " + mod.getType() + " for " + mod.getItem().getRelativePath());
      }
   }
View Full Code Here

TOP

Related Classes of org.jboss.system.server.profileservice.repository.clustered.sync.ContentModification

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.