org.licas.security

## Class FaultDetails

- java.lang.Object
- - org.licas.security.FaultDetails

-     public class FaultDetails
      extends java.lang.Object

  Structure to store details about a fault or error.
  Author:
    Kieran Greer

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.lang.String` | `action` Optional text description of a reply action
    `java.util.ArrayList<java.lang.String>` | `conceptList` A list of concepts to create a descriptive tree from.
    `protected java.lang.String` | `event` Optional text description of the fault event
    `protected java.lang.String` | `faultID` An optional unique key to identify the fault
    `protected java.lang.String` | `faultType` The type of fault
    `protected java.lang.Object` | `reference` An optional reference to the fault object.
    `protected long` | `timestamp` Timestamp for the fault

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FaultDetails(java.lang.String faultType, java.lang.Object faultReference)` Create a new instance of FaultDetails
    `FaultDetails(java.lang.String faultType, java.lang.String faultKey)` Create a new instance of FaultDetails

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getAction()` Get the reply action.
    `java.util.ArrayList<java.lang.String>` | `getConceptList()` Get the descriptive concept list.
    `java.lang.String` | `getEvent()` Get the fault event.
    `java.lang.String` | `getKey()` Get the key identifier for the fault.
    `java.lang.Object` | `getReference()` Get the key identifier for the fault.
    `long` | `getTimestamp()` Get the fault timestamp.
    `java.lang.String` | `getType()` Get the fault type.
    `void` | `setAction(java.lang.String thisAction)` Set a description for the reply action.
    `void` | `setConceptList(java.util.ArrayList<java.lang.String> thisConceptList)` Set the descriptive concept list.
    `void` | `setEvent(java.lang.String thisEvent)` Set a description for the fault event.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### faultType

          protected java.lang.String faultType

      The type of fault

    - #### faultID

          protected java.lang.String faultID

      An optional unique key to identify the fault

    - #### reference

          protected java.lang.Object reference

      An optional reference to the fault object. If `faultID` is `null`, then the key is determined by `ObjectHandler`.`getKey()`.

    - #### event

          protected java.lang.String event

      Optional text description of the fault event

    - #### action

          protected java.lang.String action

      Optional text description of a reply action

    - #### timestamp

          protected long timestamp

      Timestamp for the fault

    - #### conceptList

          public java.util.ArrayList<java.lang.String> conceptList

      A list of concepts to create a descriptive tree from. Should include at least one element that may be the fault type, for example.

  - ### Constructor Detail

    - #### FaultDetails

          public FaultDetails(java.lang.String faultType,
                              java.lang.String faultKey)

      Create a new instance of FaultDetails
      Parameters:
        `faultType` - the fault type.
        `faultKey` - a unique id to represent the fault.

    - #### FaultDetails

          public FaultDetails(java.lang.String faultType,
                              java.lang.Object faultReference)

      Create a new instance of FaultDetails
      Parameters:
        `faultType` - the fault type.
        `faultReference` - some reference to the offending object.

  - ### Method Detail

    - #### getType

          public java.lang.String getType()

      Get the fault type.
      Returns:
        the value of faultType.

    - #### getKey

          public java.lang.String getKey()

      Get the key identifier for the fault.
      Returns:
        the value representing the fault key - `faultID`.

    - #### getReference

          public java.lang.Object getReference()

      Get the key identifier for the fault.
      Returns:
        the value representing the fault key - `faultID`.

    - #### setEvent

          public void setEvent(java.lang.String thisEvent)

      Set a description for the fault event.
      Parameters:
        `thisEvent` - the fault event.

    - #### getEvent

          public java.lang.String getEvent()

      Get the fault event. Can be null.
      Returns:
        the value of event.

    - #### setAction

          public void setAction(java.lang.String thisAction)

      Set a description for the reply action.
      Parameters:
        `thisAction` - the reply action.

    - #### getAction

          public java.lang.String getAction()

      Get the reply action. Can be null.
      Returns:
        the value of action.

    - #### getTimestamp

          public long getTimestamp()

      Get the fault timestamp.
      Returns:
        the value of timestamp.

    - #### setConceptList

          public void setConceptList(java.util.ArrayList<java.lang.String> thisConceptList)

      Set the descriptive concept list.
      Parameters:
        `thisConceptList` - the descriptive concept list.

    - #### getConceptList

          public java.util.ArrayList<java.lang.String> getConceptList()

      Get the descriptive concept list.
      Returns:
        the value of conceptList. If empty, then the fault type is returned.