Package org.silverpeas.components.gallery.model

## Class Sound

- java.lang.Object
- - org.silverpeas.components.gallery.model.Media
  - - org.silverpeas.components.gallery.model.InternalMedia
    - - org.silverpeas.components.gallery.model.Sound

- All Implemented Interfaces:
    `Serializable`, `org.silverpeas.core.contribution.contentcontainer.content.SilverContentInterface`, `org.silverpeas.core.contribution.model.Contribution`, `org.silverpeas.core.contribution.model.SilverpeasContent`, `org.silverpeas.core.contribution.model.WithPermanentLink`, `org.silverpeas.core.Identifiable`, `org.silverpeas.core.Instance<org.silverpeas.core.contribution.model.Contribution>`, `org.silverpeas.core.Nameable`, `org.silverpeas.core.security.Securable`, `org.silverpeas.core.SilverpeasResource`

      public class Sound
      extends InternalMedia

  This class represents a Sound.
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class org.silverpeas.components.gallery.model.Media

      `BASE_PATH`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `` | `Sound()` |
    `protected` | `Sound​(Sound other)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `long` | `getBitrate()` | Gets the number of bytes delivered per seconds.
    `Sound` | `getCopy()` | Creates a copy of the instance.
    `long` | `getDuration()` | Gets the duration in milliseconds.
    `static String` | `getResourceType()` | The type of this resource
    `MediaType` | `getType()` |
    `void` | `setBitrate​(long bitrate)` | Sets the number of bytes delivered per seconds.
    `void` | `setDuration​(long durationInMs)` | Sets the duration in milliseconds.

    - ### Methods inherited from class org.silverpeas.components.gallery.model.InternalMedia

      `addMetaData, getApplicationThumbnailUrl, getDownloadPeriod, getFile, getFileMimeType, getFileName, getFileSize, getMetaData, getMetaDataProperties, isDownloadable, isDownloadAuthorized, setDownloadAuthorized, setDownloadPeriod, setFileMimeType, setFileName, setFileSize`

    - ### Methods inherited from class org.silverpeas.components.gallery.model.Media

      `addToAlbums, canBeAccessedBy, equals, getApplicationEmbedUrl, getApplicationOriginalUrl, getAuthor, getContributionType, getCreationDate, getCreator, getCreatorId, getCreatorName, getDate, getDescription, getDescription, getFile, getHighestUserRole, getIconUrl, getId, getInstanceId, getInternalMedia, getKeyWord, getLanguages, getLastUpdateDate, getLastUpdatedBy, getLastUpdater, getLastUpdaterName, getMediaPK, getName, getName, getPermalink, getPhoto, getSilverCreationDate, getSilverpeasContentId, getSound, getStreaming, getTitle, getURL, getVideo, getVisibilityPeriod, getWorkspaceSubFolderName, hashCode, isPreviewable, isVisible, isVisible, removeFromAllAlbums, setAuthor, setComponentInstanceId, setCreationDate, setCreator, setCreatorId, setDescription, setIconUrl, setId, setKeyWord, setLastUpdateDate, setLastUpdatedBy, setLastUpdater, setMediaPK, setSilverpeasContentId, setTitle, setToAlbums, setVisibilityPeriod, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.silverpeas.core.contribution.model.Contribution

      `getModel, getResourcePath, isIndexable`

    - ### Methods inherited from interface org.silverpeas.core.Instance

      `getParent`

    - ### Methods inherited from interface org.silverpeas.core.security.Securable

      `canBeDeletedBy, canBeFiledInBy, canBeModifiedBy`

    - ### Methods inherited from interface org.silverpeas.core.contribution.contentcontainer.content.SilverContentInterface

      `getComponentInstanceId`

    - ### Methods inherited from interface org.silverpeas.core.contribution.model.SilverpeasContent

      `getIdentifier`

- - ### Constructor Detail

    - #### Sound

          public Sound()

    - #### Sound

          protected Sound​(Sound other)

  - ### Method Detail

    - #### getType

          public MediaType getType()

      Specified by:
        `getType` in class `Media`

    - #### getBitrate

          public long getBitrate()

      Gets the number of bytes delivered per seconds.
      Returns:
        number of byte delivered per seconds.

    - #### setBitrate

          public void setBitrate​(long bitrate)

      Sets the number of bytes delivered per seconds.
      Parameters:
        `bitrate` - the number of bytes delivered per seconds.

    - #### getDuration

          public long getDuration()

      Gets the duration in milliseconds.
      Returns:
        the duration in milliseconds.

    - #### setDuration

          public void setDuration​(long durationInMs)

      Sets the duration in milliseconds.
      Parameters:
        `durationInMs` - the duration in milliseconds.

    - #### getResourceType

          public static String getResourceType()

      The type of this resource
      Returns:
        the same value returned by getContributionType()

    - #### getCopy

          public Sound getCopy()

      Description copied from class: `Media`
      Creates a copy of the instance.
      Specified by:
        `getCopy` in class `Media`
      Returns:
        the new instance.