예제 #1
0
  public static void relationshipModified(
      final Principal user,
      final RelationshipInterface relationship,
      final PropertyKey key,
      final Object previousValue,
      final Object newValue) {

    TransactionCommand command = currentCommand.get();
    if (command != null) {

      ModificationQueue modificationQueue = command.getModificationQueue();
      if (modificationQueue != null) {

        modificationQueue.modify(user, relationship, key, previousValue, newValue);

      } else {

        logger.log(Level.SEVERE, "Got empty changeSet from command!");
      }

    } else {

      logger.log(Level.SEVERE, "Relationship deleted while outside of transaction!");
    }
  }
예제 #2
0
  public static void nodeDeleted(final Principal user, final NodeInterface node) {

    TransactionCommand command = currentCommand.get();
    if (command != null) {

      ModificationQueue modificationQueue = command.getModificationQueue();
      if (modificationQueue != null) {

        modificationQueue.delete(user, node);

      } else {

        logger.log(Level.SEVERE, "Got empty changeSet from command!");
      }

    } else {

      logger.log(Level.SEVERE, "Node deleted while outside of transaction!");
    }
  }
예제 #3
0
  public static void relationshipDeleted(
      final Principal user, final RelationshipInterface relationship, final boolean passive) {

    TransactionCommand command = currentCommand.get();
    if (command != null) {

      ModificationQueue modificationQueue = command.getModificationQueue();
      if (modificationQueue != null) {

        modificationQueue.delete(user, relationship, passive);

      } else {

        logger.log(Level.SEVERE, "Got empty changeSet from command!");
      }

    } else {

      logger.log(Level.SEVERE, "Relationship deleted while outside of transaction!");
    }
  }
예제 #4
0
  public static void postProcess(final String key, final TransactionPostProcess process) {

    TransactionCommand command = currentCommand.get();
    if (command != null) {

      ModificationQueue modificationQueue = command.getModificationQueue();
      if (modificationQueue != null) {

        modificationQueue.postProcess(key, process);

      } else {

        logger.log(Level.SEVERE, "Got empty changeSet from command!");
      }

    } else {

      logger.log(
          Level.SEVERE,
          "Trying to register transaction post processing while outside of transaction!");
    }
  }