diff --git a/livesupport/doc/model/LocalStorage/Accessplaylist_SequenceDiagram.svg b/livesupport/doc/model/LocalStorage/Accessplaylist_SequenceDiagram.svg new file mode 100644 index 000000000..482bf1425 --- /dev/null +++ b/livesupport/doc/model/LocalStorage/Accessplaylist_SequenceDiagram.svg @@ -0,0 +1,249 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + audio player + + + + : + + + + Audio player + + + + + + + + + + + + + + system + + + + : + + + + Local storage + + + + + + + + + + + + + + : + + + releasePlaylist + + + ( + + + playlist + + + ) + + + + + + + + + + + : + + + playlist + + + := + + + accessPlaylist + + + ( + + + playlistId + + + ) + + + + + + + + + + + : + + + authenticated + + + := + + + authenticate + + + ( + + + authinfo + + + ) + + + + + + + diff --git a/livesupport/doc/model/LocalStorage/Concepts.svg b/livesupport/doc/model/LocalStorage/Concepts.svg index d21149446..3a02c7323 100644 --- a/livesupport/doc/model/LocalStorage/Concepts.svg +++ b/livesupport/doc/model/LocalStorage/Concepts.svg @@ -1,536 +1,633 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + - - << + + - - component + + << - - >> + + component - - Local storage + + >> - - - + + Local storage - - AudioClip + + - - - + + + AudioClip - - - + + - - id + + - - : + + - - - UniqueId + + id - - - + + : - - duration + + UniqueId - - : + + - - - Time + + duration - - - + + : - - - + + Time - - Authentication + + - - - + + - - - + + - - - + + + Authentication - - RawAudioData + + - - - + + - - - + + - - currentlyAccessing + + - - : + + - - int + + + RawAudioData - - - + + - - + + + - - isAccessed + + - - - ( + + currentlyAccessing - - ) + + : - - : + + int - - boolean + + - - - + + - - MetaData + + + - - - + + isAccessed - - - + + ( - - - + + ) - - UniqueId + + : - - - + + boolean - - - + + - - + + + MetaData - - + + - - + + - - Contains + + - - + + - - + + - - + + + - - Is described by + + Contains - - + + - - + + + - - + + Is described by - - Is identified by + + - - - + + + UniqueId - - SearchCriteria + + - - - + + - - - + + - - - + + - - Audio player + + - - - + + + - - - + + Is identified by - - - + + - - Storage maintainer + + + SearchCriteria - - - + + - - - + + - - + + - - + + - - + + - - Manages + + + Playlist - - + + - - + + - - + + - - Is authenticated by + + - - + + - - + + + - - + + is identified by - - Is authenticated by + + - - + + + Audio player - - + + - - + + - - Accesses + + - - + + - - + + - - + + + Storage maintainer - - Searches in + + - - + + - - + + - - + + - - Searches by + + + + + + + + + Is authenticated by + + + + + + + + + + Is authenticated by + + + + + + + + + + Manages + + + + + + + + + + Accesses + + + + + + + + + + Searches in + + + + + + + + + + Searches by + + + + + + + + + + Accesses + + + + + + + + + + Manages diff --git a/livesupport/doc/model/LocalStorage/Createplaylist_SequenceDiagram.svg b/livesupport/doc/model/LocalStorage/Createplaylist_SequenceDiagram.svg new file mode 100644 index 000000000..c1c231672 --- /dev/null +++ b/livesupport/doc/model/LocalStorage/Createplaylist_SequenceDiagram.svg @@ -0,0 +1,193 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + storage maintainer + + + + : + + + + Storage maintainer + + + + + + + + + + + + + + system + + + + : + + + + Local storage + + + + + + + + + + + + + + : + + + authenticated + + + := + + + authenticate + + + ( + + + authinfo + + + ) + + + + + + + + + + + : + + + createPlaylist + + + ( + + + playlistId + + + ) + + + + + + + diff --git a/livesupport/doc/model/LocalStorage/Deleteplaylist_SequenceDiagram.svg b/livesupport/doc/model/LocalStorage/Deleteplaylist_SequenceDiagram.svg new file mode 100644 index 000000000..ad5445b34 --- /dev/null +++ b/livesupport/doc/model/LocalStorage/Deleteplaylist_SequenceDiagram.svg @@ -0,0 +1,193 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + storage maintainer + + + + : + + + + Storage maintainer + + + + + + + + + + + + + + system + + + + : + + + + Local storage + + + + + + + + + + + + + + : + + + authenticated + + + := + + + authenticate + + + ( + + + authinfo + + + ) + + + + + + + + + + + : + + + deletePlaylist + + + ( + + + playlistId + + + ) + + + + + + + diff --git a/livesupport/doc/model/LocalStorage/Editplaylist_SequenceDiagram.svg b/livesupport/doc/model/LocalStorage/Editplaylist_SequenceDiagram.svg new file mode 100644 index 000000000..cf3fa116c --- /dev/null +++ b/livesupport/doc/model/LocalStorage/Editplaylist_SequenceDiagram.svg @@ -0,0 +1,249 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + storage maintainer + + + + : + + + + Storage maintainer + + + + + + + + + + + + + + system + + + + : + + + + Local storage + + + + + + + + + + + + + + : + + + authenticated + + + := + + + authenticate + + + ( + + + authinfo + + + ) + + + + + + + + + + + : + + + playlist + + + := + + + editPlaylist + + + ( + + + playlistId + + + ) + + + + + + + + + + + : + + + savePlaylist + + + ( + + + playlist + + + ) + + + + + + + diff --git a/livesupport/doc/model/LocalStorage/EssentialUseCases.svg b/livesupport/doc/model/LocalStorage/EssentialUseCases.svg index d7b96602b..fe182a4ed 100644 --- a/livesupport/doc/model/LocalStorage/EssentialUseCases.svg +++ b/livesupport/doc/model/LocalStorage/EssentialUseCases.svg @@ -1,142 +1,210 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - Local storage + + Local storage - - - - - + + - - UC-1 Store or update - Audio clip + + - - - + + - - UC-2 Delete Audio clip + + + UC-1 Store or update + Audio clip - - - + + - - UC-3 Update Audio clip - metadata + + + UC-2 Delete Audio clip - - - + + - - UC-4 Access raw audio data + + + UC-3 Update Audio clip + metadata - - - + + - - UC-5 Search in metadata + + + UC-4 Access raw audio data - - - + + - - Storage maintainer + + + UC-5 Search in metadata - - - + + - - Audio player + + + UC-6 Create playlist - - + + - - + + + UC-7 Edit playlist - - + + - - + + + UC-8 Delete playlist - - + + + + + + UC-9 Access playlist + + + + + + + Storage maintainer + + + + + + + Audio player + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/livesupport/doc/model/LocalStorage/Systembehaviour.svg b/livesupport/doc/model/LocalStorage/Systembehaviour.svg index 6254fefa9..42a5ea681 100644 --- a/livesupport/doc/model/LocalStorage/Systembehaviour.svg +++ b/livesupport/doc/model/LocalStorage/Systembehaviour.svg @@ -1,553 +1,911 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - Local storage + + Local storage - - - + + - - - + + - - + + + - - authenticate + + - - ( + + + - - authenticationInfo + + authenticate - - : + + ( - - AuthenticationInfo + + authenticationInfo - - ) + + : - - : + + AuthenticationInfo - - boolean + + ) - - + + + : - - existsAudioClip + + boolean - - ( + + + - - audioClipId + + existsAudioClip - - : + + ( - - UniqueId + + audioClipId - - ) + + : - - : + + UniqueId - - boolean + + ) - - + + + : - - storeAudioClip + + boolean - - ( + + + - - audioClip + + storeAudioClip - - : + + ( - - AudioClip + + audioClip - - ) + + : - - : + + AudioClip - - UniqueId + + ) - - + + + : - - deleteAudioClip + + UniqueId - - ( + + + - - audioClipId + + deleteAudioClip - - : + + ( - - UniqueId + + audioClipId - - ) + + : - - : + + UniqueId - - void + + ) - - + + + : - - updateAudioClipMetadata + + void - - ( + + + - - audioClipId + + updateAudioClipMetadata - - : + + ( - - UniqueId + + audioClipId - - , + + : - - newMetadata + + UniqueId - - : + + , - - MetaData + + newMetadata - - ) + + : - - : + + MetaData - - void + + ) - - + + + : - - accessRawAudioData + + void - - ( + + + - - audioClipId + + accessRawAudioData - - : + + ( - - UniqueId + + audioClipId - - ) + + : - - : + + UniqueId - - RawAudioData + + ) - - + + + : - - releaseRawAudioData + + RawAudioData - - ( + + + - - rawAudioData + + releaseRawAudioData - - : + + ( - - RawAudioData + + rawAudioData - - ) + + : - - : + + RawAudioData - - void + + ) - - + + + : - - searchMetadata + + void - - ( + + + - - criteria + + searchMetadata - - : + + ( - - SearchCriteria + + criteria - - ) + + : - - : + + SearchCriteria - - UniqueId + + ) - - + + + : - - getAudioClip + + UniqueId - - ( + + + - - audioClipId + + getAudioClip - - : + + ( - - UniqueId + + audioClipId - - ) + + : - - : + + UniqueId - - AudioClip + + ) + + + : + + + AudioClip + + + + + + + createPlaylist + + + ( + + + playlistId + + + : + + + UniqueId + + + ) + + + : + + + + + + + existsPlaylist + + + ( + + + playlistId + + + : + + + UniqueId + + + ) + + + : + + + boolean + + + + + + + editPlaylist + + + ( + + + playlistId + + + : + + + UniqueId + + + ) + + + : + + + Playlist + + + + + + + savePlaylist + + + ( + + + playlist + + + : + + + Playlist + + + ) + + + : + + + + + + + deletePlaylist + + + ( + + + playlistId + + + : + + + UniqueId + + + ) + + + : + + + + + + + accessPlaylist + + + ( + + + playlistId + + + : + + + UniqueId + + + ) + + + : + + + Playlist + + + + + + + releasePlaylist + + + ( + + + playlist + + + : + + + Playlist + + + ) + + + : diff --git a/livesupport/doc/model/LocalStorage/index.html b/livesupport/doc/model/LocalStorage/index.html index 8c7f9e79d..076e0c099 100644 --- a/livesupport/doc/model/LocalStorage/index.html +++ b/livesupport/doc/model/LocalStorage/index.html @@ -13,8 +13,8 @@ project, Copyright © 2004 Media Development Loan Fund, under the GNU GPL.

