Lizzy v1.1.1

christophedelory.playlist
Class Media

java.lang.Object
  extended by christophedelory.playlist.AbstractPlaylistComponent
      extended by christophedelory.playlist.Media

public class Media
extends AbstractPlaylistComponent

The definition of a media content.

Version:
$Revision: 92 $
Author:
Christophe Delory

Constructor Summary
Media()
           
 
Method Summary
 void acceptDown(PlaylistVisitor visitor)
          Accepts the specified playlist visitor.
 void acceptUp(PlaylistVisitor visitor)
          Accepts the specified playlist visitor.
 Long getDuration()
          Returns the play duration in milliseconds.
 Content getSource()
          Returns the media source.
 void setDuration(long millis)
          Initializes the play duration in milliseconds.
 void setDuration(Long millis)
          Initializes the play duration in milliseconds.
 void setSource(Content source)
          Initializes the media source.
 
Methods inherited from class christophedelory.playlist.AbstractPlaylistComponent
getParent, getRepeatCount, setParent, setRepeatCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Media

public Media()
Method Detail

getSource

public Content getSource()
Returns the media source.

Returns:
a media source. May be null if not yet initialized.
See Also:
setSource(christophedelory.content.Content)

setSource

public void setSource(Content source)
Initializes the media source.

Parameters:
source - a media source. Shall not be null.
Throws:
NullPointerException - if source is null.
See Also:
getSource()

getDuration

public Long getDuration()
Returns the play duration in milliseconds.
Not supported by all playlist formats.

Returns:
a duration value. May be null.
See Also:
setDuration(java.lang.Long)

setDuration

public void setDuration(Long millis)
Initializes the play duration in milliseconds. If specified, shall not be negative or null.

Parameters:
millis - a duration value. May be null.
Throws:
IllegalArgumentException - if the specified duration value is negative or null.
See Also:
getDuration(), setDuration(java.lang.Long)

setDuration

public void setDuration(long millis)
Initializes the play duration in milliseconds. Shall not be negative or null.

Parameters:
millis - a duration value.
Throws:
IllegalArgumentException - if the specified duration is negative or null.
See Also:
getDuration(), setDuration(java.lang.Long)

acceptDown

public void acceptDown(PlaylistVisitor visitor)
                throws Exception
Description copied from class: AbstractPlaylistComponent
Accepts the specified playlist visitor.

Specified by:
acceptDown in class AbstractPlaylistComponent
Parameters:
visitor - a visitor. Shall not be null.
Throws:
NullPointerException - if visitor is null.
Exception - if any error occurs during the visit.

acceptUp

public void acceptUp(PlaylistVisitor visitor)
              throws Exception
Description copied from class: AbstractPlaylistComponent
Accepts the specified playlist visitor.

Overrides:
acceptUp in class AbstractPlaylistComponent
Parameters:
visitor - a visitor. Shall not be null.
Throws:
NullPointerException - if visitor is null.
Exception - if any error occurs during the visit.

© 2008-2009 Christophe Delory

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