Interface Activity

  • All Superinterfaces:
    JsonAdaptable
    All Known Subinterfaces:
    MutableActivity

    @ProviderType
    public interface Activity
    extends JsonAdaptable
    Activity Note that property names and descriptions were reused from http://activitystrea.ms/specs/json/1.0/. Although that document specifies how activities are serialized in JSON the names and concepts can be reused. Additional properties and behaviors are added where the JSON abstraction is not suitable. All properties referring to IDs or URLs may return a path instead of an absolute IRI if the activity is still present in the repository. It is the tasks of the exporting servlet to make them absolute.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      ActivityObject getActor()
      Describes the entity that performed the activity.
      java.lang.String getActorUserId()
      Returns the user id of the actor of this activity or null if this object was not created by a user present in this system.
      java.lang.String getContent()
      Natural-language description of the activity encoded as a single String containing HTML markup.
      ActivityObject getGenerator()
      Describes the application that generated the activity.
      MediaLink getIcon()
      Description of a resource providing a visual representation of the object, intended for human consumption.
      java.lang.String getId()
      Provides a permanent, universally unique identifier for the activity in the form of an absolute IRI [RFC3987].
      MutableActivity getMutableActivity()
      Returns a copy of this activity that is mutable.
      ActivityObject getObject()
      Describes the primary object of the activity.
      java.lang.String getPath()
      Returns the path of this activity if stored in the repository.
      ValueMap getProperties()
      Returns a read-only value map of the raw properties underlying this activity.
      ActivityObject getProvider()
      Describes the application that published the activity.
      long getPublished()
      The date and time at which the activity was published.
      ActivityStream getStream()
      Returns the stream of this activity or null if not accessible or not applicable.
      ActivityObject getTarget()
      Describes the target of the activity.
      java.lang.String getTitle()
      Natural-language title or headline for the activity encoded as a single String containing HTML markup.
      long getUpdated()
      The date and time at which a previously published activity has been modified.
      java.lang.String getURL()
      An IRI [RFC3987] identifying a resource providing an HTML representation of the activity.
      java.lang.String getVerb()
      Identifies the action that the activity describes.
    • Method Detail

      • getId

        java.lang.String getId()
        Provides a permanent, universally unique identifier for the activity in the form of an absolute IRI [RFC3987]. An activity SHOULD contain a single id property. If an activity does not contain an id property, consumers MAY use the value of the url property as a less-reliable, non-unique identifier.
      • getURL

        java.lang.String getURL()
        An IRI [RFC3987] identifying a resource providing an HTML representation of the activity. An activity MAY contain a url property.
      • getPath

        java.lang.String getPath()
        Returns the path of this activity if stored in the repository.
        Returns:
        the path or null
      • getVerb

        java.lang.String getVerb()
        Identifies the action that the activity describes. An activity SHOULD contain a verb property whose value is a String that is non-empty and matches either the "isegment-nz-nc" or the "IRI" production in [RFC3339]. Note that the use of a relative reference other than a simple name is not allowed. If the verb is not specified, or if the value is null, the verb is assumed to be "post".
      • getTitle

        java.lang.String getTitle()
        Natural-language title or headline for the activity encoded as a single String containing HTML markup. An activity MAY contain a title property.
      • getActor

        ActivityObject getActor()
        Describes the entity that performed the activity. An activity MUST contain one actor property whose value is a single Object. Note that the author object might by dynamically generated based on the user id of the actual author, if present in the system.
      • getActorUserId

        java.lang.String getActorUserId()
        Returns the user id of the actor of this activity or null if this object was not created by a user present in this system.
      • getContent

        java.lang.String getContent()
        Natural-language description of the activity encoded as a single String containing HTML markup. Visual elements such as thumbnail images MAY be included. An activity MAY contain a content property.
      • getTarget

        ActivityObject getTarget()
        Describes the target of the activity. The precise meaning of the activity's target is dependent on the activities verb, but will often be the object the English preposition "to". For instance, in the activity, "John saved a movie to his wishlist", the target of the activity is "wishlist". The activity target MUST NOT be used to identity an indirect object that is not a target of the activity. An activity MAY contain a target property whose value is a single Object.
      • getObject

        ActivityObject getObject()
        Describes the primary object of the activity. For instance, in the activity, "John saved a movie to his wishlist", the object of the activity is "movie". An activity SHOULD contain an object property whose value is a single Object. If the object property is not contained, the primary object of the activity MAY be implied by context.
      • getPublished

        long getPublished()
        The date and time at which the activity was published. An activity MUST contain a published property.
      • getProvider

        ActivityObject getProvider()
        Describes the application that published the activity. Note that this is not necessarily the same entity that generated the activity. An activity MAY contain a provider property whose value is a single Object.
      • getGenerator

        ActivityObject getGenerator()
        Describes the application that generated the activity. An activity MAY contain a generator property whose value is a single Object.
      • getUpdated

        long getUpdated()
        The date and time at which a previously published activity has been modified. An Activity MAY contain an updated property.
      • getIcon

        MediaLink getIcon()
        Description of a resource providing a visual representation of the object, intended for human consumption. The image SHOULD have an aspect ratio of one (horizontal) to one (vertical) and SHOULD be suitable for presentation at a small size. An activity MAY have an icon property.
      • getProperties

        ValueMap getProperties()
        Returns a read-only value map of the raw properties underlying this activity.
      • getMutableActivity

        MutableActivity getMutableActivity()
        Returns a copy of this activity that is mutable. If this instance is already mutable this is returned.
        Returns:
        a mutable copy of this activity.
      • getStream

        ActivityStream getStream()
        Returns the stream of this activity or null if not accessible or not applicable.
        Returns:
        the stream or null.
        Since:
        0.0.10