org.eclipse.higgins.icard
Interface ICard

All Superinterfaces:
IClaimContainer, IClaimTypeContainer
All Known Subinterfaces:
IInformationCard, IManagedInformationCard, IPersonalInformationCard, IPwmCard

public interface ICard
extends IClaimTypeContainer, IClaimContainer


Method Summary
 void applyUpdates()
          Applies an updates made to this ICard object to the backing data store.
 void beginUpdates()
          Puts this ICard object into edit mode when an update operations on card or on any contained elements are allowed.
 void cancelUpdates()
          Cancels any updates made to this ICard object or any contained elements and terminate edit mode.
 IClaim getClaimByLocalName(String typeLocalName)
           
 CUID getCUID()
          Gets the unique identifier of the i-card in the i-card registry.
 String getDescription()
           
 String getID()
          Gets the ID of the i-card.
 byte[] getImage()
          Returns byte representation of a background image of the card.
 String getImageType()
          Return the mime type of the background image (JPEG or GIF).
 String getIssuer()
          Name of the issuer of the card.
 String getIssuerName()
          Returns the human friendly name of the card issuer, originator, creator.
 String getName()
          Return the human friendly name of the card.
 ICardProvider getProvider()
          Should it be here? /
 ICredentialDescriptor[] getRequiredCredentials()
          Returns an array of credential descriptors which should be used to request protected clam's information.
 List getSupportedClaimTypesUris()
          Return a list of all possible types of claims (as String) that are supported.
 List getSupportedTokenTypes()
           
 Date getTimeExpires()
          Returns (optionally) the time after which the card should be considered expired, invalid.
 Date getTimeIssued()
          Returns when the card was first issued, created, orginated.
 Date getTimeLastUpdated()
          Set the expiration date and time
 String getType()
          Returns the type of this i-card (e.g.
 String getVersion()
          Return the version of the card.
 boolean isClaimsRetrieved()
          Checks whether this card already has claims retrieved or it is necessary to make additional call to ICardProvider.getICardByCUID(javax.security.auth.callback.CallbackHandler, CUID, org.eclipse.higgins.icard.auth.ICredential) to retrieve them.
 boolean isEditable()
          Determines whether this ICard could be edited by the user.
 boolean isEditMode()
          Determines wheter this ICard object is in edit mode.
 boolean isFormatSupported(IElementFormat format)
           
 boolean isSelfIssued()
          Indicates that this card has been issued by user (claim values can be editable)
 void setImage(byte[] newImage, String newImageType)
          Used to change the picture associated with this card
 void setIssuerName(String name)
          Sets the card's human friendly name of the card issuer
 void setName(String newName)
          Used to change the name of the card
 void setTimeExpires(Date date)
           
 IElement toElement(IElementFormat format)
           
 
Methods inherited from interface org.eclipse.higgins.icard.IClaimContainer
createClaim, getClaim, getClaims, setClaim
 

Method Detail

getType

String getType()
Returns the type of this i-card (e.g. "uri", "cardspace", "idemix", "openid", etc.)


getID

String getID()
Gets the ID of the i-card. Useful in subsequent import operations, so that cards can be updated or overwritten.

The ID of the i-card must be unique per i-card provider but different i-card providers could contains i-cards with the same ID however.


getCUID

CUID getCUID()
Gets the unique identifier of the i-card in the i-card registry.

Because different i-card providers could contains i-cards with the same ID, it could be difficult to retrieve the same i-card from the i-card registry again using i-card ID.

The UUID must be unique over all i-card providers in the i-card registry to allow retrieve the same i-card from the i-card registry multiple times.

Current implementation of i-card registry assumes that ICard.UUID must equals to ICardProvider.ID + "#" + ICard.ID


getVersion

String getVersion()
Return the version of the card. Useful in subsequent import operations, so that cards can be updated or overwritten.


getName

String getName()
Return the human friendly name of the card. The only thing that will be possible to modify after the import.


getImage

byte[] getImage()
Returns byte representation of a background image of the card.


getImageType

String getImageType()
Return the mime type of the background image (JPEG or GIF).


getIssuer

String getIssuer()
Name of the issuer of the card. Used to match the required issuer, if a relying party specifies an issuer in the policy.


getIssuerName

String getIssuerName()
Returns the human friendly name of the card issuer, originator, creator.


getTimeIssued

Date getTimeIssued()
Returns when the card was first issued, created, orginated.


getTimeExpires

Date getTimeExpires()
Returns (optionally) the time after which the card should be considered expired, invalid. Otherwise returns null.


getSupportedClaimTypesUris

List getSupportedClaimTypesUris()
Return a list of all possible types of claims (as String) that are supported.


getClaimByLocalName

IClaim getClaimByLocalName(String typeLocalName)
                           throws AuthenticationRequiredException,
                                  InvalidTypeException,
                                  CardException
Parameters:
typeLocalName -
Returns:
Throws:
AuthenticationRequiredException - TODO
InvalidTypeException - TODO
CardException - TODO

getProvider

ICardProvider getProvider()
Should it be here? /


getDescription

String getDescription()

setName

void setName(String newName)
             throws CardException
Used to change the name of the card

Parameters:
newName -
Throws:
CardException

setImage

void setImage(byte[] newImage,
              String newImageType)
              throws CardException
Used to change the picture associated with this card

Parameters:
newImage -
newImageType -
Throws:
CardException

setIssuerName

void setIssuerName(String name)
                   throws CardException
Sets the card's human friendly name of the card issuer

Parameters:
name -
Throws:
CardNotOpenException
CardException

setTimeExpires

void setTimeExpires(Date date)
                    throws CardException
Parameters:
date -
Throws:
CardNotOpenException
CardException

getSupportedTokenTypes

List getSupportedTokenTypes()
Returns:
list of token types which can be provided for this card

isSelfIssued

boolean isSelfIssued()
Indicates that this card has been issued by user (claim values can be editable)


getTimeLastUpdated

Date getTimeLastUpdated()
Set the expiration date and time

Returns:
date when the card was last updated
Throws:
CardException

isEditable

boolean isEditable()
Determines whether this ICard could be edited by the user. General idea is that managed cards (isSelfIssued() == false) can not be edited by the user but some types of managed cards could also allow the user to edit their data.


beginUpdates

void beginUpdates()
                  throws InvalidStateException
Puts this ICard object into edit mode when an update operations on card or on any contained elements are allowed.

Note that any update operation on this ICard prior to this method call and after either applyUpdates() or cancelUpdates() throws the InvalidStateException.

Throws:
InvalidStateException - if this ICard object is in edit mode already.

cancelUpdates

void cancelUpdates()
                   throws InvalidStateException
Cancels any updates made to this ICard object or any contained elements and terminate edit mode. Reloads card's data from backing data store.

Throws:
InvalidStateException - if this ICard object is not in edit mode.

applyUpdates

void applyUpdates()
                  throws InvalidStateException,
                         CardException
Applies an updates made to this ICard object to the backing data store.

On success terminate edit mode of this ICard object.

On error this ICard object remains in edit mode.

Throws:
InvalidStateException - if this ICard object is not in edit mode.
CardException - if an error occurs at update backing data store.

isEditMode

boolean isEditMode()
Determines wheter this ICard object is in edit mode.


isClaimsRetrieved

boolean isClaimsRetrieved()
Checks whether this card already has claims retrieved or it is necessary to make additional call to ICardProvider.getICardByCUID(javax.security.auth.callback.CallbackHandler, CUID, org.eclipse.higgins.icard.auth.ICredential) to retrieve them.


getRequiredCredentials

ICredentialDescriptor[] getRequiredCredentials()
Returns an array of credential descriptors which should be used to request protected clam's information. For some types of cards it is possible to request such information using different service endpoints each of which could requere different credentials. Each element in returned array describe all information sufficient to request such information on single endpoint. Returned array could be empty or null if authentiation is not required to request claim's information.

See Also:
ICardProvider.getICardByCUID(javax.security.auth.callback.CallbackHandler, CUID, org.eclipse.higgins.icard.auth.ICredential)

isFormatSupported

boolean isFormatSupported(IElementFormat format)

toElement

IElement toElement(IElementFormat format)
                   throws CardException,
                          CardIOException,
                          UnsupportedElementFormatException
Throws:
CardException
CardIOException
UnsupportedElementFormatException