com.waveset.object
Class Account.Situation

java.lang.Object
  extended bycom.waveset.object.Account.Situation
Enclosing class:
Account

public static class Account.Situation
extends java.lang.Object


Field Summary
static java.lang.String ACCEPT
           
static Account.Situation COLLISION
          Found a resource account claimed by more than one Lighthouse user.
static Account.Situation CONFIRMED
          Found an account we expected to find on the resource.
static Account.Situation DELETED
          Did NOT find an account we expected to find on the resource.
static Account.Situation DISPUTED
          Found a resource account that correlates with more than one Lighthouse user.
static java.lang.String DO_NOTHING
           
static Account.Situation FOUND
          Found an account on a resource assigned to the user (but Lighthouse did not know beforehand that the account existed).
static int MAX_NAME_LENGTH
          Length of the longest situation name.
static Account.Situation MISSING
          No account was found on a resource assigned to the user (but Lighthouse did not really expect the account to exist).
static java.lang.String REJECT
           
static java.lang.String REPORT
           
static java.lang.String RESPONSE
           
static Account.Situation UNASSIGNED
          Found a resource account that correlates with an existing Lighthouse user (but the resource is not assigned to that user).
static Account.Situation UNKNOWN
          The state of this resource account (relative to Lighthouse) has not yet been determined.
static Account.Situation UNMATCHED
          Found a resource account that does NOT correlate with any existing Lighthouse user.
 
Method Summary
static Account.Situation fromString(java.lang.String name)
          Translate the specified string into a Situation.
 java.lang.String getDescMsgId()
           
 java.lang.String getErrMsgId()
           
 java.lang.String getHelpMsgId()
           
 java.lang.String getId()
           
 java.lang.String getMsgId()
           
 java.lang.String getName()
          Format the Situation as a Message in the default Locale.
 java.lang.String getName(java.util.Locale locale)
          Format the Situation as a Message in the specified Locale.
static java.util.Map getNameMap()
           
 java.util.List getPossibleResponses()
           
 Account.Response getResponse(java.lang.String responseKey)
          Returns the Response object corresponding to the named response, if the response is supported by the situation.
static java.lang.String getResponseName(java.util.Locale locale, java.lang.String response)
          Provides an externally visible name for internally defined situation responses.
static java.lang.String[] listSituationNames()
           
static Account.Situation[] listSituations()
           
 java.lang.String qualifyParameter(java.lang.String baseParameter)
          Qualify a reconciliation parameter based on the situation name.
 java.lang.String toString()
           
 java.lang.String toString(java.util.Locale locale)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESPONSE

public static final java.lang.String RESPONSE
See Also:
Constant Field Values

DO_NOTHING

public static final java.lang.String DO_NOTHING
See Also:
Constant Field Values

REPORT

public static final java.lang.String REPORT
See Also:
Constant Field Values

ACCEPT

public static final java.lang.String ACCEPT
See Also:
Constant Field Values

REJECT

public static final java.lang.String REJECT
See Also:
Constant Field Values

UNKNOWN

public static final Account.Situation UNKNOWN
The state of this resource account (relative to Lighthouse) has not yet been determined.


CONFIRMED

public static final Account.Situation CONFIRMED
Found an account we expected to find on the resource.

Totally normally, and fairly uninteresting. This is okay.


COLLISION

public static final Account.Situation COLLISION
Found a resource account claimed by more than one Lighthouse user. This is stronger than DISPUTED because it means two (or more) users are CONFIRMED with the account.

This is definitely an error as it can lead to problems.


FOUND

public static final Account.Situation FOUND
Found an account on a resource assigned to the user (but Lighthouse did not know beforehand that the account existed).

Not exactly expected, but not exactly surprising, either. This is a warning.


MISSING

public static final Account.Situation MISSING
No account was found on a resource assigned to the user (but Lighthouse did not really expect the account to exist).

Not exactly expected, but not very surprising. This is a warning.


DELETED

public static final Account.Situation DELETED
Did NOT find an account we expected to find on the resource. (and Lighthouse was sure that the account existed).

Since Lighthouse said the account existed, this is considered to be an error.


UNASSIGNED

public static final Account.Situation UNASSIGNED
Found a resource account that correlates with an existing Lighthouse user (but the resource is not assigned to that user).

Since Lighthouse has no record of the account, this is considered to be an error.


UNMATCHED

public static final Account.Situation UNMATCHED
Found a resource account that does NOT correlate with any existing Lighthouse user.

Since Lighthouse has no record of the account, this is considered to be an error.


DISPUTED

public static final Account.Situation DISPUTED
Found a resource account that correlates with more than one Lighthouse user.

Since Lighthouse has no record of the account, and since the correlation is unclear, this is considered to be an error.


MAX_NAME_LENGTH

public static final int MAX_NAME_LENGTH
Length of the longest situation name.

Temporarily useful in formatting, but should go away once Situation names are localized or each parameter gets a separate column.

Method Detail

getResponseName

public static java.lang.String getResponseName(java.util.Locale locale,
                                               java.lang.String response)
Provides an externally visible name for internally defined situation responses.


listSituations

public static Account.Situation[] listSituations()

listSituationNames

public static java.lang.String[] listSituationNames()

getNameMap

public static java.util.Map getNameMap()

getId

public java.lang.String getId()

getMsgId

public java.lang.String getMsgId()

getDescMsgId

public java.lang.String getDescMsgId()

getErrMsgId

public java.lang.String getErrMsgId()

getHelpMsgId

public java.lang.String getHelpMsgId()

getPossibleResponses

public java.util.List getPossibleResponses()

toString

public java.lang.String toString()

toString

public java.lang.String toString(java.util.Locale locale)

getName

public java.lang.String getName()
Format the Situation as a Message in the default Locale.


getName

public java.lang.String getName(java.util.Locale locale)
Format the Situation as a Message in the specified Locale.


qualifyParameter

public java.lang.String qualifyParameter(java.lang.String baseParameter)
Qualify a reconciliation parameter based on the situation name.


fromString

public static Account.Situation fromString(java.lang.String name)
Translate the specified string into a Situation.


getResponse

public Account.Response getResponse(java.lang.String responseKey)
Returns the Response object corresponding to the named response, if the response is supported by the situation. Accepts both old-style (e.g. Situation.ACCEPT) and new-style response names (Response).

Parameters:
responseKey - - the response name to lookup
Returns:
the Response object whose name matches the argument; returns Response.DO_NOTHING if none matches or if the response is not supported by the situation.