public VersionHistoryImpl versionHistory ( boolean pool ) throws UnsupportedRepositoryOperationException , RepositoryException { if ( ! this . isNodeType ( Constants . MIX_VERSIONABLE ) ) { throw new UnsupportedRepositoryOperationException ( "Node is not mix:versionable " + getPath ( ) ) ; } PropertyData vhProp = ( PropertyData ) dataManager . getItemData ( nodeData ( ) , new QPathEntry ( Constants . JCR_VERSIONHISTORY , 1 ) , ItemType . PROPERTY ) ; if ( vhProp == null ) { throw new UnsupportedRepositoryOperationException ( "Node does not have jcr:versionHistory " + getPath ( ) ) ; } return ( VersionHistoryImpl ) dataManager . getItemByIdentifier ( ValueDataUtil . getString ( vhProp . getValues ( ) . get ( 0 ) ) , pool , false ) ; }
For internal use . Doesn t check the InvalidItemStateException and may return unpooled VersionHistory object .