* <li>{@link ConsolidatingChangeLog.CancelableOperation#CANCEL_NONE CANCEL_NONE} otherwise.</li>
* </ul>
*/
public int cancel(CancelableOperation other) throws RepositoryException {
if (other instanceof Remove) {
Path thisPath = ConsolidatingChangeLog.getPath(nodeId);
Path otherPath = ConsolidatingChangeLog.getPath(((Remove) other).itemId);
return thisPath.isDescendantOf(otherPath) || thisPath.equals(otherPath)
? CANCEL_THIS
: CANCEL_NONE;
}
if (other instanceof SetMixins) {
SetMixins setMixin = (SetMixins) other;
if (mixinNodeTypeNames.length == setMixin.mixinNodeTypeNames.length) {
Path thisPath = ConsolidatingChangeLog.getPath(nodeId);
Path otherPath = ConsolidatingChangeLog.getPath(setMixin.nodeId);
if (thisPath.equals(otherPath)) {
for (int k = 0; k < mixinNodeTypeNames.length; k++) {
if (!mixinNodeTypeNames[k].equals(setMixin.mixinNodeTypeNames[k])) {
return CANCEL_NONE;
}