All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.commerce.SuspendedDeal

java.lang.Object
   |
   +----semper.commerce.Deal
           |
           +----semper.commerce.SuspendedDeal

public class SuspendedDeal
extends Deal
This class represents a suspended commerce deal. A suspended deal can only be used for inspection the data associated with a deal. This data consists of information about the association, some deal attributes and the entire history of commerce transactions. An ActiveDeal must be used if new commerce transactions are to be added to the deal.

Note: Currently, any deal can be inspected by an instance of this class. Obviously, we cannot let any business application access the entire database of commerce deals, so this class can currently only be used by business applications posessing special capabilities. This restriction may be relaxed in the future.

Implementation note A number of the methods defined by this class restricts access by requiring a suitable access control capability to be presented. The functionality for verifying the access control capability is not yet implemented and a null access control handle can be specified.

Version:
$Id: SuspendedDeal.java,v 1.6 1998/05/18 11:49:34 semper Exp $
Author:
Rolf Michelsen, Stig Mj°lsnes
See Also:
ActiveDeal

Constructor Index

 o SuspendedDeal(AccessControlHandle)
Opens any existing deal in suspended mode.
 o SuspendedDeal(DealID, AccessControlHandle)
Opens a specific deal in suspended mode.
 o SuspendedDeal(ObjectInputStream, AccessControlHandle)
Opens an externally stored deal in suspended mode.
 o SuspendedDeal(String, AccessControlHandle)
Opens an existing deal with a specific peer in suspended mode.

Constructors

 o SuspendedDeal
 public SuspendedDeal(AccessControlHandle ach) throws AccessException, DealException
Opens any existing deal in suspended mode. The user will be presented with a list of all existing deals and must chose one of these to open.

This service requires a suitable access control capability.

This service is not yet implemented. Using this service will result in an exception being thrown.

Parameters:
ach - Access control handle to capability.
Throws: AccessException
Thrown if the required capability is not associated with the given access control handle.
Throws: DealException
Thrown if the deal cannot be opened for some reason, perhaps because the user cancelled the operation.
 o SuspendedDeal
 public SuspendedDeal(String peerName,
                      AccessControlHandle ach) throws AccessException, DealException
Opens an existing deal with a specific peer in suspended mode. The user will be presented with a list of all existing deals with the specified peer and must chose one of these to open.

This service requires a suitable access control capability.

This service is not yet implemented. Using this service will result in an exception being thrown.

Parameters:
peerName - The peer name of the deal to open.
ach - Access control handle to access capability.
Throws: AccessException
Thrown if the required capability is not associated with the given access control handle.
Throws: DealException
Thrown if the deal cannot be opened for some reason, perhaps because a deal with the given peer does not exist or the user cancelled the operation.
 o SuspendedDeal
 public SuspendedDeal(DealID dealID,
                      AccessControlHandle ach) throws AccessException, DealException
Opens a specific deal in suspended mode. The deal is identified by the deal identifier.

Requesting this service requires possession of a suitable access control capability. Access control is currently not implemented and any reference, including null, will do.

Parameters:
dealID - The deal identifier of the deal to open.
ach - Access control handle to access capability.
Throws: AccessException
Thrown if the required capability is not associated with the given access control handle.
Throws: DealException
Thrown if the deal cannot be opened because a deal with the given identifier does not exist.
 o SuspendedDeal
 public SuspendedDeal(ObjectInputStream stream,
                      AccessControlHandle ach) throws AccessException, DealException, IOException
Opens an externally stored deal in suspended mode. This constructor can be used to reconstitute a deal exported by the export method. This service can only be used by applications that possess the required access control capability.

Implementation note Access control is currently not fully implemented. Any caller that passes a valid access control handle to this method will be granted access to the service. The constructor does not verify that the required capability is associated with the handle. This will be changed in a future version.

Parameters:
stream - The stream to read the deal from.
ach - Handle to access control capability.
Throws: AccessException
Thrown if the required access control capability was associated with the passed access control handle.
Throws: DealException
Thrown if something is wrong with the external representation of the deal.
Throws: IOException
Thrown if the deal cannot be read successfully from the input stream.
See Also:
export

All Packages  Class Hierarchy  This Package  Previous  Next  Index