Examples of storeDomain()


Examples of org.pentaho.platform.plugin.services.metadata.SessionCachingMetadataDomainRepository.storeDomain()

    MockSessionAwareMetadataDomainRepository mock = new MockSessionAwareMetadataDomainRepository();

    SessionCachingMetadataDomainRepository repo = new SessionCachingMetadataDomainRepository( mock );
    PentahoSessionHolder.setSession( new StandaloneSession( "Standalone Session", "1" ) ); //$NON-NLS-1$ //$NON-NLS-2$

    repo.storeDomain( getTestDomain( ID ), false );

    // No cache values when storing a domain
    assertEquals( 0, PentahoSystem.getCacheManager( null ).getAllKeysFromRegionCache( CACHE_NAME ).size() );

    // Cache one domain
View Full Code Here

Examples of org.pentaho.platform.plugin.services.metadata.SessionCachingMetadataDomainRepository.storeDomain()

    repo.getDomain( ID );

    // Storing a domain under a different session should wipe out all cached domains with the same id
    PentahoSessionHolder.setSession( new StandaloneSession( "Standalone Session", "2" ) ); //$NON-NLS-1$ //$NON-NLS-2$
    try {
      repo.storeDomain( getTestDomain( ID ), false );
      fail( "Should have thrown a " + DomainAlreadyExistsException.class.getSimpleName() ); //$NON-NLS-1$
    } catch ( DomainAlreadyExistsException ex ) {
      // expected
    }
    repo.storeDomain( getTestDomain( ID ), true );
View Full Code Here

Examples of org.pentaho.platform.plugin.services.metadata.SessionCachingMetadataDomainRepository.storeDomain()

      repo.storeDomain( getTestDomain( ID ), false );
      fail( "Should have thrown a " + DomainAlreadyExistsException.class.getSimpleName() ); //$NON-NLS-1$
    } catch ( DomainAlreadyExistsException ex ) {
      // expected
    }
    repo.storeDomain( getTestDomain( ID ), true );
    // Storing a domain under a different session should wipe out all cached domains with the same id
    assertEquals( 0, PentahoSystem.getCacheManager( null ).getAllKeysFromRegionCache( CACHE_NAME ).size() );

    assertEquals( 1, repo.getDomainIds().size() );
    repo.getDomain( ID );
View Full Code Here

Examples of org.pentaho.platform.plugin.services.metadata.SessionCachingMetadataDomainRepository.storeDomain()

    assertEquals( 1, repo.getDomainIds().size() );
    repo.getDomain( ID );
    assertEquals( 2, PentahoSystem.getCacheManager( null ).getAllKeysFromRegionCache( CACHE_NAME ).size() );

    // Storing a domain should only wipe out the cached domains with the same id
    repo.storeDomain( getTestDomain( "2" ), false ); //$NON-NLS-1$
    assertEquals( 2, repo.getDomainIds().size() );
    assertEquals( 2, PentahoSystem.getCacheManager( null ).getAllKeysFromRegionCache( CACHE_NAME ).size() );
  }

  public void testRemoveModel() throws Exception {
View Full Code Here

Examples of org.pentaho.platform.plugin.services.metadata.SessionCachingMetadataDomainRepository.storeDomain()

    Domain domain = getTestDomain( ID1 );
    LogicalModel model = new LogicalModel();
    model.setId( "test" ); //$NON-NLS-1$
    domain.addLogicalModel( model );

    repo.storeDomain( domain, false );
    repo.storeDomain( getTestDomain( ID2 ), false );

    repo.getDomain( ID1 );
    assertEquals( 1, PentahoSystem.getCacheManager( null ).getAllKeysFromRegionCache( CACHE_NAME ).size() );
    repo.getDomain( ID2 );
View Full Code Here

Examples of org.pentaho.platform.plugin.services.metadata.SessionCachingMetadataDomainRepository.storeDomain()

    LogicalModel model = new LogicalModel();
    model.setId( "test" ); //$NON-NLS-1$
    domain.addLogicalModel( model );

    repo.storeDomain( domain, false );
    repo.storeDomain( getTestDomain( ID2 ), false );

    repo.getDomain( ID1 );
    assertEquals( 1, PentahoSystem.getCacheManager( null ).getAllKeysFromRegionCache( CACHE_NAME ).size() );
    repo.getDomain( ID2 );
    assertEquals( 2, PentahoSystem.getCacheManager( null ).getAllKeysFromRegionCache( CACHE_NAME ).size() );
View Full Code Here

Examples of org.pentaho.platform.plugin.services.metadata.SessionCachingMetadataDomainRepository.storeDomain()

    final String ID1 = "1"; //$NON-NLS-1$
    final String ID2 = "2"; //$NON-NLS-1$
    MockSessionAwareMetadataDomainRepository mock = new MockSessionAwareMetadataDomainRepository();

    SessionCachingMetadataDomainRepository repo = new SessionCachingMetadataDomainRepository( mock );
    repo.storeDomain( getTestDomain( ID1 ), false );
    repo.storeDomain( getTestDomain( ID2 ), false );

    PentahoSessionHolder.setSession( new StandaloneSession( "Standalone Session", "1" ) ); //$NON-NLS-1$ //$NON-NLS-2$
    repo.getDomain( ID1 );
View Full Code Here

Examples of org.pentaho.platform.plugin.services.metadata.SessionCachingMetadataDomainRepository.storeDomain()

    final String ID2 = "2"; //$NON-NLS-1$
    MockSessionAwareMetadataDomainRepository mock = new MockSessionAwareMetadataDomainRepository();

    SessionCachingMetadataDomainRepository repo = new SessionCachingMetadataDomainRepository( mock );
    repo.storeDomain( getTestDomain( ID1 ), false );
    repo.storeDomain( getTestDomain( ID2 ), false );

    PentahoSessionHolder.setSession( new StandaloneSession( "Standalone Session", "1" ) ); //$NON-NLS-1$ //$NON-NLS-2$
    repo.getDomain( ID1 );

    IPentahoSession session2 = new StandaloneSession( "Standalone Session", "2" ); //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.