Class ActivityEvent

All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>

public class ActivityEvent extends HashMap<String,Object>
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • setOperations

      public void setOperations(Map<String,String> operations)
      Sets the operations that this activity can perform.
      Parameters:
      operations - Map of operations where the key is the operation name and the value is a url to the operation
    • getProgress

      public int getProgress()
      Returns the progress of the activity.
      Returns:
      progress Integer value representation of the progress, ranging from 0 to 100, or -1 when progress is unknown or not applicable
    • setProgress

      public void setProgress(int progress)
      Sets the progress of the activity.
      Parameters:
      progress - Integer value representation of the progress, ranging from 0 to 100, or -1 when progress is unknown or not applicable
    • getActivityType

      public String getActivityType()
      Return the type of ActivityEvent that is going on.
      Returns:
      Type of the ActivityEvent, must follow the enumerated ActivityType values.
    • getActivityId

      public String getActivityId()
      Retrieves the ID of the current ActivityEvent.
      Returns:
      ID of the ActivityEvent.
    • setActivityId

      public void setActivityId(String id)
      Set the id of the activity being performed.
      Parameters:
      id - This id should be unique and used across the entire lifecycle of the ActivityEvent.
    • getSessionId

      public String getSessionId()
      Retrieves the session ID of the current ActivityEvent.
      Returns:
      session ID of the ActivityEvent.
    • setSessionId

      public void setSessionId(String sessionId)
      Set the session id of the activity being performed.
      Parameters:
      sessionId - This session id should be unique and used across the entire lifecycle of the ActivityEvent.
    • getMessage

      public String getMessage()
      Returns the message associated with the ActivityEvent
      Returns:
      The message associated with the ActivityEvent
    • setMessage

      public void setMessage(String message)
      Overwrites the message associated with the ActivityEvent
      Parameters:
      message - The new message associated with the ActivityEvent
    • getTitle

      public String getTitle()
      Returns the title associated with the ActivityEvent
      Returns:
      The title associated with the ActivityEvent
    • setTitle

      public void setTitle(String title)
      Overwrites the title associated with the ActivityEvent
      Parameters:
      title - The new title associated with the ActivityEvent
    • getCategory

      public String getCategory()
      Returns the category associated with the ActivityEvent
      Returns:
      The category associated with the ActivityEvent
    • setCategory

      public void setCategory(String category)
      Overwrites the category associated with the ActivityEvent
      Parameters:
      category - A human-readable category that describes the event that is occuring. Example: 'Product Retrieval'.
    • getTimestampString

      public String getTimestampString()
      Returns a String depicting the time at which the event that triggered this ActivityEvent occurred.
      Returns:
      A String representing the number of milliseconds between January 1, 1970, 00:00:00 GMT and the point at which the event that triggered this ActivityEvent occurred.
    • getTimestampLong

      public Long getTimestampLong()
      Returns a long depicting the time at which the event that triggered this ActivityEvent occurred.
      Returns:
      A long representing the number of milliseconds between January 1, 1970, 00:00:00 GMT and the point at which the event that triggered this ActivityEvent occurred.
    • getTimestamp

      public Date getTimestamp()
      Returns a Date depicting the time at which the event that triggered this ActivityEvent occurred.
      Returns:
      A Date the point at which the event that triggered this ActivityEvent occurred.
    • setTimestamp

      public void setTimestamp(Long timestamp)
      Overwrites the timestamp that depicts the time at which the event that triggered the ActivityEvent occurred.
      Parameters:
      timestamp - A long representing the number of milliseconds between January 1, 1970, 00:00:00 GMT and the point at which the event that triggered this ActivityEvent occurred.
    • setTimestamp

      public void setTimestamp(Date timestamp)
      Overwrites the timestamp that depicts the time at which the event that triggered the ActivityEvent occurred.
      Parameters:
      timestamp - A Date representing the point at which the event that triggered this ActivityEvent occurred.
    • getUserId

      public String getUserId()
      Returns the id of the user to whom this ActivityEvent is addressed.
      Returns:
      The id of the user to whom this ActivityEvent is addressed.
    • setUserId

      public void setUserId(String userId)
      Overwrites the id of the user to whom the ActivityEvent is addressed.
      Parameters:
      userId - The new userId to whom the ActivityEvent should be addressed.
    • getBytesRead

      public Long getBytesRead()
      Returns the bytes read associated with the ActivityEvent.
      Returns:
      The bytes read associated with the ActivityEvent.
    • setBytesRead

      public void setBytesRead(Long bytesRead)
      Overwrites the bytes read associated with the ActivityEvent.
      Parameters:
      bytesRead - The new bytes read associated with the ActivityEvent.