org.eclipse.higgins.icard.provider.cardspace.common
Class DummyPersonalCard

java.lang.Object
  extended byorg.eclipse.higgins.icard.common.Card
      extended byorg.eclipse.higgins.icard.provider.cardspace.common.InformationCard
          extended byorg.eclipse.higgins.icard.provider.cardspace.common.PersonalCard
              extended byorg.eclipse.higgins.icard.provider.cardspace.common.DummyPersonalCard
All Implemented Interfaces:
org.eclipse.higgins.icard.ICard, org.eclipse.higgins.icard.IClaimContainer, org.eclipse.higgins.icard.IClaimTypeContainer, org.eclipse.higgins.icard.IInformationCard, org.eclipse.higgins.icard.IPersonalInformationCard

public class DummyPersonalCard
extends PersonalCard

Dummy class of personal cards which doesn't support update operations. Useful for in-memory operations only.


Field Summary
 
Fields inherited from class org.eclipse.higgins.icard.provider.cardspace.common.PersonalCard
ISSUER_SELF, LOCKED, NO_PIN, UNLOCKED
 
Constructor Summary
DummyPersonalCard()
           
 
Method Summary
 void applyUpdates()
           
 void beginUpdates()
           
 void cancelUpdates()
           
 org.eclipse.higgins.icard.IClaim createClaim(String type)
           
 boolean isEditable()
           
 boolean isEditMode()
           
 void lock(org.eclipse.higgins.icard.auth.IPinCodeCredential credential)
          If the card is not locked, this method protect the card by PIN code.
 org.eclipse.higgins.icard.IClaim setClaim(org.eclipse.higgins.icard.IClaim copyFrom)
           
 void setImage(byte[] newImage, String newImageType)
           
 void setIssuerName(String name)
           
 void setName(String newName)
           
 void setPinCode(org.eclipse.higgins.icard.auth.IPinCodeCredential pinCodeCredential)
           
 void setTimeExpires(Date date)
           
 void unlock(org.eclipse.higgins.icard.auth.IPinCodeCredential credential)
          If the card is locked by PIN code, this method unlock the claim values and the master key.
 boolean validatePINCode(String pinCode)
          Validate a user input pin code
 
Methods inherited from class org.eclipse.higgins.icard.provider.cardspace.common.PersonalCard
claimsToXML, getClaim, getClaimByLocalName, getClaimListContextID, getClaimListEntityID, getClaims, getPinDigest, getPinStatus, getRequiredCredentials, initFromXML, toElement
 
Methods inherited from class org.eclipse.higgins.icard.provider.cardspace.common.InformationCard
getHashSalt, getIssuerID, getMasterKey, getType
 
Methods inherited from class org.eclipse.higgins.icard.common.Card
getCUID, getDescription, getID, getImage, getImageType, getIssuer, getIssuerName, getName, getProvider, getSupportedClaimTypes, getSupportedClaimTypesUris, getSupportedTokenTypes, getTimeExpires, getTimeIssued, getTimeLastUpdated, getVersion, isClaimsRetrieved, isFormatSupported, isSelfIssued, setClaims
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.higgins.icard.IInformationCard
getHashSalt, getIssuerID, getMasterKey
 
Methods inherited from interface org.eclipse.higgins.icard.ICard
getCUID, getDescription, getID, getImage, getImageType, getIssuer, getIssuerName, getName, getProvider, getSupportedClaimTypesUris, getSupportedTokenTypes, getTimeExpires, getTimeIssued, getTimeLastUpdated, getType, getVersion, isClaimsRetrieved, isFormatSupported, isSelfIssued
 
Methods inherited from interface org.eclipse.higgins.icard.IClaimTypeContainer
getSupportedClaimTypes
 

Constructor Detail

DummyPersonalCard

public DummyPersonalCard()
Method Detail

setPinCode

public void setPinCode(org.eclipse.higgins.icard.auth.IPinCodeCredential pinCodeCredential)
                throws org.eclipse.higgins.icard.CardException
Throws:
org.eclipse.higgins.icard.CardException

applyUpdates

public void applyUpdates()
                  throws org.eclipse.higgins.icard.InvalidStateException,
                         org.eclipse.higgins.icard.CardException
Throws:
org.eclipse.higgins.icard.InvalidStateException
org.eclipse.higgins.icard.CardException

beginUpdates

public void beginUpdates()
                  throws org.eclipse.higgins.icard.InvalidStateException
Throws:
org.eclipse.higgins.icard.InvalidStateException

cancelUpdates

public void cancelUpdates()
                   throws org.eclipse.higgins.icard.InvalidStateException
Throws:
org.eclipse.higgins.icard.InvalidStateException

isEditMode

public boolean isEditMode()

isEditable

public boolean isEditable()

setImage

public void setImage(byte[] newImage,
                     String newImageType)
              throws org.eclipse.higgins.icard.CardException
Throws:
org.eclipse.higgins.icard.CardException

setIssuerName

public void setIssuerName(String name)
                   throws org.eclipse.higgins.icard.CardException
Throws:
org.eclipse.higgins.icard.CardException

setName

public void setName(String newName)
             throws org.eclipse.higgins.icard.CardException
Throws:
org.eclipse.higgins.icard.CardException

setTimeExpires

public void setTimeExpires(Date date)
                    throws org.eclipse.higgins.icard.CardException
Throws:
org.eclipse.higgins.icard.CardException

createClaim

public org.eclipse.higgins.icard.IClaim createClaim(String type)
                                             throws org.eclipse.higgins.icard.InvalidTypeException,
                                                    org.eclipse.higgins.icard.ReadOnlyObjectException,
                                                    org.eclipse.higgins.icard.CardException
Throws:
org.eclipse.higgins.icard.InvalidTypeException
org.eclipse.higgins.icard.ReadOnlyObjectException
org.eclipse.higgins.icard.CardException

setClaim

public org.eclipse.higgins.icard.IClaim setClaim(org.eclipse.higgins.icard.IClaim copyFrom)
                                          throws org.eclipse.higgins.icard.InvalidClaimException,
                                                 org.eclipse.higgins.icard.InvalidTypeException,
                                                 org.eclipse.higgins.icard.ReadOnlyObjectException,
                                                 org.eclipse.higgins.icard.CardException
Throws:
org.eclipse.higgins.icard.InvalidClaimException
org.eclipse.higgins.icard.InvalidTypeException
org.eclipse.higgins.icard.ReadOnlyObjectException
org.eclipse.higgins.icard.CardException

lock

public void lock(org.eclipse.higgins.icard.auth.IPinCodeCredential credential)
          throws Exception
Description copied from class: PersonalCard
If the card is not locked, this method protect the card by PIN code.

Specified by:
lock in class PersonalCard
Parameters:
credential -
Throws:
Exception

unlock

public void unlock(org.eclipse.higgins.icard.auth.IPinCodeCredential credential)
            throws Exception
Description copied from class: PersonalCard
If the card is locked by PIN code, this method unlock the claim values and the master key.

Specified by:
unlock in class PersonalCard
Parameters:
credential -
Throws:
Exception

validatePINCode

public boolean validatePINCode(String pinCode)
                        throws Exception
Description copied from class: PersonalCard
Validate a user input pin code

Specified by:
validatePINCode in class PersonalCard
Parameters:
pinCode -
Returns:
Throws:
Exception