Package org.apache.isis.core.commons.config

Examples of org.apache.isis.core.commons.config.IsisConfiguration


    protected final String footer;
    protected final String header;
    protected final String styleSheet;

    public HtmlComponentFactory() {
        final IsisConfiguration configuration = IsisContext.getConfiguration();
        styleSheet = configuration.getString(STYLE_SHEET);
        String file = configuration.getString(HEADER_FILE);
        header = file == null ? configuration.getString(HEADER) : loadFile(file);
        file = configuration.getString(FOOTER_FILE);
        footer = file == null ? configuration.getString(FOOTER) : loadFile(file);
    }
View Full Code Here


   
            final IsisInjectModule isisModule = newIsisModule(deploymentType, isisConfigurationBuilder);
            final Injector injector = Guice.createInjector(isisModule, newIsisWicketModule());
            injector.injectMembers(this);
           
            final IsisConfiguration configuration = isisConfigurationBuilder.getConfiguration();
            this.getMarkupSettings().setStripWicketTags(determineStripWicketTags(configuration));
   
            this.bookmarkedPagesModel = new BookmarkedPagesModel();
   
            initWicketComponentInjection(injector);
View Full Code Here

        }
       
        determiningDeploymentType = true;
        try {
            final IsisConfigurationBuilder isisConfigurationBuilder = createConfigBuilder();
            final IsisConfiguration configuration = isisConfigurationBuilder.getConfiguration();
            String deploymentTypeFromConfig = configuration.getString("isis.deploymentType");
            deploymentType = determineDeploymentType(deploymentTypeFromConfig);
        } finally {
            determiningDeploymentType = false;
        }
    }
View Full Code Here

     * Lazily creates an {@link AuthenticationManager} that will authenticate
     * all requests.
     */
    private AuthenticationManager anonymousAuthenticationManager() {
        if (authenticationManager == null) {
            final IsisConfiguration configuration = IsisContext.getConfiguration();
            final AuthenticationManagerStandard authenticationManager = new AuthenticationManagerStandard(configuration);
            authenticationManager.addAuthenticator(new AuthenticatorAbstract(configuration) {
                @Override
                public boolean isValid(final AuthenticationRequest request) {
                    return true;
View Full Code Here

        final IsisConfigurationBuilder isisConfigurationBuilder = runner.getStartupConfiguration();

        // we don't actually bootstrap the system here; instead we expect it to
        // be bootstrapped
        // from the ServletContextInitializer in the web.xml
        final IsisConfiguration configuration = isisConfigurationBuilder.getConfiguration();
        final int port = configuration.getInteger(EMBEDDED_WEB_SERVER_PORT_KEY, EMBEDDED_WEB_SERVER_PORT_DEFAULT);
        final String webappContextPath = configuration.getString(EMBEDDED_WEB_SERVER_RESOURCE_BASE_KEY, EMBEDDED_WEB_SERVER_RESOURCE_BASE_DEFAULT);
        final StartupMode startupMode = StartupMode.lookup(configuration.getString(EMBEDDED_WEB_SERVER_STARTUP_MODE_KEY, EMBEDDED_WEB_SERVER_STARTUP_MODE_DEFAULT));
        // TODO get and use the address

        jettyServer = new Server(port);
        final WebAppContext context = new WebAppContext(SRC_MAIN_WEBAPP, webappContextPath);
View Full Code Here

        return runtimeContext;
    }

    private static Properties applicationPropertiesFrom(final IsisConfiguration configuration) {
        final Properties properties = new Properties();
        final IsisConfiguration applicationConfiguration = configuration.getProperties("application");
        for (final String key : applicationConfiguration) {
            final String value = applicationConfiguration.getString(key);
            final String newKey = key.substring("application.".length());
            properties.setProperty(newKey, value);
        }
        return properties;
    }
View Full Code Here

     * <i>from</i> the {@link #doCreateSessionFactory(DeploymentType) hook
     * method}.
     */
    protected final IsisSessionFactory createSessionFactory(final DeploymentType deploymentType, final UserProfileLoader userProfileLoader, final PersistenceSessionFactory persistenceSessionFactory) throws IsisSystemException {

        final IsisConfiguration configuration = getConfiguration();
        final AuthenticationManager authenticationManager = obtainAuthenticationManager(deploymentType);
        final AuthorizationManager authorizationManager = obtainAuthorizationManager(deploymentType);
        final TemplateImageLoader templateImageLoader = obtainTemplateImageLoader();
        final OidMarshaller oidMarshaller = obtainOidMarshaller();
       
View Full Code Here

    // ///////////////////////////////////////////
    // Fixtures
    // ///////////////////////////////////////////

    public void lookupAndSetFixturesInstaller() {
        final IsisConfiguration configuration = installerLookup.getConfiguration();
        final String fixture = configuration.getString(SystemConstants.FIXTURES_INSTALLER_KEY);

        final FixturesInstaller fixturesInstaller = installerLookup.fixturesInstaller(fixture);
        if (fixturesInstaller != null) {
            this.fixtureInstaller = fixturesInstaller;
        }
View Full Code Here

    // ///////////////////////////////////////////
    // User Profile Loader/Store
    // ///////////////////////////////////////////

    public void lookupAndSetUserProfileFactoryInstaller() {
        final IsisConfiguration configuration = installerLookup.getConfiguration();
        final String persistor = configuration.getString(SystemConstants.PROFILE_PERSISTOR_INSTALLER_KEY);

        final UserProfileStoreInstaller userProfilePersistenceMechanismInstaller = installerLookup.userProfilePersistenceMechanismInstaller(persistor, getDeploymentType());
        if (userProfilePersistenceMechanismInstaller != null) {
            setUserProfileStoreInstaller(userProfilePersistenceMechanismInstaller);
        }
View Full Code Here

        // (doubt will make much different in terms of the amount of time to process, though)
        if(applicationComponents != null && !applicationComponents.isStale()) {
            return;
        }
       
        final IsisConfiguration dataNucleusConfig = configuration.createSubset(ISIS_CONFIG_PREFIX);
        final Map<String, String> props = dataNucleusConfig.asMap();
        addDataNucleusPropertiesIfRequired(props);

        final Set<String> classesToBePersisted = catalogClassesToBePersisted(configuration, getSpecificationLoader().allSpecifications());
        applicationComponents = new DataNucleusApplicationComponents(props, classesToBePersisted);
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.core.commons.config.IsisConfiguration

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.