Package org.apache.isis.runtimes.dflt.runtime.persistence.internal

Examples of org.apache.isis.runtimes.dflt.runtime.persistence.internal.RuntimeContextFromSession


        SpecificationLoader mockSpecificationLoader;
        final JavaReflectorInstaller javaReflectorInstaller = new JavaReflectorInstaller();
        javaReflectorInstaller.setConfiguration(configuration);
        mockSpecificationLoader = javaReflectorInstaller.createReflector();

        ((ObjectReflectorDefault) mockSpecificationLoader).setRuntimeContext(new RuntimeContextFromSession());

        final InMemoryPersistenceMechanismInstaller persistenceMechanismInstaller = new InMemoryPersistenceMechanismInstaller();
        persistenceMechanismInstaller.setConfiguration(configuration);
        final PersistenceSessionFactory mockPersistenceSessionFactory = persistenceMechanismInstaller.createPersistenceSessionFactory(DeploymentType.PROTOTYPE);
View Full Code Here


        SpecificationLoader mockSpecificationLoader;
        final JavaReflectorInstaller javaReflectorInstaller = new JavaReflectorInstaller();
        javaReflectorInstaller.setConfiguration(configuration);
        mockSpecificationLoader = javaReflectorInstaller.createReflector();

        ((ObjectReflectorDefault) mockSpecificationLoader).setRuntimeContext(new RuntimeContextFromSession());

        if (configuration.getString(SqlObjectStore.BASE_NAME + ".jdbc.driver") == null) {
            if (configuration.getString("isis.persistor") == "in-memory") {
                persistenceMechanismInstaller = new InMemoryPersistenceMechanismInstaller();
            } else {
View Full Code Here

                ignoring(mockTemplateImageLoader);
            }
        });

        reflector.setRuntimeContext(new RuntimeContextFromSession());

        IsisContext.setConfiguration(configuration);

        final IsisSessionFactory sessionFactory = new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, configuration, mockTemplateImageLoader, reflector, mockAuthenticationManager, mockAuthorizationManager, mockUserProfileLoader, mockPersistenceSessionFactory, servicesList);
        IsisContextStatic.createRelaxedInstance(sessionFactory);
View Full Code Here

public abstract class ValueFieldTest extends FacetHolderNoop implements OneToOneAssociation {

    private final RuntimeContext runtimeContext;

    public ValueFieldTest() {
        runtimeContext = new RuntimeContextFromSession();
    }
View Full Code Here

public abstract class OneToOneAssociationTest extends FacetHolderNoop implements OneToOneAssociation {

    private final RuntimeContext runtimeContext;

    public OneToOneAssociationTest() {
        runtimeContext = new RuntimeContextFromSession();
    }
View Full Code Here

    public TestProxyPersistenceSession(final PersistenceSessionFactory persistenceSessionFactory) {
        super(persistenceSessionFactory, new AdapterFactoryTestProxyAdapter(), new TestObjectFactory(Mode.RELAXED) {
        }, new ServicesInjectorDefault(), new TestProxyOidGenerator(), new AdapterManagerDefault());

        final RuntimeContextFromSession runtimeContext = new RuntimeContextFromSession();
        final DomainObjectContainerDefault container = new DomainObjectContainerDefault();
        runtimeContext.injectInto(container);
        runtimeContext.setContainer(container);

        getServicesInjector().setContainer(container);

        setTransactionManager(transactionManager);
    }
View Full Code Here

        adapterManager = new AdapterManagerDefault();
        adapterFactory = new PojoAdapterFactory();
        objectFactory = new ObjectFactoryBasic();
        oidGenerator = new TestProxyOidGenerator();

        final RuntimeContextFromSession runtimeContext = new RuntimeContextFromSession();
        final DomainObjectContainerDefault container = new DomainObjectContainerDefault();

        runtimeContext.injectInto(container);
        runtimeContext.setContainer(container);

        final ServicesInjectorDefault servicesInjector = new ServicesInjectorDefault();
        servicesInjector.setContainer(container);

        persistenceSessionProxy = new PersistenceSessionProxy(mockPersistenceSessionFactory, adapterFactory, objectFactory, servicesInjector, oidGenerator, adapterManager, mockDistribution, mockEncoder);
View Full Code Here

        final List<Object> servicesList = obtainServices();

        // bind metamodel to the (runtime) framework
        // REVIEW: misplaced? seems like a side-effect...
        reflector.setRuntimeContext(new RuntimeContextFromSession());

        return new IsisSessionFactoryDefault(deploymentType, configuration, templateImageLoader, reflector, authenticationManager, authorizationManager, userProfileLoader, persistenceSessionFactory, servicesList);

    }
View Full Code Here

        for (final String key : applicationConfiguration) {
            final String value = applicationConfiguration.getString(key);
            final String newKey = key.substring("application.".length());
            properties.setProperty(newKey, value);
        }
        final RuntimeContextFromSession runtimeContext = new RuntimeContextFromSession();
        runtimeContext.setProperties(properties);
        return runtimeContext;
    }
View Full Code Here

        testProxyObjectAdapter.setupOid(new TestProxyOid(nextId++));
        return testProxyObjectAdapter;
    }

    public void init() {
        reflector.setRuntimeContext(new RuntimeContextFromSession());

        final IsisSessionFactory sessionFactory = new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, configuration, noopTemplateImageLoader, reflector, authenticationManager, authorizationManager, userProfileLoader, persistenceSessionFactory, servicesList);

        persistenceSession.setSpecificationLoader(reflector);
        // this implementation of persistenceSession will automatically inject
View Full Code Here

TOP

Related Classes of org.apache.isis.runtimes.dflt.runtime.persistence.internal.RuntimeContextFromSession

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.