Package org.exoplatform.services.jcr.datamodel

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


            return tvd;
         case PropertyType.NAME :
            InternalQName nameValue = locationFactory.parseJCRName(value.getString()).getInternalName();
            return new TransientValueData(nameValue);
         case PropertyType.REFERENCE :
            Identifier identifier = new Identifier(value.getString());
            return new TransientValueData(identifier);
         case ExtendedPropertyType.PERMISSION :
            PermissionValue permValue = (PermissionValue) value;
            AccessControlEntry ace = new AccessControlEntry(permValue.getIdentity(), permValue.getPermission());
            return new TransientValueData(ace);
View Full Code Here


   }

   public void addSuccessor(String successorIdentifier, PlainChangesLog changesLog) throws RepositoryException
   {
      ValueData successorRef = new TransientValueData(new Identifier(successorIdentifier));

      TransientPropertyData successorsProp =
               (TransientPropertyData) dataManager.getItemData(nodeData(), new QPathEntry(Constants.JCR_SUCCESSORS, 0));

      if (successorsProp == null)
View Full Code Here

   }

   public void addPredecessor(String predeccessorIdentifier, PlainChangesLog changesLog) throws RepositoryException
   {

      ValueData predeccessorRef = new TransientValueData(new Identifier(predeccessorIdentifier));

      TransientPropertyData predeccessorsProp =
               (TransientPropertyData) dataManager.getItemData(nodeData(),
                        new QPathEntry(Constants.JCR_PREDECESSORS, 0));
View Full Code Here

         catch (IOException e)
         {
            throw new RepositoryException("A jcr:successors property read error " + e, e);
         }

         newSuccessors.add(new TransientValueData(new Identifier(addedSuccessorIdentifier)));

         TransientPropertyData newSuccessorsProp =
                  new TransientPropertyData(QPath.makeChildPath(nodeData().getQPath(), Constants.JCR_SUCCESSORS,
                           successorsProp.getQPath().getIndex()), successorsProp.getIdentifier(), successorsProp
                           .getPersistedVersion(), PropertyType.REFERENCE, nodeData().getIdentifier(), true);
View Full Code Here

         catch (IOException e)
         {
            throw new RepositoryException("A jcr:predecessors property read error " + e, e);
         }

         newPredeccessors.add(new TransientValueData(new Identifier(addedPredecessorIdentifier)));

         TransientPropertyData newPredecessorsProp =
                  new TransientPropertyData(QPath.makeChildPath(nodeData().getQPath(), Constants.JCR_PREDECESSORS,
                           predeccessorsProp.getQPath().getIndex()), predeccessorsProp.getIdentifier(),
                           predeccessorsProp.getPersistedVersion(), PropertyType.REFERENCE, nodeData().getIdentifier(),
View Full Code Here

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

      changesLog.add(ItemState.createUpdatedState(updatePropertyData(Constants.JCR_BASEVERSION, new TransientValueData(
               new Identifier(verIdentifier)))));

      changesLog.add(ItemState.createUpdatedState(updatePropertyData(Constants.JCR_PREDECESSORS,
               new ArrayList<ValueData>())));

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

      // ----- VERSIONABLE properties -----
      // jcr:versionHistory
      TransientPropertyData vh =
               TransientPropertyData.createPropertyData(versionable, Constants.JCR_VERSIONHISTORY,
                        PropertyType.REFERENCE, false);
      vh.setValue(new TransientValueData(new Identifier(versionHistory)));

      // jcr:baseVersion
      TransientPropertyData bv =
               TransientPropertyData.createPropertyData(versionable, Constants.JCR_BASEVERSION, PropertyType.REFERENCE,
                        false);
      bv.setValue(new TransientValueData(new Identifier(baseVersionUuid)));

      // jcr:predecessors
      TransientPropertyData pd =
               TransientPropertyData.createPropertyData(versionable, Constants.JCR_PREDECESSORS,
                        PropertyType.REFERENCE, true);
      for (int i = 0; i < predecessors.length; i++)
      {
         pd.setValue(new TransientValueData(new Identifier(predecessors[i])));
      }

      PlainChangesLog changesLog = new PlainChangesLogImpl();
      RemoveVisitor rv = new RemoveVisitor();
      rv.visit((NodeData) ((NodeImpl) versionableNode.getVersionHistory()).getData());
View Full Code Here

   // }

   public void testNewUuidValueData() throws Exception
   {

      TransientValueData vd = new TransientValueData(new Identifier("1234"));
      assertEquals("1234", new String(vd.getAsByteArray()));
   }
View Full Code Here

   }

   public void testNewUuidValueData() throws Exception
   {

      TransientValueData vd = new TransientValueData(new Identifier("1234"));
      assertEquals("1234", new String(vd.getAsByteArray()));
   }
View Full Code Here

         TransientPropertyData.createPropertyData(ahNode, AuditService.EXO_AUDITHISTORY_LASTRECORD,
            PropertyType.STRING, false, new TransientValueData("0"));
      // node exo:auditHistory
      TransientPropertyData pAuditHistory =
         TransientPropertyData.createPropertyData((NodeData)((ItemImpl)node).getData(), AuditService.EXO_AUDITHISTORY,
            PropertyType.STRING, false, new TransientValueData(new Identifier(ahNode.getIdentifier())));
      session.getTransientNodesManager().update(
         new ItemState(ahNode, ItemState.ADDED, true, ((ItemImpl)node).getInternalPath()), true);

      session.getTransientNodesManager().update(
         new ItemState(aPrType, ItemState.ADDED, true, ((ItemImpl)node).getInternalPath()), true);
View Full Code Here

TOP

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

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.