org.eclipse.higgins.icard
Interface IClaimContainer

All Superinterfaces:
IClaimTypeContainer
All Known Subinterfaces:
ICard, IComplexClaim, IInformationCard, IManagedInformationCard, IPersonalInformationCard

public interface IClaimContainer
extends IClaimTypeContainer

The IClaimContainer represents an interface of container object for IClaim objects. Defines methods to create and update some individual IClaim objects as well as to retrieve them.


Method Summary
 IClaim createClaim(String type)
          Creates a new IClaim object for this container of claims and adds it to the container.
 IClaim getClaim(String type)
          Returns the specified claim of this object.
 Iterator getClaims()
          Return all claims of this container object.
 IClaim setClaim(IClaim copyFrom)
          Creates a new IClaim object for this container of claims with the type specified by copyFrom.getType() if corresponding IClaim object doesn't exist yet in this container.
 
Methods inherited from interface org.eclipse.higgins.icard.IClaimTypeContainer
getSupportedClaimTypes
 

Method Detail

getClaims

public Iterator getClaims()
                   throws AuthenticationRequiredException,
                          CardException
Return all claims of this container object.

Returns:
A List of IClaims.
Throws:
AuthenticationRequiredException - when authentication is required to perform this request
CardException

getClaim

public IClaim getClaim(String type)
                throws AuthenticationRequiredException,
                       InvalidTypeException,
                       CardException
Returns the specified claim of this object.

Parameters:
type - the identifier of the claim to be returned.
Returns:
an IClaim or if none exits.
Throws:
AuthenticationRequiredException - when authentication is required to perform this request
InvalidTypeException - if this object can't contains a claim with the specified type.
CardException - in case of some unexpected error.

setClaim

public IClaim setClaim(IClaim copyFrom)
                throws InvalidClaimException,
                       InvalidTypeException,
                       ReadOnlyObjectException,
                       CardException
Creates a new IClaim object for this container of claims with the type specified by copyFrom.getType() if corresponding IClaim object doesn't exist yet in this container. Performs deep copy of the data from the provided object to the contained one.

Parameters:
copyFrom - an IClaim object from which data is copied to the contained IClaim object.
Returns:
contained IClaim object.
Throws:
InvalidClaimException - if provided claim object is invalid for this container.
InvalidTypeException - if this object can't contains a claim with the specified type.
ReadOnlyObjectException - if implicit subject doesn't support modifications of its claims.
CardException - in case of some unexpected error.

createClaim

public IClaim createClaim(String type)
                   throws InvalidTypeException,
                          ReadOnlyObjectException,
                          CardException
Creates a new IClaim object for this container of claims and adds it to the container. This call is typically followed by one or more calls to on the returned IClaim object to set its value(s).

Parameters:
type - the String specifying the type of the IClaim being created.
Returns:
a newly created IClaim object.
Throws:
InvalidTypeException - if this object can't contains a claim with the specified type.
ReadOnlyObjectException - if implicit subject doesn't support modifications of its claims.
CardException - in case of some unexpected error.