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

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


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

    public ProfileImpl() {
        userProfile = new 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

    @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

    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

            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

                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(mockPersistenceSessionFactory);

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

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

    // //////////////////////////////////////////////////////

    @Override
    public UserProfile getProfile(final AuthenticationSession session) {
        final String userName = session.getUserName();
        final UserProfile profile = store.getUserProfile(userName);
        userProfile = profile != null ? profile : createUserProfile(userName);
        return userProfile;
    }
View Full Code Here

    // //////////////////////////////////////////////////////

    private void loadOrCreateProfile() {
        if (userProfile == null) {
            final String userName = userName();
            final UserProfile profile = store.getUserProfile(userName);
            userProfile = profile != null ? profile : createUserProfile(userName);
        }
    }
View Full Code Here

            userProfile = profile != null ? profile : createUserProfile(userName);
        }
    }

    private UserProfile createUserProfile(final String userName) {
        final UserProfile template = store.getUserProfile("_default");
        if (template == null) {
            return createDefaultProfile(userName);
        } else {
            return createProfileFromTemplate(userName, template);
        }
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.