org.eclipse.higgins.icard.registry
Class ICardRegistry

java.lang.Object
  extended byorg.eclipse.higgins.registry.HigginsRegistry
      extended byorg.eclipse.higgins.icard.registry.ICardRegistry

public class ICardRegistry
extends org.eclipse.higgins.registry.HigginsRegistry


Constructor Summary
ICardRegistry(String configPath)
           
 
Method Summary
 org.eclipse.higgins.icard.io.IFormatDescriptor checkInput(InputStream in)
          Checks whether this ICardRegistry can recognize data format of the provided input stream.
 void deleteICard(CallbackHandler authHandler, org.eclipse.higgins.icard.CUID cuid)
           
 void deleteICard(CallbackHandler authHandler, String CUID)
           
 void exportICards(CallbackHandler authHandler, OutputStream out, String formatID, org.eclipse.higgins.icard.CUID[] cards, org.eclipse.higgins.icard.auth.ICredential credential)
           
 org.eclipse.higgins.icard.io.IFormatProvider getFormatProvider(String formatID)
           
 org.eclipse.higgins.icard.ICard getICardByCUID(CallbackHandler authHandler, org.eclipse.higgins.icard.CUID cuid)
           
 org.eclipse.higgins.icard.ICard getICardByCUID(CallbackHandler authHandler, String CUID)
           
 org.eclipse.higgins.icard.ICardProvider getICardProvider(String extID)
           
 Iterator getICardProviders()
           
 Iterator getICardsByFormat(CallbackHandler authHandler, String formatID)
           
static ICardRegistry getInstance()
           
 org.eclipse.higgins.icard.io.IFormatDescriptor[] getOutputFormats()
          Returns an array of IFormatDesctiptors which provide an information about all output formats available.
 org.eclipse.higgins.icard.userprofile.IUserProfileService getUserProfileService()
           
 Iterator importICards(CallbackHandler authHandler, InputStream in, String formatID, org.eclipse.higgins.icard.auth.ICredential credential)
          Imports cards from the provided input stream.
 
Methods inherited from class org.eclipse.higgins.registry.HigginsRegistry
addExtension, getConfigFile, getConfigPath, getServiceProvider, getServiceProviders, loadProviders, remove
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ICardRegistry

public ICardRegistry(String configPath)
Parameters:
configPath -
Method Detail

getICardProviders

public Iterator getICardProviders()

getICardProvider

public org.eclipse.higgins.icard.ICardProvider getICardProvider(String extID)

getICardByCUID

public org.eclipse.higgins.icard.ICard getICardByCUID(CallbackHandler authHandler,
                                                      String CUID)
                                               throws org.eclipse.higgins.icard.CardException
Throws:
org.eclipse.higgins.icard.CardException

getICardByCUID

public org.eclipse.higgins.icard.ICard getICardByCUID(CallbackHandler authHandler,
                                                      org.eclipse.higgins.icard.CUID cuid)
                                               throws org.eclipse.higgins.icard.CardException
Throws:
org.eclipse.higgins.icard.CardException

deleteICard

public void deleteICard(CallbackHandler authHandler,
                        String CUID)
                 throws org.eclipse.higgins.icard.CardException
Throws:
org.eclipse.higgins.icard.CardException

deleteICard

public void deleteICard(CallbackHandler authHandler,
                        org.eclipse.higgins.icard.CUID cuid)
                 throws org.eclipse.higgins.icard.CardException
Throws:
org.eclipse.higgins.icard.CardException

checkInput

public org.eclipse.higgins.icard.io.IFormatDescriptor checkInput(InputStream in)
Checks whether this ICardRegistry can recognize data format of the provided input stream. Some formats require authentication information in order to proccess input data. This method should be used prior to actual attempt to import data from the input stream in order to retrieve an information about data format and required authentication data to proccess the data successfully.

Returns:
the information about input stream data format if it was recognized successfully and null otherwise.

importICards

public Iterator importICards(CallbackHandler authHandler,
                             InputStream in,
                             String formatID,
                             org.eclipse.higgins.icard.auth.ICredential credential)
                      throws org.eclipse.higgins.icard.CardException
Imports cards from the provided input stream.

Parameters:
authHandler - the callback handler used to provide user identity
in - the input stream to import from
formatID - the data format of the input stream if available. If null is used all available data formats will be checked in order to import.
credential - the authentication data to proccess the input stream if required
Returns:
Throws:
org.eclipse.higgins.icard.CardException

getFormatProvider

public org.eclipse.higgins.icard.io.IFormatProvider getFormatProvider(String formatID)

getOutputFormats

public org.eclipse.higgins.icard.io.IFormatDescriptor[] getOutputFormats()
Returns an array of IFormatDesctiptors which provide an information about all output formats available.


getICardsByFormat

public Iterator getICardsByFormat(CallbackHandler authHandler,
                                  String formatID)
                           throws org.eclipse.higgins.icard.CardException
Throws:
org.eclipse.higgins.icard.CardException

exportICards

public void exportICards(CallbackHandler authHandler,
                         OutputStream out,
                         String formatID,
                         org.eclipse.higgins.icard.CUID[] cards,
                         org.eclipse.higgins.icard.auth.ICredential credential)
                  throws org.eclipse.higgins.icard.CardException
Throws:
org.eclipse.higgins.icard.CardException

getInstance

public static ICardRegistry getInstance()

getUserProfileService

public org.eclipse.higgins.icard.userprofile.IUserProfileService getUserProfileService()