Class LDNMessageEntity

java.lang.Object
org.dspace.app.ldn.LDNMessageEntity
All Implemented Interfaces:
ReloadableEntity<String>

@Entity public class LDNMessageEntity extends Object implements ReloadableEntity<String>
Class representing ldnMessages stored in the DSpace system and, when locally resolvable, some information are stored as dedicated attributes.
Author:
Mohamed Eskander (mohamed.eskander at 4science.com)
  • Field Details

    • TYPE_INCOMING

      public static final String TYPE_INCOMING
      LDN messages interact with a fictitious queue. Scheduled tasks manage the queue.
      See Also:
    • TYPE_OUTGOING

      public static final String TYPE_OUTGOING
      See Also:
    • QUEUE_STATUS_UNTRUSTED_IP

      public static final Integer QUEUE_STATUS_UNTRUSTED_IP
      Message must not be processed.
    • QUEUE_STATUS_QUEUED

      public static final Integer QUEUE_STATUS_QUEUED
      Message queued, it has to be elaborated.
    • QUEUE_STATUS_PROCESSING

      public static final Integer QUEUE_STATUS_PROCESSING
      Message has been taken from the queue and it's elaboration is in progress.
    • QUEUE_STATUS_PROCESSED

      public static final Integer QUEUE_STATUS_PROCESSED
      Message has been correctly elaborated.
    • QUEUE_STATUS_FAILED

      public static final Integer QUEUE_STATUS_FAILED
      Message has not been correctly elaborated - despite more than "ldn.processor.max.attempts" retryies
    • QUEUE_STATUS_UNTRUSTED

      public static final Integer QUEUE_STATUS_UNTRUSTED
      Message must not be processed
    • QUEUE_STATUS_UNMAPPED_ACTION

      public static final Integer QUEUE_STATUS_UNMAPPED_ACTION
      Message is not processed since action is not mapped
    • QUEUE_STATUS_QUEUED_FOR_RETRY

      public static final Integer QUEUE_STATUS_QUEUED_FOR_RETRY
      Message queued for retry, it has to be elaborated.
  • Constructor Details

    • LDNMessageEntity

      protected LDNMessageEntity()
    • LDNMessageEntity

      public LDNMessageEntity(String id)
  • Method Details

    • getID

      public String getID()
      Description copied from interface: ReloadableEntity
      The unique identifier of this entity instance.
      Specified by:
      getID in interface ReloadableEntity<String>
      Returns:
      the value of the primary key for this instance.
    • setId

      public void setId(String id)
    • getObject

      public DSpaceObject getObject()
      Returns:
      the DSpace item related to this message
    • setObject

      public void setObject(DSpaceObject object)
    • getMessage

      public String getMessage()
    • setMessage

      public void setMessage(String message)
    • getType

      public String getType()
    • setType

      public void setType(String type)
    • getActivityStreamType

      public String getActivityStreamType()
    • setActivityStreamType

      public void setActivityStreamType(String activityStreamType)
    • getCoarNotifyType

      public String getCoarNotifyType()
    • setCoarNotifyType

      public void setCoarNotifyType(String coarNotifyType)
    • getOrigin

      public NotifyServiceEntity getOrigin()
      Returns:
      The originator of the activity, typically the service responsible for sending the notification
    • setOrigin

      public void setOrigin(NotifyServiceEntity origin)
    • getTarget

      public NotifyServiceEntity getTarget()
      Returns:
      The intended destination of the activity, typically the service which consumes the notification
    • setTarget

      public void setTarget(NotifyServiceEntity target)
    • getInReplyTo

      public LDNMessageEntity getInReplyTo()
      Returns:
      This property is used when the notification is a direct response to a previous notification; contains an id
    • setInReplyTo

      public void setInReplyTo(LDNMessageEntity inReplyTo)
    • getContext

      public DSpaceObject getContext()
      Returns:
      This identifies another resource which is relevant to understanding the notification
    • setContext

      public void setContext(DSpaceObject context)
    • getQueueStatus

      public Integer getQueueStatus()
    • setQueueStatus

      public void setQueueStatus(Integer queueStatus)
    • getQueueAttempts

      public Integer getQueueAttempts()
    • setQueueAttempts

      public void setQueueAttempts(Integer queueAttempts)
    • getQueueLastStartTime

      public Instant getQueueLastStartTime()
    • setQueueLastStartTime

      public void setQueueLastStartTime(Instant queueLastStartTime)
    • getQueueTimeout

      public Instant getQueueTimeout()
    • setQueueTimeout

      public void setQueueTimeout(Instant queueTimeout)
    • getSourceIp

      public String getSourceIp()
    • setSourceIp

      public void setSourceIp(String sourceIp)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getNotificationType

      public static String getNotificationType(LDNMessageEntity ldnMessage)
    • getServiceNameForNotifyServ

      public static String getServiceNameForNotifyServ(NotifyServiceEntity serviceEntity)
    • getQueueStatus

      public static String getQueueStatus(LDNMessageEntity ldnMessage)