org.eclipse.higgins.icard.registry
Class ICardRegistry

java.lang.Object
  extended by org.eclipse.higgins.registry.HigginsRegistry
      extended by org.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)
           
 List getCardCreationTemplates(CallbackHandler authHandler)
           
 org.eclipse.higgins.icard.ICardTemplate getCardCreationTemplatesByTUID(CallbackHandler authHandler, org.eclipse.higgins.icard.TUID tuid)
           
 org.eclipse.higgins.registry.IConfiguration getConfiguration(org.eclipse.higgins.registry.IServiceProvider provider)
           
 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)
           
 org.eclipse.higgins.icard.IImportCardInfo[] getImportCardInformation(CallbackHandler authHandler, InputStream in, String formatID, org.eclipse.higgins.icard.auth.ICredential credential)
          Get information about cards which can be imported from the passed source
static ICardRegistry getInstance()
           
 org.eclipse.higgins.icard.io.IFormatDescriptor[] getOutputFormats()
          Returns an array of IFormatDesctiptors which provide an information about all output formats available.
 Iterator importICards(CallbackHandler authHandler, InputStream in, String formatID, org.eclipse.higgins.icard.auth.ICredential credential)
          Imports cards from the provided input stream.
 Iterator importICards(CallbackHandler authHandler, InputStream in, String formatID, org.eclipse.higgins.icard.auth.ICredential credential, Boolean[] importFlag)
          Imports cards from the provided input stream.
 org.eclipse.higgins.icard.ICard persistICard(CallbackHandler authHandler, org.eclipse.higgins.icard.ICard card)
           
 
Methods inherited from class org.eclipse.higgins.registry.HigginsRegistry
addExtension, getProviderType, 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)
              throws org.eclipse.higgins.registry.RegistryConfigurationException
Parameters:
configPath -
Throws:
org.eclipse.higgins.registry.RegistryConfigurationException
Method Detail

getICardProviders

public Iterator getICardProviders()

getICardProvider

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

getCardCreationTemplates

public List getCardCreationTemplates(CallbackHandler authHandler)

getCardCreationTemplatesByTUID

public org.eclipse.higgins.icard.ICardTemplate getCardCreationTemplatesByTUID(CallbackHandler authHandler,
                                                                              org.eclipse.higgins.icard.TUID tuid)
                                                                       throws org.eclipse.higgins.icard.CardException
Throws:
org.eclipse.higgins.icard.CardException

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)
                                                          throws org.eclipse.higgins.icard.io.CardIOException
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.
Throws:
org.eclipse.higgins.icard.io.CardIOException

getImportCardInformation

public org.eclipse.higgins.icard.IImportCardInfo[] getImportCardInformation(CallbackHandler authHandler,
                                                                            InputStream in,
                                                                            String formatID,
                                                                            org.eclipse.higgins.icard.auth.ICredential credential)
                                                                     throws org.eclipse.higgins.icard.CardException
Get information about cards which can be imported from the passed source

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 process the input stream if required
Returns:
Throws:
org.eclipse.higgins.icard.CardException

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 process the input stream if required
Returns:
Throws:
org.eclipse.higgins.icard.CardException

importICards

public Iterator importICards(CallbackHandler authHandler,
                             InputStream in,
                             String formatID,
                             org.eclipse.higgins.icard.auth.ICredential credential,
                             Boolean[] importFlag)
                      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 process the input stream if required
importSign - Indicates whether or not the card from passed InputStream should be imported. If this array by index of card number contains false, then card should be skipped. If array is null, or contains null, or true, than card will be imported
Returns:
Throws:
org.eclipse.higgins.icard.CardException

persistICard

public org.eclipse.higgins.icard.ICard persistICard(CallbackHandler authHandler,
                                                    org.eclipse.higgins.icard.ICard card)
                                             throws org.eclipse.higgins.icard.CardException
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()

getConfiguration

public org.eclipse.higgins.registry.IConfiguration getConfiguration(org.eclipse.higgins.registry.IServiceProvider provider)
                                                             throws org.eclipse.higgins.registry.RegistryConfigurationException
Specified by:
getConfiguration in class org.eclipse.higgins.registry.HigginsRegistry
Throws:
org.eclipse.higgins.registry.RegistryConfigurationException