org.nakedobjects.applib.fixtures
Class LogonFixture

java.lang.Object
  extended by org.nakedobjects.applib.fixtures.LogonFixture
All Implemented Interfaces:
InstallableFixture

public class LogonFixture
extends java.lang.Object
implements InstallableFixture

Indicates that the demo or test should be run as the specified user, with the specified roles.

Note: this fixture does not in itself do anything (its install() is a no-op). However, if present in the fixture list then is "noticed" by the framework, and is used to automatically logon when the framework is booted (providing running in prototype or exploration, not in production).

To change the user during the installation of fixtures, either use SwitchUserFixture.

See Also:
SwitchUserFixture

Constructor Summary
LogonFixture(java.lang.String username, java.util.List<java.lang.String> roles)
           
LogonFixture(java.lang.String username, java.lang.String... roles)
           
 
Method Summary
 java.util.List<java.lang.String> getRoles()
           
 FixtureType getType()
          Determines whether the fixture will be installed, dependent on the state of the object (data) store and the user profile store.
 java.lang.String getUsername()
           
 void install()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LogonFixture

public LogonFixture(java.lang.String username,
                    java.lang.String... roles)

LogonFixture

public LogonFixture(java.lang.String username,
                    java.util.List<java.lang.String> roles)
Method Detail

getUsername

public java.lang.String getUsername()

getRoles

public java.util.List<java.lang.String> getRoles()

install

public final void install()
Specified by:
install in interface InstallableFixture

getType

public FixtureType getType()
Description copied from interface: InstallableFixture
Determines whether the fixture will be installed, dependent on the state of the object (data) store and the user profile store.

Specified by:
getType in interface InstallableFixture

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.