Class ObjectStatus

java.lang.Object
eu.europa.esig.dss.alert.status.MessageStatus
eu.europa.esig.dss.alert.status.ObjectStatus
All Implemented Interfaces:
Status
Direct Known Subclasses:
SignatureStatus, TokenStatus

public class ObjectStatus extends MessageStatus
Implementation of a Status interface, containing a list of concerned objects' identifiers and their corresponding errors
  • Constructor Details

    • ObjectStatus

      public ObjectStatus()
      Default constructor initializing an empty objects map
  • Method Details

    • addRelatedObjectIdentifierAndErrorMessage

      public void addRelatedObjectIdentifierAndErrorMessage(String objectId, String errorMessage)
      Adds concerned object identifier and information about the occurred event
      Parameters:
      objectId - String
      errorMessage - String message
    • getMessageForObjectWithId

      public String getMessageForObjectWithId(String objectId)
      Returns corresponding error message for the object with the given id
      Parameters:
      objectId - String id of the object to get caused error message for
      Returns:
      String error message
    • getRelatedObjectIds

      public Collection<String> getRelatedObjectIds()
      Description copied from interface: Status
      Returns a collection of object identifiers associated with the event
      Specified by:
      getRelatedObjectIds in interface Status
      Overrides:
      getRelatedObjectIds in class MessageStatus
      Returns:
      a collection of String object ids associated with the event
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: Status
      Returns whether the object is not filled (all values are null)
      Specified by:
      isEmpty in interface Status
      Overrides:
      isEmpty in class MessageStatus
      Returns:
      TRUE if the Status is empty (underlying even did not occur), FALSE otherwise (event occurred)
    • getErrorString

      public String getErrorString()
      Description copied from interface: Status
      This method returns a complete error message computed from the main message and subMessages from the different objects
      Specified by:
      getErrorString in interface Status
      Overrides:
      getErrorString in class MessageStatus
      Returns:
      String
    • objectMapToString

      protected String objectMapToString()
      Returns a string listing the occurred errors for each concerned object
      Returns:
      String