Package org.apache.isis.core.runtime.userprofile

Examples of org.apache.isis.core.runtime.userprofile.Options


        assertEquals("value-2", suboptions.getString("name-3"));
    }

    @Test
    public void emptyWhenOptionsWhenNotFound() throws Exception {
        final Options suboptions = options.getOptions("unkown");
        assertFalse(suboptions.names().hasNext());
    }
View Full Code Here


        assertFalse(suboptions.names().hasNext());
    }

    @Test
    public void newEmptyOptionsAdded() throws Exception {
        final Options suboptions = options.getOptions("unknown");
        suboptions.addOption("test", "value");
        assertSame(suboptions, options.getOptions("unknown"));
    }
View Full Code Here

        return layout.getRequiredSize(this);
    }

    @Override
    public void loadOptions(final Options viewOptions) {
        final Options options = viewOptions.getOptions("fields");
        // options.options()

    }
View Full Code Here

    @Test
    public void getOptionsCreatesNewOptionsSet() throws Exception {
        Logger.getRootLogger().setLevel(Level.OFF);
        new TestProxySystemII().init();

        final Options options = Properties.getOptions("test");
        assertEquals(false, options.names().hasNext());
    }
View Full Code Here

        final boolean isValue = specification != null && specification.containsFacet(ValueFacet.class);
        if (content.isObject() && !isValue && content.getAdapter() == null) {
            return getEmptyFieldSpecification();
        } else {
            if (specification != null) {
                final Options viewOptions = Properties.getDefaultViewOptions(specification);
                String spec = viewOptions.getString("spec");
                if (spec == null) {
                    if (content instanceof ObjectContent && requirement.isObject() && requirement.isClosed()) {
                        spec = Properties.getDefaultIconViewOptions();
                    } else if (content instanceof CollectionContent && requirement.isCollection()) {
                        spec = Properties.getDefaultCollectionViewOptions();
View Full Code Here

            return fallback;
        }
    }

    public void loadUserViewSpecifications() {
        final Options options = Properties.getOptions("views.user-defined");
        final Iterator<String> names = options.names();
        while (names.hasNext()) {
            final String name = names.next();
            final Options viewOptions = options.getOptions(name);
            final String specName = viewOptions.getString("design");
            addSpecification(specName);
        }
    }
View Full Code Here

    public static String getDefaultCollectionViewOptions() {
        return getString("view.collection-default");
    }

    public static Options getViewConfigurationOptions(final ViewSpecification specification) {
        final Options settingsOptions = getOptions("views.configuration");
        final String specificationName = specification.getName();
        return settingsOptions.getOptions(specificationName);
    }
View Full Code Here

        final String specificationName = specification.getName();
        return settingsOptions.getOptions(specificationName);
    }

    public static Options getDefaultViewOptions(final ObjectSpecification specification) {
        final Options settingsOptions = getOptions("views.type-default");
        String name;
        if (specification.isCollection()) {
            name = "collection:" + specification.getFacet(TypeOfFacet.class).valueSpec().getFullIdentifier();
        } else {
            name = specification.getFullIdentifier();
        }
        final Options viewOptions = settingsOptions.getOptions(name);
        return viewOptions;
    }
View Full Code Here

        final Options viewOptions = settingsOptions.getOptions(name);
        return viewOptions;
    }

    public static Options getUserViewSpecificationOptions(final String specificationName) {
        final Options settingsOptions = getOptions("views.user-defined");
        return settingsOptions.getOptions(specificationName);
    }
View Full Code Here

        }

        final CompositeViewUsingBuilder view = new CompositeViewUsingBuilder(content, this, axes, layout, builder);
        view.setCanDragView(builder.canDragView());
        final View decoratedView = decorateView(view, view.getViewAxes());
        final Options options = Properties.getViewConfigurationOptions(this);
        decoratedView.loadOptions(options);
        return decoratedView;
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.core.runtime.userprofile.Options

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.