/** * Call beforeModification/Creation/Deletion methods. * * @param modificationQueue * @param securityContext * @param errorBuffer * @return valid * @throws FrameworkException */ public boolean doInnerCallback( ModificationQueue modificationQueue, SecurityContext securityContext, ErrorBuffer errorBuffer) throws FrameworkException { boolean valid = true; // check for modification propagation along the relationships if ((status & STATE_PROPAGATING_MODIFICATION) == STATE_PROPAGATING_MODIFICATION && object instanceof AbstractNode) { Set<AbstractNode> nodes = ((AbstractNode) object).getNodesForModificationPropagation(); if (nodes != null) { for (AbstractNode node : nodes) { modificationQueue.propagatedModification(node); } } } // examine only the last 4 bits here switch (status & 0x000f) { case 15: case 14: case 13: case 12: case 11: case 10: case 9: case 8: // since all values >= 8 mean that the object was passively deleted, no action has to // be taken // (no callback for passive deletion!) break; case 7: // created, modified, deleted, poor guy => no callback break; case 6: // created, modified => only creation callback will be called valid &= object.onCreation(securityContext, errorBuffer); break; case 5: // created, deleted => no callback break; case 4: // created => creation callback valid &= object.onCreation(securityContext, errorBuffer); break; case 3: // modified, deleted => deletion callback valid &= object.onDeletion(securityContext, errorBuffer, removedProperties); break; case 2: // modified => modification callback valid &= object.onModification(securityContext, errorBuffer); break; case 1: // deleted => deletion callback valid &= object.onDeletion(securityContext, errorBuffer, removedProperties); break; case 0: // no action, no callback break; default: break; } // mark as finished modified = false; return valid; }