Package org.exoplatform.services.jcr.datamodel

Examples of org.exoplatform.services.jcr.datamodel.QPathEntry


   private boolean hasProperty(InternalQName name)
   {
      try
      {
         ItemData pdata = dataManager.getItemData(nodeData(), new QPathEntry(name, 1), ItemType.PROPERTY);

         if (pdata != null && !pdata.isNode())
         {
            return true;
         }
View Full Code Here


   private void removeMergeFailed(Version version, PlainChangesLog changesLog) throws RepositoryException
   {

      PropertyData mergeFailed =
         (PropertyData)dataManager.getItemData(nodeData(), new QPathEntry(Constants.JCR_MERGEFAILED, 0),
            ItemType.PROPERTY);

      if (mergeFailed == null)
      {
         return;
View Full Code Here

      {
         permValues.add(new TransientValueData(ace));
      }

      PropertyData permProp =
         (PropertyData)dataManager.getItemData(nodeData(), new QPathEntry(Constants.EXO_PERMISSIONS, 0),
            ItemType.PROPERTY);

      permProp =
         new TransientPropertyData(permProp.getQPath(), permProp.getIdentifier(), permProp.getPersistedVersion(),
            permProp.getType(), permProp.getParentIdentifier(), permProp.isMultiValued(), permValues);
View Full Code Here

      destParentNode.validateChildNode(destNodePath.getName().getInternalName(), ((NodeTypeImpl)srcNode
         .getPrimaryNodeType()).getQName());

      // Check for node with destAbsPath name in session
      NodeImpl destNode =
         (NodeImpl)dataManager.getItem((NodeData)destParentNode.getData(), new QPathEntry(destNodePath
            .getInternalPath().getName(), 0), false, ItemType.NODE);

      if (destNode != null)
      {
         if (!destNode.getDefinition().allowsSameNameSiblings())
View Full Code Here

         try
         {
            if (!parent.next())
               throw new InvalidItemStateException("Parent not found, uuid: " + getIdentifier(caid));

            QPathEntry qpe =
               new QPathEntry(InternalQName.parse(parent.getString(COLUMN_NAME)), parent.getInt(COLUMN_INDEX));
            qrpath.add(qpe);
            caid = parent.getString(COLUMN_PARENTID);
         }
         finally
         {
View Full Code Here

            // cstmt.setString(2, caid);
            parent = cstmt.executeQuery();

            while (parent.next())
            {
               QPathEntry qpe =
                  new QPathEntry(InternalQName.parse(parent.getString(COLUMN_NAME)), parent.getInt(COLUMN_INDEX));
               qrpath.add(qpe);
            }

            // parent = findItemByIdentifier(caid);
            if (qrpath.size() <= 0)
View Full Code Here

         final QPathEntry[] path = node.getQPath().getEntries();
         final QPathEntry[] siblingPath = new QPathEntry[path.length];
         final int li = path.length - 1;
         System.arraycopy(path, 0, siblingPath, 0, li);

         siblingPath[li] = new QPathEntry(path[li], path[li].getIndex() - 1);

         if (addedNodes.contains(new QPath(siblingPath)))
         {
            // current changes log has the older same-name sibling
            return;
View Full Code Here

    * Check if same-name sibling exists in persistence.
    */
   private void checkPersistedSNS(NodeData node, WorkspaceStorageConnection acon) throws RepositoryException
   {
      NodeData parent = (NodeData)acon.getItemData(node.getParentIdentifier());
      QPathEntry myName = node.getQPath().getEntries()[node.getQPath().getEntries().length - 1];
      ItemData sibling =
         acon.getItemData(parent, new QPathEntry(myName.getNamespace(), myName.getName(), myName.getIndex() - 1),
            ItemType.NODE);

      if (sibling == null || !sibling.isNode())
      {
         throw new InvalidItemStateException("Node can't be saved " + node.getQPath().getAsString()
            + ". No same-name sibling exists with index " + (myName.getIndex() - 1) + ".");
      }
   }
View Full Code Here

   public Calendar getCreated() throws RepositoryException
   {
      checkValid();

      PropertyData pdata =
         (PropertyData)dataManager.getItemData(nodeData(), new QPathEntry(Constants.JCR_CREATED, 0), ItemType.PROPERTY);

      if (pdata == null)
      {
         throw new VersionException("jcr:created property is not found for version " + getPath());
      }
View Full Code Here

   public Version[] getSuccessors() throws RepositoryException
   {
      checkValid();

      PropertyData successorsData =
         (PropertyData)dataManager.getItemData(nodeData(), new QPathEntry(Constants.JCR_SUCCESSORS, 0),
            ItemType.PROPERTY);

      if (successorsData == null)
      {
         return new Version[0];
View Full Code Here

TOP

Related Classes of org.exoplatform.services.jcr.datamodel.QPathEntry

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.