Scope

@@ -35,6 +35,9 @@ The goal of the local storage system is to store Audio Clips locally. Audio Clips contain audio data bundled with metadata describing it. Storing locally means that the binary audio data is available not just as a stream, but also as random seekable file.
+The local storage contains Playlists also. These are metadata +files containing a list of Audio Clip IDs with extra (fade in / fade out) +information.

System functions

The main system functions are described below. There are three categories for these functions:
@@ -119,6 +122,38 @@ that it is performed
evident
+ + F2.1
+ + Create new playlists
+ + evident
+ + + + F2.2
+ + Access playlists for editing
+ + evident
+ + + + F2.3
+ + Delete playlists
+ + evident
+ + + + F2.4
+ + Access playlists for execution
+ + evident
+ +
@@ -267,7 +302,7 @@ This section lists generic (essential) uses cases, that do not contain architecture-specific considerations.

+ data="EssentialUseCases.svg" width="600" height="780">

UC-1 Store or update Audio clip

@@ -933,9 +968,567 @@ refined criteria, and presents the results to the Storage maintainer
  • action 3: if the Storage maintainer can not be authenticated, he is notified, and the use case ends.
  • -

    -


    + +

    UC-6 Create playlist
    +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ref# UC-6
    use case Create playlist
    +
    type primary, essential
    actors Storage maintainer
    purpose To store a new Playlist in the local storage
    +
    overview The Storage maintainer contacts the Local +storage with the aim of uploading a new Playlist. The Local +storage stores the new metafile under the new ID.
    +
    references F2.1
    +
    +

    Typical course of events

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    actor action
    +
    system response
    +
    1. Storage maintainer connects to the Local storage +with the intention of uploading a new Playlist
    +

    +

    +
    2. The Storage maintainer provides authentication +information 3. The system authenticates the Storage maintainer +and grants access.
    +
    4.
    +
    The Storage maintainer presents the new Playlist +ID and the new Playlist metafile
    +
    5.
    +
    The system verifies that there is no Playlist yet +in the Local storage with the given ID
    +

    +

    +
    6.
    +
    The system stores the received Playlist metafile +and notifies the Storage maintainer of the action taken.
    +
    7.
    +
    The Storage maintainer disconnects
    +

    +

    +

    +

    +

    +

    +
    +
    +

    Alternate courses

    + +
    + +

    UC-7 Edit playlist
    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ref# UC-7
    use case Edit playlist
    +
    type primary, essential
    actors Storage maintainer
    purpose To modify an existing Playlist in the local +storage
    +
    overview The Storage maintainer contacts the Local +storage with the aim of editing an existing Playlist. The Local +storage retrieves the Playlist and marks it as being edited. The Storage +maintainer modifies the Playlist. The Storage maintainer saves the +modified Playlist, the Local storage stores it in place of the old +Playlist and marks it as no longer being edited.
    +
    references F2.2
    +
    +

    Typical course of events

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    actor action
    +
    system response
    +
    1. Storage maintainer connects to the Local storage +with the intention of editing a Playlist
    +

    +

    +
    2. The Storage maintainer provides authentication +information 3. The system authenticates the Storage maintainer +and grants access
    +
    4.
    +
    The Storage maintainer presents a Playlist ID
    +
    5.
    +
    The system verifies that there is a Playlist +in the Local storage with the given ID, and it is not currently +being edited
    +

    +

    +
    6.
    +
    The system marks the Playlist with the given ID +as being edited
    +

    +

    +
    7.
    +
    The system returns the Playlist metafile with +the given ID and notifies the Storage maintainer of the actions taken
    +
    8.
    +
    The Storage maintainer modifies the Playlist
    +

    +

    +
    9.
    +
    The Storage maintainer presents the new Playlist +metafile for saving
    +
    10.
    +
    The system verifies that the user had opened this +Playlist earlier
    +

    +

    +
    11.
    +
    The system stores the new Playlist metafile in +place of the old one, marks it as no longer being edited, +and notifies the Storage maintainer of the actions taken
    +
    12.
    +
    The Storage maintainer disconnects.
    +

    +

    +

    +

    +

    +

    +
    +
    +

    Alternate courses

    + +
    + +

    UC-8 Delete playlist
    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ref# UC-8
    use case Delete playlist
    +
    type primary, essential
    actors Storage maintainer
    purpose To delete a Playlist from the local storage
    +
    overview The Storage maintainer contacts the Local +storage with the aim of deleting a Playlist. The system deletes the +Playlist with the given ID from the Local storage.
    +
    references F2.3
    +
    +

    Typical course of events

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    actor action
    +
    system response
    +
    1. Storage maintainer connects to the Local storage +with the intention of deleting a Playlist
    +

    +

    +
    2. The Storage maintainer provides authentication +information 3. The system authenticates the Storage maintainer +and grants access
    +
    4.
    +
    The Storage maintainer presents the ID of the +Playlist to be deleted
    +
    5.
    +
    The system verifies that there is a Playlist +in the Local storage with the given ID, and it is not currently being +edited
    +

    +

    +
    6.
    +
    The system deletes the given Playlist from +the Local storage +and notifies the Storage maintainer of the action taken
    +
    7.
    +
    The Storage maintainer disconnects.
    +

    +

    +

    +

    +

    +

    +
    +
    +

    Alternate courses

    + +
    + +

    UC-9 Access playlist
    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ref# UC-9
    use case Access playlist
    +
    type primary, essential
    actors Audio player
    purpose To access a Playlist metafile in order to +execute (play) it
    +
    overview The Audio player contacts the Local +storage with the aim of accessing a Playlist. The Local storage +returns the requested Playlist metafile.
    +
    references F2.4
    +
    +

    Typical course of events

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    actor action
    +
    system response
    +
    1. Audio player connects to the Local storage +with the intention of accessing a Playlist
    +

    +

    +
    2. The Audio player provides authentication +information 3. The system authenticates the Audio player +and grants access
    +
    4.
    +
    The Audio player presents a Playlist ID
    +
    5.
    +
    The system verifies that there is a Playlist +in the Local storage with the given ID
    +

    +

    +
    6.
    +
    The system returns the requested Playlist metafile +and notifies the Audio player of the action taken
    +
    7.
    +
    The Audio player reads the Playlist, and saves +a private copy
    +

    +

    +
    8.
    +
    The Audio player notifies the Local storage that +it no longer needs the Playlist, and disconnects.
    +

    +

    +

    +

    +

    +

    +
    +
    +

    Alternate courses

    + +
    +

    Conceptual model

    The following figure displays the semantic concepts identified for the Scheduler daemon, and the main associations between the concepts.
    @@ -1008,6 +1601,13 @@ Local storage
    in the Local storage
    + + Playlist
    + + A metafile containing AudioClip IDs and some +extra (fade in / fade out) information
    + +
    @@ -1123,6 +1723,27 @@ AudioClips
    This is a seekable access to raw audio data.
    + + Playlist
    + + Is identified by
    + + UniqueId
    + + This is a globally unique id for each Playlist
    + + + + Storage maintainer
    + + Manages
    + + Playlist
    + + This includes creating, editing, deleting and +accessing Playlists
    + +
    @@ -1162,11 +1783,28 @@ System diagrams are presented for each use case below.

    UC-5 Search in metadata

    +
    +

    UC-6 Create playlist

    + +
    +

    UC-7 Edit playlist

    + +
    +

    UC-8 Delete playlist

    + +
    +

    UC-9 Access playlist

    + +

    System objects

    The following figure shows the system objects and their functions, as derived from the system sequence diagrams.
    + data="Systembehaviour.svg" width="450" height="320">

    Contracts

    For all operations exposed in the system sequence diagrams, the following contracts are defined.
    @@ -1903,6 +2541,763 @@ specified by the supplied id.

    +

    Contract for Local storage : createPlaylist
    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Name
    +
    createPlaylist
    +(playlistId : UniqueId)
    +: void
    +
    Responsibilities
    +
    Create a new Playlist +metafile.
    +
    Type
    +
    system
    +
    Cross-reference
    +
    UC-6
    +
    Notes
    +
    none
    +
    Exceptions
    +
    if a Playlist with the +given playlistId already exists, report as an error
    +
    Output
    +
    none
    +
    Pre-conditions
    +
    none
    Post-conditions
    +
    condition
    +
    type
    +
    a Playlist object is createdinstance creation
    +

    +
    the new Playlist is marked as currently +not being edited
    +
    attribute modification
    +

    +

    +

    +
    +
    +

    Contract for Local storage : editPlaylist
    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Name
    +
    editPlaylist
    +(playlistId : UniqueId)
    +: Playlist
    +
    Responsibilities
    +
    Open a Playlist metafile +for editing.
    +
    Type
    +
    system
    +
    Cross-reference
    +
    UC-7
    +
    Notes
    +
    none
    +
    Exceptions
    +
    if no Playlist with the +given playlistId exists, or if the Playlist has already been marked as +being edited, report as an error
    +
    Output
    +
    a URL of a Playlist +metafile, and a token identifying it
    +
    Pre-conditions
    +
    none
    Post-conditions
    +
    condition
    +
    type
    +

    +
    the Playlist is marked as currently +being edited
    +
    attribute modification
    +

    the Playlist metafile and the URL returned are +associated with the token returned
    +
    association formed
    +

    +

    +

    +
    +
    +

    Contract for Local storage : savePlaylist
    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Name
    +
    savePlaylist
    +(playlist : Playlist)
    +: void
    +
    Responsibilities
    +
    Store a new Playlist +metafile in place of the old one.
    +
    Type
    +
    system
    +
    Cross-reference
    +
    UC-7
    +
    Notes
    +
    'playlist' is two arguments, +really: the URL of a (new) Playlist metafile, +and the token returned previously by editPlaylist()
    +
    Exceptions
    +
    if the playlist token argument +does not match a token generated earlier in this session by editPlaylist(), +report as an error
    +
    Output
    +
    none
    +
    Pre-conditions
    +
    the Playlist has been marked +as being edited in the same session
    Post-conditions
    +
    condition
    +
    type
    +

    +
    the Playlist is marked as currently +not being edited
    +
    attribute modification
    +
    the token and the URL returned earlier by +editPlaylist() together with it are no longer validassociation broken
    +

    +

    +

    +
    +
    +

    Contract for Local storage : deletePlaylist
    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Name
    +
    deletePlaylist
    +(playlistId : UniqueId)
    +: void
    +
    Responsibilities
    +
    Delete a Playlist +metafile.
    +
    Type
    +
    system
    +
    Cross-reference
    +
    UC-8
    +
    Notes
    +
    none
    +
    Exceptions
    +
    if no Playlist with the +given playlistId exists, or if the Playlist is marked as currently +being edited, report as an error
    +
    Output
    +
    none
    +
    Pre-conditions
    +
    none
    Post-conditions
    +
    condition
    +
    type
    +
    a Playlist object is deletedinstance deletion
    +

    +

    +

    +
    +
    +

    Contract for Local storage : accessPlaylist
    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Name
    +
    accessPlaylist
    +(playlistId : UniqueId)
    +: Playlist
    +
    Responsibilities
    +
    Access (read) a Playlist +metafile.
    +
    Type
    +
    system
    +
    Cross-reference
    +
    UC-9
    +
    Notes
    +
    for this method, it does +not matter whether the Playlist is being edited or not -- the latest +saved state of the Playlist should be returned
    +
    Exceptions
    +
    if no Playlist with the +given playlistId exists, report as an error
    +
    Output
    +
    a URL of a Playlist +metafile, and a token identifying it
    +
    Pre-conditions
    +
    none
    Post-conditions
    +
    condition
    +
    type
    +

    +
    the Playlist and the URL returned are +associated with the token returned
    +
    association formed
    +

    +

    +

    +
    +
    +

    Contract for Local storage : releasePlaylist
    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Name
    +
    releasePlaylist
    +(playlist : Playlist)
    +: void
    +
    Responsibilities
    +
    Release the resources +obtained earlier by accessPlaylist().
    +
    Type
    +
    system
    +
    Cross-reference
    +
    UC-9
    +
    Notes
    +
    here 'playlist' is just one +argument (sorry!), a token returned previously by accessPlaylist()
    +
    Exceptions
    +
    if the playlist token argument +does not match a token generated earlier in this session by accessPlaylist(), +report as an error
    +
    Output
    +
    none
    +
    Pre-conditions
    +
    none
    Post-conditions
    +
    condition
    +
    type
    +
    the token and the URL returned earlier by +accessPlaylist() together with it are no longer validassociation broken
    +

    +

    +

    +
    +
    +

    Contract for Local storage : existsPlaylist
    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Name
    +
    existsPlaylist
    +(playlistId : UniqueId)
    +: bool
    +
    Responsibilities
    +
    Check whether a Playlist +metafile with the given playlist ID exists.
    +
    Type
    +
    system
    +
    Cross-reference
    +
    UC-6, UC-7, UC-8, UC-9
    +
    Notes
    +
    none
    +
    Exceptions
    +
    none
    +
    Output
    +
    true or false
    +
    Pre-conditions
    +
    none
    Post-conditions
    +
    none

    +

    +

    +
    +
    +

    Contract for Local storage : accessAudioClip
    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Name
    +
    accessAudioClip
    +(audioClipId : UniqueId)
    +: AudioClip
    +
    Responsibilities
    +
    Access (read) an Audio +Clip metafile.
    +
    Type
    +
    system
    +
    Cross-reference
    +
    UC-4
    +
    Notes
    +
    none
    +
    Exceptions
    +
    if no AudioClip with the +given audioClipId exists, report as an error
    +
    Output
    +
    a URL of an AudioClip +metafile, and a token identifying it
    +
    Pre-conditions
    +
    none
    Post-conditions
    +
    condition
    +
    type
    +

    +
    the AudioClip and the URL returned are +associated with the token returned
    +
    association formed
    +

    +

    +

    +
    +
    +

    Contract for Local storage : releaseAudioClip
    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Name
    +
    releaseAudioClip
    +(audioClip : AudioClip)
    +: void
    +
    Responsibilities
    +
    Release the resources +obtained earlier by accessAudioClip().
    +
    Type
    +
    system
    +
    Cross-reference
    +
    UC-4
    +
    Notes
    +
    here 'audioClip' is just one +argument (sorry!), a token returned previously by accessAudioClip()
    +
    Exceptions
    +
    if the playlist token argument +does not match a token generated earlier in this session by accessAudioClip(), +report as an error
    +
    Output
    +
    none
    +
    Pre-conditions
    +
    none
    Post-conditions
    +
    condition
    +
    type
    +
    the token and the URL returned earlier by +accessAudioClip() together with it are no longer validassociation broken
    +

    +

    +

    +
    +