LoginMode

public final class LoginMode

Encapsulates the operations on login mode.

Fields

OPEN_ID

public static final LoginMode OPEN_ID

REPOSITORY

public static final LoginMode REPOSITORY

Methods

getName

public String getName()

isOpenId

public boolean isOpenId()

Checks if this login mode is set to “Open ID”.

Returns:true if this login mode is set to “Open ID”, false otherwise

isRepository

public boolean isRepository()

Checks if this login mode is set to “Repository”.

Returns:true if this login mode is set to “Repository”, false otherwise

valueOf

public static LoginMode valueOf(String loginMode)

Creates proper login mode from given String, which can be either “repository” or “openId”.

Parameters:
  • loginMode – the login mode to be created, must be either “repository” or “openId”, other values will return null
Returns:

the proper object of LoginMode, null if given value was neither “repository” nor “openId”