com.jwpepper.inv
Interface Product

All Known Subinterfaces:
PepperProduct
All Known Implementing Classes:
ProductImpl

public abstract interface Product
extends Entity

Contains the methods required to support the product business component.
Last modified $Date: 1999/10/04 15:31:30 $

Version:
$Revision
Author:
Neophytos Iacovou (iacovou@ancept.com), George Reese (george@ancept.com)

Field Summary
static java.lang.String ANNOTATIONS
          The annotations attribute.
static java.lang.String CHILDREN
          The children attribute.
static java.lang.String CRT_CLASS
          The concrete class implementing this.
static java.lang.String IN_STOCK
          The inStock attribute.
static java.lang.String MANUFACTURER
          The manufacturer attribute.
static java.lang.String MANUFACTURER_CODE
          The manufacturerCode attribute.
static java.lang.String NAME
          The name attribute.
static java.lang.String PARENT
          The parent attribute.
static java.lang.String PRICE
          The price attribute.
 
Method Summary
 void addAnnotation(Identifier id, java.lang.String type, AnnotationReference ann)
          Adds the specified annotation to the list of annotations that describe this product.
 void addChild(Identifier id, Product prd)
          Adds the specified product to the list of this product's child products.
 com.sun.java.util.collections.Iterator annotations()
          Provides a full iterator of all annotations describing this product.
 com.sun.java.util.collections.Iterator children()
          Provides all of the children of this product.
 void create(Identifier id, ManufacturerReference mfg, java.lang.String mfgcode, java.lang.String nom, double prix)
          Initializes a newly created product with the specified values.
 void create(Identifier id, ManufacturerReference mfg, java.lang.String mfgcode, java.lang.String nom, double prix, ProductReference prnt)
          Initializes a newly created product with the specified values.
 AnnotationReference getAnnotation(java.lang.String type, java.util.Locale loc)
          Provides the annotation of the specified audience type translated to the specified locale.
 ManufacturerReference getManufacturer()
          Provides the manufacturer of this product.
 java.lang.String getManufacturerCode()
          Provides the manufacturer's unique identifier for this product.
 java.lang.String getName(java.util.Locale loc)
          Provides the name of this product translated for the specified locale.
 ProductReference getParent()
          Provides the parent of this product or null if it does not have a product.
 double getPrice()
          Provides the basic price for this product.
 boolean isInStock()
          Determines if this product is currently in stock.
 void removeAnnotation(Identifier id, AnnotationReference ann)
          Removes the specified annotation from this product's list of annotations.
 void removeChild(Identifier id, Product prd)
          Removes the specified child product from this product's list of children.
 void removeParent(Identifier id, Product prd)
          Sets the product to be orphaned if the specified product matches this product's parent.
 
Methods inherited from interface com.imaginary.lwp.Entity
getLastUpdateID, getLastUpdateTime, getObjectID, getReference, remove
 

Field Detail

ANNOTATIONS

public static final java.lang.String ANNOTATIONS
The annotations attribute.

CHILDREN

public static final java.lang.String CHILDREN
The children attribute.

CRT_CLASS

public static final java.lang.String CRT_CLASS
The concrete class implementing this.

IN_STOCK

public static final java.lang.String IN_STOCK
The inStock attribute.

MANUFACTURER

public static final java.lang.String MANUFACTURER
The manufacturer attribute.

MANUFACTURER_CODE

public static final java.lang.String MANUFACTURER_CODE
The manufacturerCode attribute.

NAME

public static final java.lang.String NAME
The name attribute.

PARENT

public static final java.lang.String PARENT
The parent attribute.

PRICE

public static final java.lang.String PRICE
The price attribute.
Method Detail

addAnnotation

public void addAnnotation(Identifier id,
                          java.lang.String type,
                          AnnotationReference ann)
                   throws PersistenceException,
                          java.rmi.RemoteException
Adds the specified annotation to the list of annotations that describe this product.
Parameters:
id - the client identifier
aud - the audience type for this annotation
ann - the annotation to be added
Throws:
PersistenceException - a transactional error occurred
java.rmi.RemoteException - a network error occurred

addChild

public void addChild(Identifier id,
                     Product prd)
              throws IllegalProductRelationException,
                     PersistenceException,
                     java.rmi.RemoteException
Adds the specified product to the list of this product's child products.
Parameters:
id - the client identifier
prd - the product to be added
Throws:
IllegalProductRelationException - an attempt was made to add a child to this product when it is already a child of some other product
PersistenceException - a transactional error occurred
java.rmi.RemoteException - a network error occurred

