Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha5
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.jcr.cache
Interface SessionCache.PreSave

All Known Implementing Classes:
  JcrSession.JcrPreSave

Enclosing interface:
  SessionCache

    public static interface SessionCache.PreSave

The definition of a callback that can be implemented and passed to `SessionCache.save(SessionCache, PreSave)` and `SessionCache.save(CachedNode, SessionCache, PreSave)`, allowing the caller to recieve a hook where they can interrogate each of the changed nodes and perform additional logic prior to the actual persisting of the changes. Note that implementations are free to make additional modifications to the supplied nodes, and even create additional nodes or change persistent but unchanged nodes, as long as these operations are done within the same calling thread.

Method Summary
`void` | `process(MutableCachedNode modifiedOrNewNode, SessionCache.SaveContext context)` Process the supplied node prior to saving the changes.

Method Detail

### process

    void process(MutableCachedNode modifiedOrNewNode,
                 SessionCache.SaveContext context)
                 throws Exception

  Process the supplied node prior to saving the changes. This allows implementations to use the changes to automatically adjust this node or other content.

  Parameters:
    `modifiedOrNewNode` - the mutable node that was changed in this session; never null
    `context` - the context of the save operation; never null
  Throws:
    `Exception` - if there is a problem during the processing

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha5
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.