Package org.apache.isis.runtimes.dflt.runtime.system

Examples of org.apache.isis.runtimes.dflt.runtime.system.DeploymentType


        assertThat(authenticator.getConfiguration(), is(mockConfiguration));
    }

    @Test
    public void getDeploymentTypeForExploration() throws Exception {
        final DeploymentType deploymentType = DeploymentType.EXPLORATION;
        mockery.checking(new Expectations() {
            {
                allowing(mockConfiguration).getString("isis.deploymentType");
                will(returnValue(deploymentType.name()));
            }
        });
        assertThat(authenticator.getDeploymentType(), is(deploymentType));
    }
View Full Code Here


        assertThat(authenticator.getDeploymentType(), is(deploymentType));
    }

    @Test
    public void getDeploymentTypeForPrototype() throws Exception {
        final DeploymentType deploymentType = DeploymentType.PROTOTYPE;
        mockery.checking(new Expectations() {
            {
                allowing(mockConfiguration).getString("isis.deploymentType");
                will(returnValue(deploymentType.name()));
            }
        });
        assertThat(authenticator.getDeploymentType(), is(deploymentType));
    }
View Full Code Here

        assertThat(authenticator.getDeploymentType(), is(deploymentType));
    }

    @Test
    public void getDeploymentTypeForServer() throws Exception {
        final DeploymentType deploymentType = DeploymentType.SERVER;
        mockery.checking(new Expectations() {
            {
                allowing(mockConfiguration).getString("isis.deploymentType");
                will(returnValue(deploymentType.name()));
            }
        });
        assertThat(authenticator.getDeploymentType(), is(deploymentType));
    }
View Full Code Here

            throw ScenarioBoundValueException.current(onMemberBinding, "(not usable)");
        }
    }

    public void ensureAvailableForDeploymentType(final CellBinding onMemberBinding, final ScenarioCell onMemberCell) throws ScenarioBoundValueException {
        final DeploymentType deploymentType = this.peer.getDeploymentType();

        final boolean isExploration = objectMember.getFacet(ExplorationFacet.class) != null;
        if (isExploration && !deploymentType.isExploring()) {
            throw ScenarioBoundValueException.current(onMemberBinding, "(not running in exploration mode)");
        }

        final boolean isPrototype = objectMember.getFacet(PrototypeFacet.class) != null;
        if (isPrototype && !deploymentType.isPrototyping()) {
            throw ScenarioBoundValueException.current(onMemberBinding, "(not running in prototype mode)");
        }
    }
View Full Code Here

        }
        return true;
    }

    private boolean validateOptions(final Options options, final BootPrinter printer) {
        final DeploymentType deploymentType = optionHandlerDeploymentType.getDeploymentType();

        for (final OptionValidator validator : validators) {
            final Maybe<String> errorMessage = validator.validate(deploymentType);
            if (errorMessage.isSet()) {
                printer.printErrorAndHelp(options, errorMessage.get());
View Full Code Here

    // Bootstrapping
    // ///////////////////////////////////////////////////////////////////////////////////////

    public final void bootstrap(final IsisBootstrapper bootstrapper) {

        final DeploymentType deploymentType = optionHandlerDeploymentType.getDeploymentType();

        this.globalInjector =
            createGuiceInjector(deploymentType, isisConfigurationBuilder, installerLookup, optionHandlers);

        bootstrapper.bootstrap(globalInjector);
View Full Code Here

     * Valid providing running in {@link DeploymentType#isExploring() exploration} or
     * {@link DeploymentType#isPrototyping() prototyping} mode.
     */
    @Override
    public final boolean isValid(final AuthenticationRequest request) {
        final DeploymentType deploymentType = getDeploymentType();
        return deploymentType.isExploring() || deploymentType.isPrototyping();
    }
View Full Code Here

            list = createServices(prefix, serviceList);
        } else {
            list = new ArrayList<Object>();
        }
        if (configuration.getBoolean(root + EXPLORATION_OBJECTS)) {
            final DeploymentType deploymentType =
                DeploymentType.lookup(configuration.getString(SystemConstants.DEPLOYMENT_TYPE_KEY));
            if (deploymentType.isExploring()) {
                list.add(new ObjectFixtureService());
            }
        }
        final Object[] array = list.toArray(new Object[list.size()]);
        return array;
View Full Code Here

                new IsisConfigurationBuilderResourceStreams(new ResourceStreamSourceForWebInf(servletContext),
                    new ResourceStreamSourceContextLoaderClassPath());

            primeConfigurationBuilder(isisConfigurationBuilder, servletContext);

            final DeploymentType deploymentType = determineDeploymentType(isisConfigurationBuilder, servletContext);

            addConfigurationResourcesForWebApps(isisConfigurationBuilder);
            addConfigurationResourcesForDeploymentType(isisConfigurationBuilder, deploymentType);
            addConfigurationResourcesForViewers(isisConfigurationBuilder, servletContext);
View Full Code Here

    @Override
    protected void init() {
        super.init();
        getResourceSettings().setParentFolderPlaceholder("$up$");

        final DeploymentType deploymentType = determineDeploymentType();

        final IsisConfigurationBuilder isisConfigurationBuilder = createConfigBuilder();

        final IsisModule isisModule = new IsisModule(deploymentType, isisConfigurationBuilder);
        final Injector injector = Guice.createInjector(isisModule, newIsisWicketModule());
View Full Code Here

TOP

Related Classes of org.apache.isis.runtimes.dflt.runtime.system.DeploymentType

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.