protected ItemData putNode ( NodeData node , ModifyChildOption modifyListsOfChild ) { if ( node . getParentIdentifier ( ) != null ) { if ( modifyListsOfChild == ModifyChildOption . NOT_MODIFY ) { cache . putIfAbsent ( new CacheQPath ( getOwnerId ( ) , node . getParentIdentifier ( ) , node . getQPath ( ) , ItemType . NODE ) , node . getIdentifier ( ) ) ; } else { cache . put ( new CacheQPath ( getOwnerId ( ) , node . getParentIdentifier ( ) , node . getQPath ( ) , ItemType . NODE ) , node . getIdentifier ( ) ) ; } // if MODIFY and List present OR FORCE_MODIFY, then write if ( modifyListsOfChild != ModifyChildOption . NOT_MODIFY ) { cache . addToPatternList ( new CachePatternNodesId ( getOwnerId ( ) , node . getParentIdentifier ( ) ) , node ) ; cache . addToList ( new CacheNodesId ( getOwnerId ( ) , node . getParentIdentifier ( ) ) , node . getIdentifier ( ) , modifyListsOfChild == ModifyChildOption . FORCE_MODIFY ) ; cache . remove ( new CacheNodesByPageId ( getOwnerId ( ) , node . getParentIdentifier ( ) ) ) ; } } if ( modifyListsOfChild == ModifyChildOption . NOT_MODIFY ) { return ( ItemData ) cache . putIfAbsent ( new CacheId ( getOwnerId ( ) , node . getIdentifier ( ) ) , node ) ; } else { return ( ItemData ) cache . put ( new CacheId ( getOwnerId ( ) , node . getIdentifier ( ) ) , node , true ) ; } }
Internal put Node .