001    package org.nakedobjects.applib.profiles;
002    
003    import org.nakedobjects.applib.fixtures.UserProfileFixture;
004    import org.nakedobjects.applib.switchuser.SwitchUserService;
005    
006    
007    /**
008     * Not intended to be used directly; decouples the {@link UserProfileFixture}, which needs to persist {@link Perspective}s,
009     * from the rest of the framework's runtime.
010     * 
011     * <p>
012     * A suitable implementation is injected into {@link UserProfileFixture} when installed.
013     * 
014     * @see SwitchUserService
015     */
016    public interface ProfileService {
017    
018        Profile newUserProfile();
019    
020        Profile newUserProfile(Profile profile);
021    
022        void saveForUser(String name, Profile profile);
023    
024        void saveAsDefault(Profile profile);
025    
026    }