Package org.exoplatform.services.jcr.datamodel

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


   public Version version(String versionName, boolean pool) throws VersionException, RepositoryException
   {

      JCRName jcrVersionName = locationFactory.parseJCRName(versionName);
      VersionImpl version =
         (VersionImpl)dataManager.getItem(nodeData(), new QPathEntry(jcrVersionName.getInternalName(), 1), pool,
            ItemType.NODE);
      if (version == null)
      {
         throw new VersionException("There are no version with name '" + versionName + "' in the version history "
            + getPath());
View Full Code Here


      // remove this version from successor anf predecessor list
      // and point successor to predecessor directly

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

      // jcr:predecessors
      PropertyData predecessorsData =
         (PropertyData)dataManager.getItemData((NodeData)version.getData(), new QPathEntry(Constants.JCR_PREDECESSORS,
            0), ItemType.PROPERTY);

      try
      {
         for (ValueData pvalue : predecessorsData.getValues())
View Full Code Here

      JCRName jcrLabelName = locationFactory.parseJCRName(labelName);
      InternalQName labelQName = jcrLabelName.getInternalName();

      PropertyData vldata =
         (PropertyData)dataManager.getItemData(getData().getVersionLabelsData(), new QPathEntry(labelQName, 0),
            ItemType.PROPERTY);

      if (vldata != null)
      {
         PlainChangesLog changes = new PlainChangesLogImpl(session.getId());
View Full Code Here

      changesLog.add(ItemState.createAddedState(propData));

      // A reference to V is added to the jcr:successors property of
      // each of the versions identified in Vs jcr:predecessors property.
      List<ValueData> predecessors =
         ((PropertyData)dataManager.getItemData(versionableNodeData, new QPathEntry(Constants.JCR_PREDECESSORS, 0),
            ItemType.PROPERTY)).getValues();
      List<ValueData> predecessorsNew = new ArrayList<ValueData>();
      for (ValueData predecessorValue : predecessors)
      {
         byte[] pib;
View Full Code Here

      {
         return false;
      }

      NodeData nodeTypeData =
         (NodeData)dataManager.getItemData(nodeTypeStorageRoot, new QPathEntry(nodeTypeName, 1), ItemType.NODE);

      return nodeTypeData != null;
   }
View Full Code Here

         NodeData node = (NodeData)data;
         if (ntManager.isNodeType(Constants.MIX_VERSIONABLE, node.getPrimaryTypeName(), node.getMixinTypeNames()))
         {

            ItemData vhpd =
               dataManager.getItemData(node, new QPathEntry(Constants.JCR_VERSIONHISTORY, 1), ItemType.PROPERTY);
            if (vhpd != null && !vhpd.isNode())
            {
               try
               {
                  String vhID = new String(((PropertyData)vhpd).getValues().get(0).getAsByteArray());
View Full Code Here

         return;
      }

      validatate();
      NodeData nodeTypeData =
         (NodeData)dataManager.getItemData(nodeTypeStorageRoot, new QPathEntry(nodeType.getName(), 1), ItemType.NODE);
      ItemDataRemoveVisitor removeVisitor = new ItemDataRemoveVisitor(dataManager, nodeTypeStorageRoot.getQPath());
      nodeTypeData.accept(removeVisitor);

      PlainChangesLog changesLog = new PlainChangesLogImpl();
      changesLog.addAll(removeVisitor.getRemovedStates());
View Full Code Here

      String identifier;
      int version;
      PropertyImpl prevProp;
      PropertyDefinitionDatas defs;
      ItemImpl prevItem =
         dataManager.getItem(parentNode.nodeData(), new QPathEntry(propertyName, 0), true,
            dataManager.isNew(parentNode.getIdentifier()), ItemType.PROPERTY);

      NodeTypeDataManager ntm = session.getWorkspace().getNodeTypesHolder();
      NodeData parentData = (NodeData)parentNode.getData();
      boolean isMultiValue = multiValue;
View Full Code Here

         {
            NodeData jcrSystem = (NodeData)dataManager.getItemData(Constants.SYSTEM_UUID);
            if (jcrSystem != null)
            {
               NodeData jcrNodetypes =
                  (NodeData)dataManager.getItemData(jcrSystem, new QPathEntry(Constants.JCR_NODETYPES, 1),
                     ItemType.NODE);
               if (jcrNodetypes == null)
               {
                  this.nodeTypeStorageRoot = initNodetypesRoot(jcrSystem, addACL);
               }
View Full Code Here

      {
         log.warn(" Storage not initialized");
         return null;
      }
      //Searching nodeType root
      ItemData nodeType = dataManager.getItemData(nodeTypeStorageRoot, new QPathEntry(nodeTypeName, 1), ItemType.NODE);
      if (nodeType == null)
         throw new NoSuchNodeTypeException("Node type definition " + nodeTypeName.getAsString() + "not found");
      if (!nodeType.isNode())
         throw new RepositoryException("Unexpected property found " + nodeType.getQPath().getAsString()
            + ". Should be node.");
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.