Examples of defineObject()


Examples of org.pentaho.platform.engine.core.system.objfac.StandaloneObjectFactory.defineObject()

  public void testGlobalObject2() throws Exception {

    StandaloneObjectFactory factory = new StandaloneObjectFactory();

    factory.defineObject( Object2.class.getSimpleName(), Object2.class.getName(), Scope.GLOBAL );

    IPentahoSession session1 = new StandaloneSession( "test user 1" ); //$NON-NLS-1$
    IPentahoSession session2 = new StandaloneSession( "test user 2" ); //$NON-NLS-1$

    Object2 obj1 = factory.get( Object2.class, session1 );
View Full Code Here

Examples of org.pentaho.platform.engine.core.system.objfac.StandaloneObjectFactory.defineObject()

  public void testGlobalObject3() throws Exception {

    StandaloneObjectFactory factory = new StandaloneObjectFactory();

    factory.defineObject( Object2.class.getSimpleName(), Object2.class.getName(), Scope.GLOBAL, getClass()
        .getClassLoader() );

    IPentahoSession session1 = new StandaloneSession( "test user 1" ); //$NON-NLS-1$
    IPentahoSession session2 = new StandaloneSession( "test user 2" ); //$NON-NLS-1$
View Full Code Here

Examples of org.pentaho.platform.engine.core.system.objfac.StandaloneObjectFactory.defineObject()

  public void testGlobalObjectFail() throws Exception {

    StandaloneObjectFactory factory = new StandaloneObjectFactory();

    factory.defineObject( Object1.class.getSimpleName(), "bogus", Scope.GLOBAL ); //$NON-NLS-1$ 

    IPentahoSession session1 = new StandaloneSession( "test user 1" ); //$NON-NLS-1$

    try {
      factory.get( Object1.class, session1 );
View Full Code Here

Examples of org.pentaho.platform.engine.core.system.objfac.StandaloneObjectFactory.defineObject()

  public void testGlobalObjectFail2() throws Exception {

    StandaloneObjectFactory factory = new StandaloneObjectFactory();

    factory.defineObject( Object2.class.getSimpleName(), Object2.class.getName(), Scope.GLOBAL, null );
    IPentahoSession session1 = new StandaloneSession( "test user 1" ); //$NON-NLS-1$
    try {
      factory.get( Object2.class, session1 );
      assertTrue( "Exception expected", false ); //$NON-NLS-1$
    } catch ( NullPointerException e ) {
View Full Code Here

Examples of org.pentaho.platform.engine.core.system.objfac.StandaloneObjectFactory.defineObject()

  public void testSessionObject1() throws Exception {

    StandaloneObjectFactory factory = new StandaloneObjectFactory();

    factory.defineObject( Object1.class.getSimpleName(), Object1.class.getName(), Scope.SESSION );

    IPentahoSession session1 = new StandaloneSession( "test user 1" ); //$NON-NLS-1$
    IPentahoSession session2 = new StandaloneSession( "test user 2" ); //$NON-NLS-1$

    Object1 obj1 = factory.get( Object1.class, session1 );
View Full Code Here

Examples of org.pentaho.platform.engine.core.system.objfac.StandaloneObjectFactory.defineObject()

  public void testSessionObject2() throws Exception {

    StandaloneObjectFactory factory = new StandaloneObjectFactory();

    factory.defineObject( Object2.class.getSimpleName(), Object2.class.getName(), Scope.SESSION );

    IPentahoSession session1 = new StandaloneSession( "test user 1" ); //$NON-NLS-1$
    IPentahoSession session2 = new StandaloneSession( "test user 2" ); //$NON-NLS-1$

    Object2 obj1 = factory.get( Object2.class, session1 );
View Full Code Here

Examples of org.pentaho.platform.engine.core.system.objfac.StandaloneObjectFactory.defineObject()

  public void testSessionObjectFail1() throws Exception {

    StandaloneObjectFactory factory = new StandaloneObjectFactory();

    factory.defineObject( Object1.class.getSimpleName(), "bogus", Scope.SESSION ); //$NON-NLS-1$ 

    IPentahoSession session1 = new StandaloneSession( "test user 1" ); //$NON-NLS-1$

    try {
      factory.get( Object1.class, session1 );
View Full Code Here

Examples of org.pentaho.platform.engine.core.system.objfac.StandaloneObjectFactory.defineObject()

  public void testSessionObjectFail2() throws Exception {

    StandaloneObjectFactory factory = new StandaloneObjectFactory();

    factory.defineObject( Object1.class.getSimpleName(), Object1.class.getName(), Scope.SESSION );

    try {
      factory.get( Object1.class, null );
      assertFalse( "exception expected", true ); //$NON-NLS-1$
    } catch ( IllegalArgumentException e ) {
View Full Code Here

Examples of org.pentaho.platform.engine.core.system.objfac.StandaloneObjectFactory.defineObject()

  public void testLocalObject1() throws Exception {

    StandaloneObjectFactory factory = new StandaloneObjectFactory();

    factory.defineObject( Object1.class.getSimpleName(), Object1.class.getName(), Scope.LOCAL );

    IPentahoSession session1 = new StandaloneSession( "test user 1" ); //$NON-NLS-1$

    Object1 obj1 = factory.get( Object1.class, session1 );
    assertNotNull( "Object is null", obj1 ); //$NON-NLS-1$
View Full Code Here

Examples of org.pentaho.platform.engine.core.system.objfac.StandaloneObjectFactory.defineObject()

  public void testLocalObject2() throws Exception {

    StandaloneObjectFactory factory = new StandaloneObjectFactory();

    factory.defineObject( Object2.class.getSimpleName(), Object2.class.getName(), Scope.LOCAL );

    IPentahoSession session1 = new StandaloneSession( "test user 1" ); //$NON-NLS-1$

    Object2 obj1 = factory.get( Object2.class, session1 );
    assertNotNull( "Object is null", obj1 ); //$NON-NLS-1$
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.