Examples of WorkspaceStorageConnection


Examples of org.exoplatform.services.jcr.storage.WorkspaceStorageConnection

    * Gets the list of all the ACL holders
    * @throws RepositoryException if an error occurs
    */
   public List<ACLHolder> getACLHolders() throws RepositoryException
   {
      WorkspaceStorageConnection conn = dataContainer.openConnection();
      try
      {
         return conn.getACLHolders();
      }
      finally
      {
         conn.close();
      }
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.storage.WorkspaceStorageConnection

            logBrokenObjectAndSetInconsistency("Lock exists in ITEM table but not in LOCK table. Node UUID: "
               + nodeId);
           
            if (autoRepair)
            {
               WorkspaceStorageConnection conn = jdbcDataContainer.openConnection();
               try
               {
                  NodeData parent = (NodeData)conn.getItemData(nodeId);
                  PropertyData prop =
                     (PropertyData)conn.getItemData(parent, new QPathEntry(Constants.JCR_LOCKISDEEP, 0),
                        ItemType.PROPERTY);
                  conn.delete(prop);

                  prop =
                     (PropertyData)conn.getItemData(parent, new QPathEntry(Constants.JCR_LOCKOWNER, 0),
                        ItemType.PROPERTY);
                  conn.delete(prop);

                  conn.commit();

                  logComment("Lock has been removed form ITEM table. Node UUID: " + nodeId);
               }
               catch (RepositoryException e)
               {
                  conn.rollback();
                  throw e;
               }
            }
         }
      }
View Full Code Here

Examples of org.exoplatform.services.jcr.storage.WorkspaceStorageConnection

   /**
    * {@inheritDoc}
    */
   public ItemData getItemData(final String identifier) throws RepositoryException
   {
      final WorkspaceStorageConnection con = dataContainer.openConnection();
      try
      {
         return con.getItemData(identifier);
      }
      finally
      {
         con.close();
      }
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.storage.WorkspaceStorageConnection

    */
   public List<PropertyData> getReferencesData(final String identifier, boolean skipVersionStorage)
      throws RepositoryException
   {

      final WorkspaceStorageConnection con = dataContainer.openConnection();
      try
      {
         final List<PropertyData> allRefs = con.getReferencesData(identifier);
         final List<PropertyData> refProps = new ArrayList<PropertyData>();
         for (int i = 0; i < allRefs.size(); i++)
         {
            PropertyData ref = allRefs.get(i);
            if (skipVersionStorage)
            {
               if (!ref.getQPath().isDescendantOf(Constants.JCR_VERSION_STORAGE_PATH))
               {
                  refProps.add(ref);
               }
            }
            else
            {
               refProps.add(ref);
            }
         }
         return refProps;
      }
      finally
      {
         con.close();
      }
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.storage.WorkspaceStorageConnection

   /**
    * {@inheritDoc}
    */
   public List<NodeData> getChildNodesData(final NodeData nodeData) throws RepositoryException
   {
      final WorkspaceStorageConnection con = dataContainer.openConnection();
      try
      {
         return con.getChildNodesData(nodeData);
      }
      finally
      {
         con.close();
      }
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.storage.WorkspaceStorageConnection

    * {@inheritDoc}
    */
   public boolean getChildNodesDataByPage(final NodeData nodeData, int fromOrderNum, int toOrderNum,
      List<NodeData> childNodes) throws RepositoryException
   {
      final WorkspaceStorageConnection con = dataContainer.openConnection();
      try
      {
         return con.getChildNodesDataByPage(nodeData, fromOrderNum, toOrderNum, childNodes);
      }
      finally
      {
         con.close();
      }
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.storage.WorkspaceStorageConnection

    */
   public List<NodeData> getChildNodesData(final NodeData nodeData, List<QPathEntryFilter> patternFilters)
      throws RepositoryException
   {

      final WorkspaceStorageConnection con = dataContainer.openConnection();
      try
      {
         return con.getChildNodesData(nodeData, patternFilters);
      }
      finally
      {
         con.close();
      }
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.storage.WorkspaceStorageConnection

   /**
    * {@inheritDoc}
    */
   public int getLastOrderNumber(final NodeData nodeData) throws RepositoryException
   {
      final WorkspaceStorageConnection con = dataContainer.openConnection();
      try
      {
         return con.getLastOrderNumber(nodeData);
      }
      finally
      {
         con.close();
      }
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.storage.WorkspaceStorageConnection

   /**
    * {@inheritDoc}
    */
   public int getChildNodesCount(NodeData parent) throws RepositoryException
   {
      final WorkspaceStorageConnection con = dataContainer.openConnection();
      try
      {
         return con.getChildNodesCount(parent);
      }
      finally
      {
         con.close();
      }
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.storage.WorkspaceStorageConnection

   /**
    * {@inheritDoc}
    */
   public List<PropertyData> getChildPropertiesData(final NodeData nodeData) throws RepositoryException
   {
      final WorkspaceStorageConnection con = dataContainer.openConnection();
      try
      {
         return con.getChildPropertiesData(nodeData);
      }
      finally
      {
         con.close();
      }
   }
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.