Class WebCloudNameLookup
- java.lang.Object
-
- edu.umd.cs.findbugs.cloud.username.WebCloudNameLookup
-
- All Implemented Interfaces:
NameLookup
public class WebCloudNameLookup extends java.lang.Object implements NameLookup
- Author:
- pugh
-
-
Field Summary
-
Fields inherited from interface edu.umd.cs.findbugs.cloud.username.NameLookup
USER_NAME
-
-
Constructor Summary
Constructors Constructor Description WebCloudNameLookup()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckResolveHost()static voidclearSavedSessionInformation()java.lang.StringgetHost()java.lang.LonggetSessionId()java.lang.StringgetUsername()Return name that should be used as the user identitystatic booleanisSavingSessionInfoEnabled()voidloadProperties(CloudPlugin plugin)static voidsaveSessionInformation(long sessionId)static voidsetSaveSessionInformation(boolean save)booleansignIn(CloudPlugin plugin, BugCollection bugCollection)tries to obtain a user name.booleansoftSignin()If the user can be authenticated due to an existing session id, do so
-
-
-
Method Detail
-
signIn
public boolean signIn(CloudPlugin plugin, BugCollection bugCollection) throws java.io.IOException
Description copied from interface:NameLookuptries to obtain a user name. May prompt the user and/or perform network activity.- Specified by:
signInin interfaceNameLookup- Parameters:
plugin- TODO- Returns:
- true if successful
- Throws:
java.io.IOException
-
loadProperties
public void loadProperties(CloudPlugin plugin)
-
softSignin
public boolean softSignin() throws java.io.IOExceptionIf the user can be authenticated due to an existing session id, do so- Returns:
- true if we could authenticate the user
- Throws:
java.io.IOException
-
checkResolveHost
public void checkResolveHost() throws java.net.UnknownHostException- Throws:
java.net.UnknownHostException
-
setSaveSessionInformation
public static void setSaveSessionInformation(boolean save)
-
isSavingSessionInfoEnabled
public static boolean isSavingSessionInfoEnabled()
-
clearSavedSessionInformation
public static void clearSavedSessionInformation()
-
saveSessionInformation
public static void saveSessionInformation(long sessionId)
-
getSessionId
public java.lang.Long getSessionId()
-
getUsername
public java.lang.String getUsername()
Description copied from interface:NameLookupReturn name that should be used as the user identity- Specified by:
getUsernamein interfaceNameLookup
-
getHost
public java.lang.String getHost()
-
-