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

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


            return createProfileFromTemplate(userName, template);
        }
    }

    private UserProfile createDefaultProfile(final String userName) {
        final UserProfile profile = new UserProfile();
        profile.newPerspective(DEFAULT_PERSPECTIVE_NAME + (IsisContext.getDeploymentType().isExploring() ? EXPLORATION : ""));

        final List<Object> services = getServices();
        if (services.size() == 0 && mode == Mode.STRICT) {
            throw new IsisException("No known services");
        }
        for (final Object service : services) {
            profile.getPerspective().addToServices(service);
        }
        LOG.debug("creating exploration UserProfile for " + userName);
        return profile;
    }
View Full Code Here


        LOG.debug("creating exploration UserProfile for " + userName);
        return profile;
    }

    private UserProfile createProfileFromTemplate(final String userName, final UserProfile template) {
        final UserProfile userProfile = new UserProfile();
        userProfile.copy(template);
        LOG.info("creating UserProfile, from template, for " + userName);
        return userProfile;
    }
View Full Code Here

    @Override
    public IsisSession openSession(final AuthenticationSession authenticationSession) {
        final PersistenceSession persistenceSession = persistenceSessionFactory.createPersistenceSession();
        ensureThatArg(persistenceSession, is(not(nullValue())));

        final UserProfile userProfile = userProfileLoader.getProfile(authenticationSession);
        ensureThatArg(userProfile, is(not(nullValue())));

        // inject into persistenceSession any/all application-scoped components
        // that it requires
        getSpecificationLoader().injectInto(persistenceSession);
View Full Code Here

                will(returnValue(persistenceSession));

                ignoring(mockPersistenceSessionFactory);

                one(mockUserProfileLoader).getProfile(with(any(AuthenticationSession.class)));
                will(returnValue(new UserProfile()));

                ignoring(mockUserProfileLoader);

                ignoring(mockAuthenticationManager);
View Full Code Here

    private UserProfile profile;
    private StringWriter writer;

    @Before
    public void setup() throws Exception {
        profile = new UserProfile();
        writer1 = new UserProfileContentWriter(profile);
        writer = new StringWriter();

    }
View Full Code Here

        this();
        userProfile.copy(profileTemplate.userProfile);
    }

    public ProfileImpl() {
        userProfile = new UserProfile();
    }
View Full Code Here

            throw new NullPointerException("No session for " + this);
        }

        setupViewFactory();

        final UserProfile userProfiler = IsisContext.getUserProfile();

        // TODO viewer should be shown during init() (so login can take place on
        // main window, and can quit
        // before
        // logging in), and should be updated during start to show context.

        // TODO resolving should be done by the views?
        // resolveApplicationContextCollection(rootObject, "services");
        // resolveApplicationContextCollection(rootObject, "objects");
        final RootWorkspaceSpecification spec = new RootWorkspaceSpecification();
        final PerspectiveContent content = new PerspectiveContent(userProfiler.getPerspective());
        if (spec.canDisplay(new ViewRequirement(content, ViewRequirement.CLOSED))) {
            // View view = spec.createView(new RootObject(rootObject), null);
            final View view = spec.createView(content, new Axes(), -1);
            viewer.setRootView(view);
        } else {
            throw new IsisException();
        }

        viewer.init();

        final String name = userProfiler.getPerspective().getName();
        frame.setTitle(name);
        frame.init();

        viewer.initSize();
        viewer.scheduleRepaint();
View Full Code Here

            {
                ignoring(mockSpecificationLoader);
                ignoring(mockPersistenceSessionFactory);

                one(mockUserProfileLoader).getProfile(with(any(AuthenticationSession.class)));
                will(returnValue(new UserProfile()));

                ignoring(mockTemplateImageLoader);
                ignoring(mockAuthenticationManager);
                ignoring(mockAuthorizationManager);
            }
View Full Code Here

                debug.appendln("roles", authenticationSession.getRoles());
            } else {
                debug.appendln("none");
            }

            final UserProfile userProfile = IsisContext.getUserProfile();
            debug.appendTitle("User profile");
            if (userProfile != null) {
                UserProfilesDebugUtil.asDebuggableWithTitle(userProfile).debugData(debug);
            } else {
                debug.appendln("none");
View Full Code Here

                ignoring(mockSpecificationLoader);
                ignoring(mockAuthenticationManager);
                ignoring(mockAuthorizationManager);

                one(mockUserProfileLoader).getProfile(with(any(AuthenticationSession.class)));
                will(returnValue(new UserProfile()));

                ignoring(mockUserProfileLoader);

                allowing(mockPersistenceSessionFactory).createPersistenceSession();
                will(returnValue(mockPersistenceSession));
View Full Code Here

TOP

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

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.