Package org.exoplatform.services.jcr.impl.core

Examples of org.exoplatform.services.jcr.impl.core.SessionDataManager.update()


      pLastRecord =
         new TransientPropertyData(pLastRecord.getQPath(), pLastRecord.getIdentifier(),
            pLastRecord.getPersistedVersion(), pLastRecord.getType(), pLastRecord.getParentIdentifier(),
            pLastRecord.isMultiValued(), new TransientValueData(String.valueOf(auditRecordName)));

      dataManager.update(
         new ItemState(pLastRecord, ItemState.UPDATED, true, ((ItemImpl)currentItem).getInternalPath()), true);

      if (LOG.isDebugEnabled())
         LOG.debug("Add audit record: " + " Item path="
            + ((ItemImpl)currentItem).getLocation().getInternalPath().getAsString() + " User=" + session.getUserID()
View Full Code Here


         new TransientNodeData(QPath.makeChildPath(auditHistory.getQPath(), new InternalQName(null, auditRecordName)),
            IdGenerator.generate(), -1, AuditService.EXO_AUDITRECORD, new InternalQName[0],
            Integer.parseInt(auditRecordName), auditHistory.getIdentifier(), exoAuditRecordAccessControlList);

      // exo:auditRecord
      dataManager.update(new ItemState(arNode, ItemState.ADDED, true, ((ItemImpl)currentItem).getInternalPath()), true);

      // jcr:primaryType
      TransientPropertyData arPrType =
         TransientPropertyData.createPropertyData(arNode, Constants.JCR_PRIMARYTYPE, PropertyType.NAME, false,
            new TransientValueData(arNode.getPrimaryTypeName()));
View Full Code Here

      TransientPropertyData arEventType =
         TransientPropertyData.createPropertyData(arNode, AuditService.EXO_AUDITRECORD_EVENTTYPE, PropertyType.LONG,
            false, new TransientValueData(eventType));

      // jcr:primaryType
      dataManager.update(new ItemState(arPrType, ItemState.ADDED, true, ((ItemImpl)currentItem).getInternalPath()),
         true);

      // exo:user
      dataManager.update(new ItemState(arUser, ItemState.ADDED, true, ((ItemImpl)currentItem).getInternalPath()), true);
View Full Code Here

      // jcr:primaryType
      dataManager.update(new ItemState(arPrType, ItemState.ADDED, true, ((ItemImpl)currentItem).getInternalPath()),
         true);

      // exo:user
      dataManager.update(new ItemState(arUser, ItemState.ADDED, true, ((ItemImpl)currentItem).getInternalPath()), true);

      // exo:created
      dataManager.update(new ItemState(arCreated, ItemState.ADDED, true, ((ItemImpl)currentItem).getInternalPath()),
         true);
View Full Code Here

      // exo:user
      dataManager.update(new ItemState(arUser, ItemState.ADDED, true, ((ItemImpl)currentItem).getInternalPath()), true);

      // exo:created
      dataManager.update(new ItemState(arCreated, ItemState.ADDED, true, ((ItemImpl)currentItem).getInternalPath()),
         true);

      // exo:eventType
      dataManager.update(new ItemState(arEventType, ItemState.ADDED, true, ((ItemImpl)currentItem).getInternalPath()),
         true);
View Full Code Here

      // exo:created
      dataManager.update(new ItemState(arCreated, ItemState.ADDED, true, ((ItemImpl)currentItem).getInternalPath()),
         true);

      // exo:eventType
      dataManager.update(new ItemState(arEventType, ItemState.ADDED, true, ((ItemImpl)currentItem).getInternalPath()),
         true);

      if (!currentItem.isNode())
      {
         int propertyType = ((Property)currentItem).getType();
View Full Code Here

            TransientPropertyData arNewValue =
               TransientPropertyData.createPropertyData(arNode, AuditService.EXO_AUDITRECORD_NEWVALUE, propertyType,
                  ((PropertyImpl)currentItem).isMultiValued(),
                  ((PropertyData)((PropertyImpl)currentItem).getData()).getValues());

            dataManager.update(
               new ItemState(arNewValue, ItemState.ADDED, true, ((ItemImpl)currentItem).getInternalPath()), true);

            if (eventType == Event.PROPERTY_CHANGED)
            {
View Full Code Here

               TransientPropertyData arOldValue =
                  TransientPropertyData.createPropertyData(arNode, AuditService.EXO_AUDITRECORD_OLDVALUE, propertyType,
                     ((PropertyImpl)previousItem).isMultiValued(),
                     ((PropertyData)((PropertyImpl)previousItem).getData()).getValues());

               dataManager.update(
                  new ItemState(arOldValue, ItemState.ADDED, true, ((ItemImpl)previousItem).getInternalPath()), true);
            }
         }
      }
View Full Code Here

         // exo:propertyName
         TransientPropertyData propertyNameData =
            TransientPropertyData.createPropertyData(arNode, EXO_AUDITRECORD_PROPERTYNAME, PropertyType.STRING, false,
               new TransientValueData(((ItemImpl)currentItem).getInternalName()));
         dataManager.update(
            new ItemState(propertyNameData, ItemState.ADDED, true, ((ItemImpl)currentItem).getInternalPath()), true);
      }

      if (vancestor != null)
      {
View Full Code Here

         TransientPropertyData auditVersionName =
            TransientPropertyData.createPropertyData(arNode, EXO_AUDITRECORD_AUDITVERSIONNAME, PropertyType.STRING,
               false, new TransientValueData(versionName.toString()));

         dataManager.update(
            new ItemState(auditVersion, ItemState.ADDED, true, ((ItemImpl)currentItem).getInternalPath()), true);
         dataManager.update(
            new ItemState(auditVersionName, ItemState.ADDED, true, ((ItemImpl)currentItem).getInternalPath()), true);
      }
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.