Examples of QPathEntry


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

      boolean allowSns = def.isAllowsSameNameSiblings();

      int ind = 1;

      NodeData sibling = (NodeData)dataManager.getItemData(parentNode, new QPathEntry(nameToAdd, ind), ItemType.NODE);
      while (sibling != null)
      {
         if (allowSns)
         {
            ind++;
            sibling = (NodeData)dataManager.getItemData(parentNode, new QPathEntry(nameToAdd, ind), ItemType.NODE);
         }
         else
         {
            throw new ItemExistsException("The node " + nameToAdd + " already exists in " + getPath()
               + " and same name sibling is not allowed ");
View Full Code Here

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;
      }
      catch (RepositoryException e)
View Full Code Here

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

   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

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

      {
         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

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

            NodeData lockedNodeData = (NodeData)dataManager.getItemData(list[i]);
            // No item no problem
            if (lockedNodeData != null)
            {
               PropertyData dataLockIsDeep =
                  (PropertyData)dataManager.getItemData(lockedNodeData, new QPathEntry(Constants.JCR_LOCKISDEEP, 0),
                     ItemType.PROPERTY);

               if (dataLockIsDeep != null)
               {
                  plainChangesLog.add(ItemState.createDeletedState(new TransientPropertyData(QPath.makeChildPath(
                     lockedNodeData.getQPath(), Constants.JCR_LOCKISDEEP), dataLockIsDeep.getIdentifier(), 0,
                     dataLockIsDeep.getType(), dataLockIsDeep.getParentIdentifier(), dataLockIsDeep.isMultiValued())));
               }

               PropertyData dataLockOwner =
                  (PropertyData)dataManager.getItemData(lockedNodeData, new QPathEntry(Constants.JCR_LOCKOWNER, 0),
                     ItemType.PROPERTY);
               if (dataLockOwner != null)
                  plainChangesLog.add(ItemState.createDeletedState(new TransientPropertyData(QPath.makeChildPath(
                     lockedNodeData.getQPath(), Constants.JCR_LOCKOWNER), dataLockOwner.getIdentifier(), 0,
                     dataLockOwner.getType(), dataLockOwner.getParentIdentifier(), dataLockOwner.isMultiValued())));
View Full Code Here

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

         PlainChangesLog changesLog =
            new PlainChangesLogImpl(new ArrayList<ItemState>(), SystemIdentity.SYSTEM, ExtendedEvent.UNLOCK);

         ItemData lockOwner =
            copyItemData((PropertyData)dataManager.getItemData(nData, new QPathEntry(Constants.JCR_LOCKOWNER, 1),
               ItemType.PROPERTY));

         //TODO EXOJCR-412, should be refactored in future.
         //Skip removing, because that lock was removed in other node of cluster. 
         if (lockOwner == null)
         {
            return;
         }

         changesLog.add(ItemState.createDeletedState(lockOwner));

         ItemData lockIsDeep =
            copyItemData((PropertyData)dataManager.getItemData(nData, new QPathEntry(Constants.JCR_LOCKISDEEP, 1),
               ItemType.PROPERTY));

         //TODO EXOJCR-412, should be refactored in future.
         //Skip removing, because that lock was removed in other node of cluster. 
         if (lockIsDeep == null)
View Full Code Here

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

      // this will also check if item is valid
      NodeData vancestor = getVersionableAncestor();
      if (vancestor != null)
      {
         PropertyData isCheckedOut =
            (PropertyData)dataManager.getItemData(vancestor, new QPathEntry(Constants.JCR_ISCHECKEDOUT, 1),
               ItemType.PROPERTY);
         try
         {
            return ValueDataConvertor.readBoolean(isCheckedOut.getValues().get(0));
         }
View Full Code Here

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

      changesLog.add(ItemState.createUpdatedState(updatePropertyData(Constants.JCR_ISCHECKEDOUT,
         new TransientValueData(true))));

      ValueData baseVersion =
         ((PropertyData)dataManager.getItemData(nodeData(), new QPathEntry(Constants.JCR_BASEVERSION, 0),
            ItemType.PROPERTY)).getValues().get(0);

      changesLog.add(ItemState.createUpdatedState(updatePropertyData(Constants.JCR_PREDECESSORS, baseVersion)));

      dataManager.getTransactManager().save(changesLog);
View Full Code Here

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

      }
      newMixin.add(type.getName());
      values.add(new TransientValueData(type.getName()));

      PropertyData prop =
         (PropertyData)dataManager.getItemData(((NodeData)getData()), new QPathEntry(Constants.JCR_MIXINTYPES, 0),
            ItemType.PROPERTY);
      ItemState state;

      if (prop != null)
      {// there was mixin prop
View Full Code Here

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

      {
         throw new UnsupportedRepositoryOperationException("Node is not versionable " + getPath());
      }

      PropertyData bvProp =
         (PropertyData)dataManager.getItemData(nodeData(), new QPathEntry(Constants.JCR_BASEVERSION, 1),
            ItemType.PROPERTY);
      try
      {
         return (Version)session.getNodeByUUID(ValueDataConvertor.readString(bvProp.getValues().get(0)));
      }
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.