Lizzy v1.1.1

christophedelory.playlist.rmp
Class Package

java.lang.Object
  extended by christophedelory.playlist.rmp.Package
All Implemented Interfaces:
SpecificPlaylist

public class Package
extends Object
implements SpecificPlaylist

A Real Metadata Package.

Since:
0.3.0
Version:
$Revision: 92 $
Author:
Christophe Delory

Constructor Summary
Package()
          Builds a new and empty Real Metadata Package.
 
Method Summary
 String getAction()
          Returns the package action.
 Date getExpirationDate()
          Returns the package expiration date.
 String getExpirationDateString()
          Returns the package expiration date.
 Provider getPackageProvider()
          Returns the package provider.
 SpecificPlaylistProvider getProvider()
          Returns the provider of this specific playlist.
 Server getServer()
          Returns the package server.
 String getSignature()
          Returns the package signature.
 String getTarget()
          Returns the package target.
 String getTitle()
          Returns the package title.
 Tracklist getTracklist()
          Returns the track list.
 void setAction(String action)
          Initializes the package action.
 void setExpirationDate(Date expirationDate)
          Initializes the package expiration date.
 void setExpirationDateString(String expirationDate)
          Initializes the package expiration date.
 void setPackageProvider(Provider provider)
          Initializes the package provider.
 void setProvider(SpecificPlaylistProvider provider)
          Initializes the provider of this specific playlist.
 void setServer(Server server)
          Initializes the package server.
 void setSignature(String signature)
          Initializes the package signature.
 void setTarget(String target)
          Initializes the package target.
 void setTitle(String title)
          Initializes the package title.
 void setTracklist(Tracklist trackList)
          Initializes the track list.
 Playlist toPlaylist()
          Builds a generic representation from this specific playlist.
 void writeTo(OutputStream out, String encoding)
          Writes this specific playlist to the specified output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Package

public Package()
Builds a new and empty Real Metadata Package.

Method Detail

setProvider

public void setProvider(SpecificPlaylistProvider provider)
Description copied from interface: SpecificPlaylist
Initializes the provider of this specific playlist.

Specified by:
setProvider in interface SpecificPlaylist
Parameters:
provider - the provider of this playlist. Shall not be null.
See Also:
SpecificPlaylist.getProvider()

getProvider

public SpecificPlaylistProvider getProvider()
Description copied from interface: SpecificPlaylist
Returns the provider of this specific playlist.

Specified by:
getProvider in interface SpecificPlaylist
Returns:
the provider of this playlist. May be null.
See Also:
SpecificPlaylist.setProvider(christophedelory.playlist.SpecificPlaylistProvider)

writeTo

public void writeTo(OutputStream out,
                    String encoding)
             throws Exception
Description copied from interface: SpecificPlaylist
Writes this specific playlist to the specified output stream. When done, the stream may be flushed, but not closed.

Specified by:
writeTo in interface SpecificPlaylist
Parameters:
out - an output stream. Shall not be null.
encoding - the content encoding of the output resource, or null if not known.
Throws:
NullPointerException - if out is null.
Exception - if any error occurs during the marshalling process.
See Also:
SpecificPlaylistFactory.readFrom(java.net.URL), SpecificPlaylistProvider.readFrom(java.io.InputStream, java.lang.String, org.apache.commons.logging.Log)

toPlaylist

public Playlist toPlaylist()
Description copied from interface: SpecificPlaylist
Builds a generic representation from this specific playlist.

Specified by:
toPlaylist in interface SpecificPlaylist
Returns:
a generic playlist. Shall not be null.
See Also:
SpecificPlaylistProvider.toSpecificPlaylist(christophedelory.playlist.Playlist)

getTitle

public String getTitle()
Returns the package title.

Returns:
a title. May be null.
See Also:
setTitle(java.lang.String)

setTitle

public void setTitle(String title)
Initializes the package title.

Parameters:
title - a title. May be null.
See Also:
getTitle()

getAction

public String getAction()
Returns the package action.

Returns:
an action. May be null.
See Also:
setAction(java.lang.String)

setAction

public void setAction(String action)
Initializes the package action.

Parameters:
action - an action. May be null.
See Also:
getAction()

getTarget

public String getTarget()
Returns the package target.

Returns:
a target. May be null.
See Also:
setTarget(java.lang.String)

setTarget

public void setTarget(String target)
Initializes the package target.

Parameters:
target - a target. May be null.
See Also:
getTarget()

getExpirationDateString

public String getExpirationDateString()
Returns the package expiration date.

Returns:
a date. May be null.
See Also:
setExpirationDateString(java.lang.String), getExpirationDate()

setExpirationDateString

public void setExpirationDateString(String expirationDate)
                             throws ParseException
Initializes the package expiration date.

Parameters:
expirationDate - a date. Shall not be null.
Throws:
NullPointerException - if expirationDate is null.
ParseException - if the beginning of the specified string cannot be parsed.
See Also:
getExpirationDateString(), setExpirationDate(java.util.Date)

getExpirationDate

public Date getExpirationDate()
Returns the package expiration date.

Returns:
a date. May be null.
See Also:
setExpirationDate(java.util.Date), getExpirationDateString()

setExpirationDate

public void setExpirationDate(Date expirationDate)
Initializes the package expiration date.

Parameters:
expirationDate - a date. May be null.
See Also:
getExpirationDate(), setExpirationDateString(java.lang.String)

getPackageProvider

public Provider getPackageProvider()
Returns the package provider.

Returns:
a package provider. May be null.
See Also:
setPackageProvider(christophedelory.playlist.rmp.Provider)

setPackageProvider

public void setPackageProvider(Provider provider)
Initializes the package provider.

Parameters:
provider - a provider. May be null.
See Also:
getPackageProvider()

getServer

public Server getServer()
Returns the package server.

Returns:
a package server. Shall not be null.
See Also:
setServer(christophedelory.playlist.rmp.Server)

setServer

public void setServer(Server server)
Initializes the package server.

Parameters:
server - a server. Shall not be null.
Throws:
NullPointerException - if server is null.
See Also:
getServer()

getTracklist

public Tracklist getTracklist()
Returns the track list.

Returns:
a track list. Shall not be null.
See Also:
setTracklist(christophedelory.playlist.rmp.Tracklist)

setTracklist

public void setTracklist(Tracklist trackList)
Initializes the track list.

Parameters:
trackList - a track list. Shall not be null.
Throws:
NullPointerException - if trackList is null.
See Also:
getTracklist()

getSignature

public String getSignature()
Returns the package signature.

Returns:
a signature. May be null.
See Also:
setSignature(java.lang.String)

setSignature

public void setSignature(String signature)
Initializes the package signature.

Parameters:
signature - a signature. May be null.
See Also:
getSignature()

© 2008-2009 Christophe Delory

Copyright © 2008-2009 Christophe Delory. All Rights Reserved.