annotations

public com.sun.java.util.collections.Iterator annotations()
                                                   throws java.rmi.RemoteException
Provides a full iterator of all annotations describing this product.
Returns:
the list of annotations describing this product
Throws:
java.rmi.RemoteException - a network error occurred

children

public com.sun.java.util.collections.Iterator children()
                                                throws java.rmi.RemoteException
Provides all of the children of this product.
Returns:
this product's children
Throws:
java.rmi.RemoteException - a network error occurred

create

public void create(Identifier id,
                   ManufacturerReference mfg,
                   java.lang.String mfgcode,
                   java.lang.String nom,
                   double prix)
            throws PersistenceException,
                   java.rmi.RemoteException
Initializes a newly created product with the specified values.
Parameters:
id - the client identifier
mfg - the manufacturer of the product
mfgcode - the manufacturer's unique identifier
nom - the name of the product
prix - the product's price
Throws:
PersistenceException - a transactional error occurred
java.rmi.RemoteException - a network error occurred

create

public void create(Identifier id,
                   ManufacturerReference mfg,
                   java.lang.String mfgcode,
                   java.lang.String nom,
                   double prix,
                   ProductReference prnt)
            throws PersistenceException,
                   java.rmi.RemoteException
Initializes a newly created product with the specified values.
Parameters:
id - the client identifier
mfg - the manufacturer of the product
mfgcode - the manufacturer's unique identifier
nom - the name of the product
prix - the product's price
prnt - the parent of this product
Throws:
PersistenceException - a transactional error occurred
java.rmi.RemoteException - a network error occurred

getAnnotation

public AnnotationReference getAnnotation(java.lang.String type,
                                         java.util.Locale loc)
                                  throws java.rmi.RemoteException
Provides the annotation of the specified audience type translated to the specified locale. If no translation exists for that locale, provide a translation for the default locale.
Parameters:
aud - the audience type of this annotation
loc - the locale of the desired translation
Returns:
the annotation describing this product
Throws:
java.rmi.RemoteException - a network error occurred

getManufacturer

public ManufacturerReference getManufacturer()
                                      throws java.rmi.RemoteException
Provides the manufacturer of this product.
Returns:
the manufacturer of this product
Throws:
java.rmi.RemoteException - a network error occurred

getManufacturerCode

public java.lang.String getManufacturerCode()
                                     throws java.rmi.RemoteException
Provides the manufacturer's unique identifier for this product.
Returns:
the manufacturer code
Throws:
java.rmi.RemoteException - a network error occurred

getName

public java.lang.String getName(java.util.Locale loc)
                         throws java.rmi.RemoteException
Provides the name of this product translated for the specified locale.
Parameters:
loc - the locale of the desired translation
Returns:
the name of the product
Throws:
java.rmi.RemoteException - a network error occurred

getParent

public ProductReference getParent()
                           throws java.rmi.RemoteException
Provides the parent of this product or null if it does not have a product.
Returns:
the parent of this product
Throws:
java.rmi.RemoteException - a network error occurred

getPrice

public double getPrice()
                throws java.rmi.RemoteException
Provides the basic price for this product.
Returns:
the product price
Throws:
java.rmi.RemoteException - a network error occurred

isInStock

public boolean isInStock()
                  throws java.rmi.RemoteException
Determines if this product is currently in stock.
Returns:
true if the product is in stock
Throws:
java.rmi.RemoteException -  

removeAnnotation

public void removeAnnotation(Identifier id,
                             AnnotationReference ann)
                      throws PersistenceException,
                             java.rmi.RemoteException
Removes the specified annotation from this product's list of annotations.
Parameters:
id - the client identifier for the transaction
ann - the annotation to be removed
Throws:
PersistenceException - a transactional error occurred
java.rmi.RemoteException - a network error occurred

removeChild

public void removeChild(Identifier id,
                        Product prd)
                 throws PersistenceException,
                        java.rmi.RemoteException
Removes the specified child product from this product's list of children.
Parameters:
id - the client identifier for the transaction
prd - the child to be removed
Throws:
PersistenceException - a transactional error occurred
java.rmi.RemoteException - a network error occurred

removeParent

public void removeParent(Identifier id,
                         Product prd)
                  throws PersistenceException,
                         java.rmi.RemoteException
Sets the product to be orphaned if the specified product matches this product's parent. The result is a null parent.
Parameters:
id - the client identifier for the transaction
prd - the parent of this product
Throws:
PersistenceException - a transactional error occurred
java.rmi.RemoteException - a network error occurred