Examples of DeploymentType


Examples of org.apache.isis.core.runtime.system.DeploymentType

     * 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

Examples of org.apache.isis.core.runtime.system.DeploymentType

        final String group = deploymentType != null? deploymentType.name(): null;
        final String root = ConfigurationConstants.ROOT + (group == null ? "" : group.toLowerCase() + ".");

        if (getConfiguration().getBoolean(root + EXPLORATION_OBJECTS)) {
            final DeploymentType explorationDeploymentType = DeploymentType.lookup(getConfiguration().getString(SystemConstants.DEPLOYMENT_TYPE_KEY));
            if (explorationDeploymentType.isExploring()) {
                ServicesInstallerUtils.appendInPosition(positionedServices, "" + Integer.MAX_VALUE, ObjectFixtureService.class.getName());
            }
        }
    }
View Full Code Here

Examples of org.apache.isis.core.runtime.system.DeploymentType

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

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

Examples of org.apache.isis.core.runtime.system.DeploymentType

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

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

Examples of org.apache.isis.core.runtime.system.DeploymentType

        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

Examples of org.apache.isis.core.runtime.system.DeploymentType

            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

Examples of org.apache.isis.core.runtime.system.DeploymentType

            primeConfigurationBuilder(isisConfigurationBuilder, servletContext);

            isisConfigurationBuilder.addDefaultConfigurationResources();

            final DeploymentType deploymentType = determineDeploymentType(isisConfigurationBuilder, servletContext);

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

Examples of org.apache.isis.core.runtime.system.DeploymentType

        }
        return true;
    }

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

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

Examples of org.apache.isis.core.runtime.system.DeploymentType

    // TODO remove and use is desktop runner

    public final void bootstrap(final IsisBootstrapper bootstrapper) {

        final DeploymentType deploymentType = optionHandlerDeploymentType.getDeploymentType();

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

        bootstrapper.bootstrap(globalInjector);
        isisConfigurationBuilder.lockConfiguration();
View Full Code Here

Examples of org.apache.isis.core.runtime.system.DeploymentType

        IsisSystemUsingInstallersWithinJunit system = null;
        AuthenticationSession session = null;
        try {
            // init the system; cf similar code in Isis and
            // IsisServletContextInitializer
            final DeploymentType deploymentType = DeploymentType.UNIT_TESTING;

            // TODO: replace with regular IsisSystem and remove this subclass.
            system = new IsisSystemUsingInstallersWithinJunit(deploymentType, installerLookup, testClass);

            system.init();
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.