Package org.apache.jackrabbit.core

Examples of org.apache.jackrabbit.core.VersionManagerImpl


    IPentahoSession pentahoSession = mock( IPentahoSession.class );
    when( pentahoSession.getName() ).thenReturn( username );

    JcrRepositoryFileUtils.setVersioningEnabled( Boolean.TRUE );

    VersionManagerImpl versionManager = mock( VersionManagerImpl.class );
    when( workspaceMock.getVersionManager() ).thenReturn( versionManager );

    when( mockNode.getParent() ).thenReturn( parentNode );

    PentahoJcrConstants pentahoJcrConstants = new PentahoJcrConstants( sessionMock );
View Full Code Here


    Node mockNode = mock( Node.class );
    Node parentNode = mock( Node.class );
    Node versionNode = mock( Node.class );
    Version mockVersion = mock( Version.class );
    Version mockVersion2 = mock( Version.class );
    VersionManagerImpl versionManager = mock( VersionManagerImpl.class );
    VersionHistory mockVersionHistory = mock( VersionHistory.class );
    IPentahoSession pentahoSession = mock( IPentahoSession.class );

    when( pentahoSession.getName() ).thenReturn( username );
    when( sessionMock.getNodeByIdentifier( anyString() ) ).thenReturn( mockNode );

    String[] mockVersionLabels = { "label1" };
    when( mockVersionHistory.getVersionLabels( mockVersion ) ).thenReturn( mockVersionLabels );
    when( mockVersionHistory.getVersionableIdentifier() ).thenReturn( versionableIdentifier );

    Version[] mockVersionsList = { mockVersion, mockVersion2 };
    Version[] mockVersionsList2 = { mockVersion };
    when( mockVersion.getSuccessors() ).thenReturn( mockVersionsList, mockVersionsList2, null );
    when( mockVersion.getNode( (String) anyObject() ) ).thenReturn( versionNode );
    when( mockVersion.getName() ).thenReturn( versionName );
    when( mockVersion.getCreated() ).thenReturn( cal );

    when( versionManager.getVersionHistory( mockNode.getPath() ) ).thenReturn( mockVersionHistory );
    when( workspaceMock.getVersionManager() ).thenReturn( versionManager );
    when( mockVersionHistory.getRootVersion() ).thenReturn( mockVersion );

    when( mockNode.getParent() ).thenReturn( parentNode );
    when( mockNode.getIdentifier() ).thenReturn( mockNodeId );
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.core.VersionManagerImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.