Package ome.system
Class Login
- java.lang.Object
-
- ome.system.Login
-
public class Login extends java.lang.ObjectProvides simplified handling of login properties when creating aServiceFactory. For more complicated uses,Propertiescan also be used. In which case, the constantstringsprovided in this class can be used as the keys to theproperties instancepassed toServiceFactory(Properties).- Since:
- 1.0
- See Also:
ServiceFactory
-
-
Field Summary
Fields Modifier and Type Field Description static LoginGUESTLoginconstant which has username and password values set to null and other values set to their default.static java.lang.StringOMERO_EVENTJava property name for use in configuration of client login.static java.lang.StringOMERO_GROUPJava property name for use in configuration of client login.static java.lang.StringOMERO_PASSJava property name for use in configuration of client login.static java.lang.StringOMERO_USERJava property name for use in configuration of client login.
-
Constructor Summary
Constructors Constructor Description Login(java.lang.String user, java.lang.String password)standard constructor which leaves OMERO_GROUP and OMERO_EVENT null.Login(java.lang.String user, java.lang.String password, java.lang.String group, java.lang.String event)extended constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.PropertiesasProperties()produces a copy of the internal fields as aPropertiesinstance.java.lang.StringgetEvent()simple getter for the event type passed into the constructorjava.lang.StringgetGroup()simple getter for the group name passed into the constructorjava.lang.StringgetName()simple getter for the user name passed into the constructorjava.lang.StringgetPassword()simple getter for the password passed into the constructor
-
-
-
Field Detail
-
OMERO_USER
public static final java.lang.String OMERO_USER
Java property name for use in configuration of client login.- See Also:
- Constant Field Values
-
OMERO_GROUP
public static final java.lang.String OMERO_GROUP
Java property name for use in configuration of client login.- See Also:
- Constant Field Values
-
OMERO_PASS
public static final java.lang.String OMERO_PASS
Java property name for use in configuration of client login.- See Also:
- Constant Field Values
-
OMERO_EVENT
public static final java.lang.String OMERO_EVENT
Java property name for use in configuration of client login.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Login
public Login(java.lang.String user, java.lang.String password)standard constructor which leaves OMERO_GROUP and OMERO_EVENT null.- Parameters:
user-Experimenter.getOmeName(). Not null.password- Cleartext password. Not null.
-
Login
public Login(java.lang.String user, java.lang.String password, java.lang.String group, java.lang.String event)extended constructor. As withLogin(String, String), user and password may not be null.- Parameters:
user-Experimenter.getOmeName(). Not null.password- Cleartext password. Not null.group- Group name. May be null.event- Enumeration value of the EventType. May be null.
-
-
Method Detail
-
asProperties
public java.util.Properties asProperties()
produces a copy of the internal fields as aPropertiesinstance. Only those keys are present for which a field is non-null.- Returns:
- Properties. Not null.
-
getName
public java.lang.String getName()
simple getter for the user name passed into the constructor- Returns:
user name. Not null unless Login ==GUEST.
-
getPassword
public java.lang.String getPassword()
simple getter for the password passed into the constructor- Returns:
- password. Not null unless Login ==
GUEST
-
getGroup
public java.lang.String getGroup()
simple getter for the group name passed into the constructor- Returns:
group name. May be null.
-
getEvent
public java.lang.String getEvent()
simple getter for the event type passed into the constructor- Returns:
event type. May be null.
-
-