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

java.lang.Object
  extended byorg.eclipse.higgins.icard.provider.cardspace.common.InformationCard
      extended byorg.eclipse.higgins.icard.provider.cardspace.common.PersonalCard
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
Direct Known Subclasses:
DummyPersonalCard

public abstract class PersonalCard
extends InformationCard
implements org.eclipse.higgins.icard.IPersonalInformationCard


Field Summary
static String ISSUER_SELF
           
static int LOCKED
           
static int NO_PIN
           
static int UNLOCKED
           
 
Constructor Summary
PersonalCard()
           
 
Method Summary
 Element claimsToXML(Document doc)
           
 org.eclipse.higgins.icard.IClaim getClaim(String type)
           
 org.eclipse.higgins.icard.IClaim getClaimByLocalName(String shortTypeName)
           
 URI getClaimListContextID()
           
 String getClaimListEntityID()
           
 Iterator getClaims()
           
 byte[] getPinDigest()
           
 int getPinStatus()
           
 org.eclipse.higgins.icard.auth.ICredentialDescriptor[] getRequiredCredentials()
           
 void initFromXML(Element card)
           
 org.eclipse.higgins.icard.io.IElement toElement(org.eclipse.higgins.icard.io.IElementFormat format)
           
 void unlock(org.eclipse.higgins.icard.auth.IPinCodeCredential credential)
           
 boolean validatePINCode(String pinCode)
          Validate a user input pin code
 
Methods inherited from class org.eclipse.higgins.icard.provider.cardspace.common.InformationCard
getCUID, getDescription, getHashSalt, getID, getImage, getImageType, getIssuer, getIssuerID, getIssuerName, getMasterKey, getName, getProvider, getSupportedClaimTypes, getSupportedClaimTypesUris, getSupportedTokenTypes, getTimeExpires, getTimeIssued, getTimeLastUpdated, getType, getVersion, isClaimsRetrieved, isFormatSupported, isSelfIssued
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.higgins.icard.IPersonalInformationCard
setPinCode
 
Methods inherited from interface org.eclipse.higgins.icard.IInformationCard
getHashSalt, getIssuerID, getMasterKey
 
Methods inherited from interface org.eclipse.higgins.icard.ICard
applyUpdates, beginUpdates, cancelUpdates, getCUID, getDescription, getID, getImage, getImageType, getIssuer, getIssuerName, getName, getProvider, getSupportedClaimTypesUris, getSupportedTokenTypes, getTimeExpires, getTimeIssued, getTimeLastUpdated, getType, getVersion, isClaimsRetrieved, isEditable, isEditMode, isFormatSupported, isSelfIssued, setImage, setIssuerName, setName, setTimeExpires
 
Methods inherited from interface org.eclipse.higgins.icard.IClaimTypeContainer
getSupportedClaimTypes
 
Methods inherited from interface org.eclipse.higgins.icard.IClaimContainer
createClaim, setClaim
 

Field Detail

ISSUER_SELF

public static String ISSUER_SELF

NO_PIN

public static final int NO_PIN
See Also:
Constant Field Values

LOCKED

public static final int LOCKED
See Also:
Constant Field Values

UNLOCKED

public static final int UNLOCKED
See Also:
Constant Field Values
Constructor Detail

PersonalCard

public PersonalCard()
Method Detail

initFromXML

public void initFromXML(Element card)
                 throws org.eclipse.higgins.icard.CardException,
                        DOMException
Parameters:
card -
Throws:
org.eclipse.higgins.icard.CardException
DOMException

getClaimListContextID

public URI getClaimListContextID()
Specified by:
getClaimListContextID in interface org.eclipse.higgins.icard.IPersonalInformationCard
Throws:
org.eclipse.higgins.icard.CardException

getClaimListEntityID

public String getClaimListEntityID()
Specified by:
getClaimListEntityID in interface org.eclipse.higgins.icard.IPersonalInformationCard

toElement

public org.eclipse.higgins.icard.io.IElement toElement(org.eclipse.higgins.icard.io.IElementFormat format)
                                                throws org.eclipse.higgins.icard.CardException,
                                                       org.eclipse.higgins.icard.io.CardIOException,
                                                       org.eclipse.higgins.icard.io.UnsupportedElementFormatException
Specified by:
toElement in interface org.eclipse.higgins.icard.IInformationCard
Throws:
org.eclipse.higgins.icard.CardException
org.eclipse.higgins.icard.io.CardIOException
org.eclipse.higgins.icard.io.UnsupportedElementFormatException

claimsToXML

public Element claimsToXML(Document doc)
                    throws org.eclipse.higgins.icard.CardException
Parameters:
doc -
Returns:
Throws:
org.eclipse.higgins.icard.CardException

getPinDigest

public byte[] getPinDigest()
                    throws org.eclipse.higgins.icard.CardException
Specified by:
getPinDigest in interface org.eclipse.higgins.icard.IPersonalInformationCard
Throws:
org.eclipse.higgins.icard.CardException

getClaim

public org.eclipse.higgins.icard.IClaim getClaim(String type)
                                          throws org.eclipse.higgins.icard.AuthenticationRequiredException,
                                                 org.eclipse.higgins.icard.InvalidTypeException,
                                                 org.eclipse.higgins.icard.CardException
Specified by:
getClaim in interface org.eclipse.higgins.icard.IClaimContainer
Throws:
org.eclipse.higgins.icard.AuthenticationRequiredException
org.eclipse.higgins.icard.InvalidTypeException
org.eclipse.higgins.icard.CardException

getClaimByLocalName

public org.eclipse.higgins.icard.IClaim getClaimByLocalName(String shortTypeName)
                                                     throws org.eclipse.higgins.icard.AuthenticationRequiredException,
                                                            org.eclipse.higgins.icard.InvalidTypeException,
                                                            org.eclipse.higgins.icard.CardException
Specified by:
getClaimByLocalName in interface org.eclipse.higgins.icard.ICard
Throws:
org.eclipse.higgins.icard.AuthenticationRequiredException
org.eclipse.higgins.icard.InvalidTypeException
org.eclipse.higgins.icard.CardException

getClaims

public Iterator getClaims()
                   throws org.eclipse.higgins.icard.CardException
Specified by:
getClaims in interface org.eclipse.higgins.icard.IClaimContainer
Throws:
org.eclipse.higgins.icard.CardException

getRequiredCredentials

public org.eclipse.higgins.icard.auth.ICredentialDescriptor[] getRequiredCredentials()
Specified by:
getRequiredCredentials in interface org.eclipse.higgins.icard.ICard

getPinStatus

public int getPinStatus()

validatePINCode

public boolean validatePINCode(String pinCode)
                        throws UnsupportedEncodingException,
                               NoSuchAlgorithmException
Validate a user input pin code

Parameters:
pinCode -
Returns:
Throws:
UnsupportedEncodingException
NoSuchAlgorithmException

unlock

public void unlock(org.eclipse.higgins.icard.auth.IPinCodeCredential credential)
            throws Exception
Parameters:
credential -
Throws:
Exception