Class AttachmentImpl

java.lang.Object
org.opencastproject.mediapackage.AbstractMediaPackageElement
org.opencastproject.mediapackage.attachment.AttachmentImpl
All Implemented Interfaces:
Serializable, Cloneable, Comparable<MediaPackageElement>, Attachment, ManifestContributor, MediaPackageElement

public class AttachmentImpl extends AbstractMediaPackageElement implements Attachment
Basic implementation of an attachment.
See Also:
  • Field Details

    • properties

      protected Map<String,String> properties
      The object properties
  • Constructor Details

    • AttachmentImpl

      public AttachmentImpl()
      Needed by JAXB
    • AttachmentImpl

      protected AttachmentImpl(String identifier, MediaPackageElementFlavor flavor, URI uri, Long size, Checksum checksum, MimeType mimeType)
      Creates an attachment.
      Parameters:
      identifier - the attachment identifier
      flavor - the attachment type
      uri - the attachments location
      size - the attachments size
      checksum - the attachments checksum
      mimeType - the attachments mime type
    • AttachmentImpl

      protected AttachmentImpl(URI uri)
      Creates an attachment.
      Parameters:
      uri - the attachments location
  • Method Details

    • fromURI

      public static Attachment fromURI(URI uri)
      Creates a new attachment from the url.
      Parameters:
      uri - the attachment location
      Returns:
      the attachment
    • getProperties

      public Map<String,String> getProperties()
      Description copied from interface: Attachment
      Returns a map containing the properties for this media package element or an empty map if there are no properties.
      Specified by:
      getProperties in interface Attachment
      Returns:
      the properties