com.jwpepper.inv
Interface Audio

All Known Implementing Classes:
AudioImpl

public abstract interface Audio
extends Entity

This interface defines the Audio Object.
Last Modified $Date: 1999/10/05 22:03:40 $

Version:
$Revision: 1.3 $
Author:
Robert Schmid (robert@ancept.com)

Field Summary
static java.lang.String AUDIO
           
static java.lang.String LOCALE
           
static java.lang.String MIMETYPE
           
static java.lang.String PRODUCTS
           
static java.lang.String SIZE
           
 
Method Summary
 void addProduct(Identifier id, Product prd)
          This method adds a Product to a collection of Products that the Audio belongs to.
 void create(Identifier id, java.util.Locale loc, java.io.BufferedInputStream aBuf, long len, java.lang.String mime)
          This method creates a new Audio Object and sets its attributes.
 void create(Identifier id, java.util.Locale loc, java.io.File aFil, java.lang.String mime)
          This method creates a new Audio Object and sets its attributes.
 java.io.BufferedInputStream getAudio()
          This method returns the Audio String.
 java.util.Locale getLocale()
          This method returns the Locale Object.
 java.lang.String getMimeType()
          This method returns the MimeType of the Audio Stream.
 long getSize()
          This method returns the size of the Audio Stream.
 com.sun.java.util.collections.Iterator products()
          This method returns an iterator over the products collection.
 void removeProduct(Identifier id, Product prd)
          This method removes a Product from a collection of Products that the Audio belongs to.
 
Methods inherited from interface com.imaginary.lwp.Entity
getLastUpdateID, getLastUpdateTime, getObjectID, getReference, remove
 

Field Detail

LOCALE

public static final java.lang.String LOCALE

AUDIO

public static final java.lang.String AUDIO

MIMETYPE

public static final java.lang.String MIMETYPE

PRODUCTS

public static final java.lang.String PRODUCTS

SIZE

public static final java.lang.String SIZE
Method Detail

addProduct

public void addProduct(Identifier id,
                       Product prd)
                throws PersistenceException,
                       java.rmi.RemoteException
This method adds a Product to a collection of Products that the Audio belongs to.
Parameters:
id - An identifer object for the Audio
prd - A Product object to add to the collection
Throws:
PersistenceException - If an error occurs in the Lightweight Persistence Engine
java.rmi.RemoteException - If an error occurs in the Remote Method Interface

create

public void create(Identifier id,
                   java.util.Locale loc,
                   java.io.File aFil,
                   java.lang.String mime)
            throws CreateException,
                   java.io.FileNotFoundException,
                   java.rmi.RemoteException,
                   PersistenceException
This method creates a new Audio Object and sets its attributes.
Parameters:
id - An identifer object for the Audio
loc - Country/Language Information
aFil - A Sound File
mime - The mimetype of the Audio
Throws:
PersistenceException - If an error occurs in the Lightweight Persistence Engine
java.rmi.RemoteException - If an error occurs in the Remote Method Interface
CreateException - If an error occurs in the create method

create

public void create(Identifier id,
                   java.util.Locale loc,
                   java.io.BufferedInputStream aBuf,
                   long len,
                   java.lang.String mime)
            throws CreateException,
                   java.rmi.RemoteException,
                   PersistenceException
This method creates a new Audio Object and sets its attributes.
Parameters:
id - An identifer object for the Audio
loc - Country/Language Information
aBuf - A Buffered Input Stream of music
len - Size of the audio stream in bytes
mime - The mimetype of the Audio
Throws:
PersistenceException - If an error occurs in the Lightweight Persistence Engine
java.rmi.RemoteException - If an error occurs in the Remote Method Interface
CreateException - If an error occurs in the create method

getAudio

public java.io.BufferedInputStream getAudio()
                                     throws java.rmi.RemoteException
This method returns the Audio String.
Returns:
A Stream containing the text of the Audio
Throws:
java.rmi.RemoteException - If an error occurs in the Remote Method Interface

getLocale

public java.util.Locale getLocale()
                           throws java.rmi.RemoteException
This method returns the Locale Object.
Returns:
A Locale Object
Throws:
java.rmi.RemoteException - If an error occurs in the Remote Method Interface

getMimeType

public java.lang.String getMimeType()
                             throws java.rmi.RemoteException
This method returns the MimeType of the Audio Stream.
Returns:
String A String containing the MimeType of the Audio
Throws:
java.rmi.RemoteException - If an error occurs in the Remote Method Interface

getSize

public long getSize()
             throws java.rmi.RemoteException
This method returns the size of the Audio Stream.
Returns:
long The length of the audio stream in bytes
Throws:
java.rmi.RemoteException - If an error occurs in the Remote Method Interface

products

public com.sun.java.util.collections.Iterator products()
                                                throws java.rmi.RemoteException
This method returns an iterator over the products collection.
Returns:
An iterator of the collection of products
Throws:
java.rmi.RemoteException - If an error occurs in the Remote Method Interface

removeProduct

public void removeProduct(Identifier id,
                          Product prd)
                   throws PersistenceException,
                          java.rmi.RemoteException
This method removes a Product from a collection of Products that the Audio belongs to.
Parameters:
id - An identifer object for the Audio
prd - A Product object to add to the collection
Throws:
PersistenceException - If an error occurs in the Lightweight Persistence Engine
java.rmi.RemoteException - If an error occurs in the Remote Method Interface