Package org.exoplatform.services.jcr.impl.dataflow.persistent

Examples of org.exoplatform.services.jcr.impl.dataflow.persistent.SimpleChangedSizeHandler


               {
                  NodeData parent = (NodeData)conn.getItemData(nodeId);
                  PropertyData prop =
                     (PropertyData)conn.getItemData(parent, new QPathEntry(Constants.JCR_LOCKISDEEP, 0),
                        ItemType.PROPERTY);
                  conn.delete(prop, new SimpleChangedSizeHandler());

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

                  conn.commit();

                  logComment("Lock has been removed form ITEM table. Node UUID: " + nodeId);
               }
View Full Code Here


         String propertyId = getIdentifier(resultSet, DBConstants.COLUMN_VPROPERTY_ID);
         QPath path = QPath.parse("[]");

         PropertyData data = new TransientPropertyData(path, propertyId, 0, 0, null, false, new ArrayList<ValueData>());

         conn.delete(data, new SimpleChangedSizeHandler());
      }
      catch (IllegalPathException e)
      {
         throw new SQLException(e);
      }
View Full Code Here

            QPath path = new QPath(new QPathEntry[]{getQPathEntry(resultSet)});

            PropertyData data =
               new TransientPropertyData(path, propertyId, 0, 0, null, false, new ArrayList<ValueData>());

            conn.delete(data, new SimpleChangedSizeHandler());
         }
         else
         {
            throw new SQLException("Propety is required by its parent.");
         }
View Full Code Here

         String propertyId = getIdentifier(resultSet, DBConstants.COLUMN_ID);
         QPath path = QPath.parse(resultSet.getString(DBConstants.COLUMN_NAME));

         PropertyData data = new TransientPropertyData(path, propertyId, 0, 0, null, false, new ArrayList<ValueData>());

         conn.delete(data, new SimpleChangedSizeHandler());
      }
      catch (UnsupportedOperationException e)
      {
         throw new SQLException(e);
      }
View Full Code Here

         PropertyData data = (PropertyData)conn.getItemData(getIdentifier(resultSet, DBConstants.COLUMN_ID));
         int maxVersion = conn.getMaxPropertyVersion(data);

         if (resultSet.getInt(DBConstants.COLUMN_VERSION) < maxVersion)
         {
            conn.delete(data, new SimpleChangedSizeHandler());
         }
      }
      catch (IllegalStateException e)
      {
         throw new SQLException(e);
View Full Code Here

     
      // remove properties
      NodeData node = createNodeData(resultSet);
      for (PropertyData prop : conn.getChildPropertiesData(node))
      {
         conn.delete(prop, new SimpleChangedSizeHandler());
      }

      // remove nodes
      statement = conn.getJdbcConnection().prepareStatement(deleteStatement);
      try
View Full Code Here

      WorkspaceStorageConnection conn = dataContainer.openConnection();
      if (conn instanceof JDBCStorageConnection)
      {
         JDBCStorageConnection jdbcConn = (JDBCStorageConnection)conn;

         conn.update(bugData, new SimpleChangedSizeHandler());
         jdbcConn.getJdbcConnection().commit();

         NodeData parent =
            (NodeData)session.getTransientNodesManager().getTransactManager()
               .getItemData(jcrUuid.getParentIdentifier());
View Full Code Here

      // add
      WorkspaceStorageConnection con = wdContainer.openConnection();
      try
      {
         con.add(nodeData);
         con.add(ptData, new SimpleChangedSizeHandler());
         con.add(mtData, new SimpleChangedSizeHandler());
         con.add(uuidData, new SimpleChangedSizeHandler());
         con.commit();
      }
      catch (Exception e)
      {
         con.rollback();
View Full Code Here

      String propertyId = IdGenerator.generate();
      ValueData value =
         new StreamPersistedValueData(0, new FileInputStream(testFile), SpoolConfig.getDefaultSpoolConfig());

      fch.write(propertyId, value, new SimpleChangedSizeHandler());
      fch.commit();

      File vsfile =
         new File(rootDir, fch.makeFilePath(vcas.getIdentifier(propertyId, 0), CASableIOSupport.HASHFILE_ORDERNUMBER)); // orderNum
      // =0
View Full Code Here

      // prepare
      String propertyId = IdGenerator.generate();
      ValueData value =
         new StreamPersistedValueData(0, new FileInputStream(testFile), SpoolConfig.getDefaultSpoolConfig());
      fch.write(propertyId, value, new SimpleChangedSizeHandler());
      fch.commit();

      long initialSize = calcDirSize(rootDir);

      try
      {
         fch = openCASChannel(digestType);
         fch.write(new String(propertyId),
            new StreamPersistedValueData(0, new FileInputStream(testFile), SpoolConfig.getDefaultSpoolConfig()),
            new SimpleChangedSizeHandler());
         fch.commit();

         fail("RecordAlreadyExistsException should be thrown, record exists");
      }
      catch (RecordAlreadyExistsException e)
View Full Code Here

TOP

Related Classes of org.exoplatform.services.jcr.impl.dataflow.persistent.SimpleChangedSizeHandler

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.