org.eclipse.higgins.rpps.core.impl
Class RppsService

java.lang.Object
  extended byorg.eclipse.higgins.rpps.core.impl.RppsService
All Implemented Interfaces:
IRppsService

public class RppsService
extends Object
implements IRppsService

The object used for executing Higgins API and returning the results it produces.

Author:
Sergei Yakovlev, Artem Verkhovets

Nested Class Summary
static class RppsService.DummyTrustManagerFactory
           
 
Field Summary
 
Fields inherited from interface org.eclipse.higgins.rpps.core.IRppsService
IPasswordCredential, IPinCodeCredential, ITSKerberosV5Credential, ITSSelfIssuedCredential, ITSSelfIssuedNonPinCredential, ITSUsernamePasswordCredential, ITSX509V3Credential, IUsernamePasswordCredential
 
Constructor Summary
RppsService()
          Creates an RppsService object.
RppsService(String userId, String password)
          Creates an RppsService object and authenticated user.
 
Method Summary
 CategoryTO addCategory(CategoryTO categoryTO)
          Creates a new card's category.
 void addClaimValuesMRU(String claimType, String claimValue)
          Adds most recently used record.
 boolean addRPEndPointCardRelation(String cuid, RPEndPointTO rpEndPointTO)
          Create relation between card and relying party.
 boolean addUrlCardRelation(String cuid, String url)
          Deprecated.  
 ResponseMessage addUserProfile(UserProfileTO userProfile, String password)
          Creates a new user profile.
static void AllowSelfSignedSSL()
           
 void authenticate(String userId, String password)
          Method gets user profile information and prepare authenticated callback handler.
 FormatDescriptorTO checkImportStream(byte[] crd)
          Checks whether RppsService can recognize data format of the provided input stream.
 ICardTO clearCardCredential(String cuid)
          Deletes saved authentication card information for specified card.
 boolean clearCardHistory(String cuid)
          Deletes card history of the specified card on all URLs unless it is checked as "Use Always".
static void ConfigureCache(String configurationBase, String configurationFile)
           
 org.eclipse.higgins.userprofile.entity.Captcha createCaptcha()
          Create new Captcha entity and store it via UserProfileService.
 ICardTO createDuplicateICard(String cardName, String cuid, String pinCode)
          Creates duplicate of personal card only with new card's name.
 ICardTO createICard(ICardTemplateTO template)
          Creates a new card by template.
 String createICardFromHBX(String cardname)
          Deprecated.  
 void deleteAllICard()
          Deletes all user's card.
 void deleteCaptcha(String id)
          Delete Captcha entity via UserProfileService.
 boolean deleteCardHistoryRecord(String cuid, RPEndPointTO rpEndPointTO)
          Delete specified record of card history.
 boolean deleteCardHistoryRecord(String cuid, String url)
          Deprecated.  
 void deleteCategory(String categoryId)
          Delete the card's category.
 ICardUpdateResponseTO deleteICard(String cuid)
          Deletes specified card.
 void deleteOldPassword()
           
 boolean deleteRPEndPointCardRelation(String cuid, RPEndPointTO rpEndPointTO)
          Delete relation between card and relying party.
 boolean deleteRPEndPointsCardsRelations(String cuid)
          Delete relation between card and relying party.
 boolean deleteUrlCardRelation(String cuid, String url)
          Deprecated.  
 boolean deleteUrlsCardsRelations(String cuid)
          Deprecated.  
 ResponseMessage deleteUserProfile()
          Deletes user profile.
 ICardTO editPinCode(String cuid, String oldPinCode, String newPinCode)
          Changes pin code for personal card.
 byte[] exportICards(String formatID, String[] cards, UITokenServiceCredentialTO credential)
          Returns file as byte array with special which contains select cards.
 void generatePasswordResetCode(String userIdentifier)
          Generate and send user email with new password reset code.
 org.eclipse.higgins.userprofile.entity.Captcha getCaptcha(String id)
          Retrieve Captcha entity via UserProfileService.
 CardUsageTO[] getCardHistory(String cuid, int startFrom, int size, String orderBy, String orderDirection)
          Return list of card history records, beginning at the specified position in selection.
 CardUsageTO[] getCardHistoryLog(String cuid, int startFrom, int size, String orderBy, String orderDirection)
           
 CardInformationTO getCardInformation(String cuid, int size)
          Gets card information object.
 CategoryTO[] getCategory()
          Gets list of card categories.
 MapTO[] getClaimValuesMRU()
          Gets most recently used records.
 ICardTO getDefaultPCard()
          Return default personal card.
 CallbackHandler getHandler()
           
 String getHigginsServiceGlobalIName()
          Gets the global i-name registered to the Higgins service (e.g.
 ICardTO getICardByCUID(String cuid)
          Gets a card by CUID.
 ICardTO getICardByCUIDAndTokenServiceCredential(String cuid, UITokenServiceCredentialTO tokenCredential)
          Gets a card by CUID and Credential.
 UIResponseCardTO getICardClaims(String cuid, String policy, String typeofCredential, String[] credentialKey, String[] credentialValue)
          Deprecated.  
 UIResponseCardTO getICardClaims(String cuid, String policy, String typeofCredential, String[] credentialKey, String[] credentialValue, RPEndPointTO rpEndPointTO)
          Created for some demo.
 ICardTemplateTO[] getICardCreationTemplate()
          Return templates for creating cards
 org.eclipse.higgins.icard.ICardTemplate[] getICardCreationTemplateByProvider(String extID)
          This method return list of card creation template by provider id.
 ICardTemplateTO getICardCreationTemplateByTUID(String tuid)
          Return templates for creating cards.
 org.eclipse.higgins.icard.ICardTemplate getICardCreationTemplateByTUID(org.eclipse.higgins.icard.TUID tuid)
          Return templates for creating cards.
 ICardsAndCategoryTO getICardsAndCategoriesByUser()
          Gets the card and category lists of the specified user.
 ICardTO[] getICardsByCUIDs(String[] cuids)
          Gets cards by CUIDs array.
 ICardTO[] getICardsByFormat(String formatID)
          Gets cards which may be export to special file format.
 ICardResponseTO getICardsByUser()
          Gets the card list of the specified user.
static IRppsService getInstance()
          Creates an RppsService object.
static IRppsService getInstance(String userId, String password)
          Creates an RppsService object.
 FormatDescriptorTO[] getOutputFormats()
          Gets available file format for cards export.
 TokenResponseTO getTokenByClaims(String sslCert, String[] claimName, String[] claimValue)
          Makes xmlToken usage claim list.
 TokenResponseTO getTokenByRPEndPoint(String policy, String policytype, String sslCert, RPEndPointTO rpEndPointTO)
          Web service operation.
 TokenResponseTO getTokenByUrl(String policy, String policytype, String sslCert, String url)
          Deprecated.  
 ExtraTokenResponseTO getTokenExtraByRPEndPoint(String policy, String policytype, String sslCert, RPEndPointTO rpEndPointTO)
          Web service operation.
 ExtraTokenResponseTO getTokenExtraByUrl(String policy, String policytype, String sslCert, String url)
          Deprecated.  
 TokenResponseTO getTokenObject(String policy, String policytype, String sslCert, String[] cuids, String typeofCredential, String[] credentialKey, String[] credentialValue)
          Deprecated.  
 TokenResponseTO getTokenObject(String policy, String policytype, String sslCert, String[] cuids, String typeofCredential, String[] credentialKey, String[] credentialValue, RPEndPointTO rpEndPointTO)
          Web service operation.
 UIResponseTO getUserInterface(RPEndPointTO rpEndPointTO, String target, String sslCert, String policytype, String policy)
          This method takes as input a policy---for example, one that has been retrieved from the Relying Party Agent (called here the 'Requester')---as well as a description of the Requester.
 UIResponseTO getUserInterface(String url, String target, String sslCert, String policytype, String policy)
          Deprecated.  
 UserProfileTO getUserProfile()
          Gets user profile as a UserProfileTO.
 ICardResponseTO importICards(byte[] crd)
          Imports card from a file.
 ICardResponseTO importICards(byte[] crd, String formatID, UITokenServiceCredentialTO credential)
          Imports card from a file.
 ResponseMessage modifyCategories(CategoryTO[] categoriesTO)
          Modifies list of card's category.
 CategoryTO modifyCategory(CategoryTO categoryTO)
          Modifies the card's category.
 void modifyPasswordWithOldPassword(String userIdentifier, String oldPassword, String newPassword)
          Update user password, requires oldPassword for identify.
 void modifyPasswordWithPasswordResetCode(String userIdentifier, String passwordResetCode, String newPassword)
          Update user password, requires password reset code for identify.
 UserProfileTO modifyUserProfile(UserProfileTO userProfile)
          Update user profile.
 void removeClaimValuesMRU(String claimType, String claimValue)
          Deletes most recently used record.
 ICardTO resetPinCode(String cuid, String oldPinCode)
          Remove pin code protection from personal card.
static String resolveUserIdentifier(String privateSelectorINumber)
           
 boolean setCardCredential(String cuid, UITokenServiceCredentialTO tokenCredential)
          Saves authentication card information of the specified card.
 void setDefaultPCard(String pcardId)
          Set default personal card.
 void setHandler(CallbackHandler handler)
           
 void setNewPrivateUserPassword(String newPassword)
           
 ICardTO setPinCode(String cuid, String pinCode)
          Sets pin code protection on personal card.
 ICardUpdateResponseTO[] updateClaimsAcrossCards(String[] claimTypes, String[] claimValues, ICardUpdateTO[] cardUpdate)
          Update claim across cards.
 ICardTO updateICard(ICardTO icardTO)
          Update card.
 ICardUpdateResponseTO[] updateICards(ICardTO[] icardTOList)
          Update card.
 boolean userIdentifierExists(String userIdentifier)
          Checks availability of user profile by userIdentifier
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RppsService

public RppsService()
Creates an RppsService object.


RppsService

public RppsService(String userId,
                   String password)
            throws AccessException
Creates an RppsService object and authenticated user.

Parameters:
userId - the id to identify the user.
password - the password to identify the user.
Throws:
AccessException - some situation
Method Detail

AllowSelfSignedSSL

public static void AllowSelfSignedSSL()

ConfigureCache

public static void ConfigureCache(String configurationBase,
                                  String configurationFile)

getInstance

public static IRppsService getInstance()
Creates an RppsService object.

Returns:
the RppsService object

getInstance

public static IRppsService getInstance(String userId,
                                       String password)
                                throws AccessException
Creates an RppsService object.

Parameters:
userId - the id to identify the user.
password - the password to identify the user.
Returns:
the RppsService object
Throws:
AccessException - some situation

resolveUserIdentifier

public static String resolveUserIdentifier(String privateSelectorINumber)
Parameters:
privateSelectorINumber - privateSelectorINumber
Returns:
userIdentifer

addCategory

public CategoryTO addCategory(CategoryTO categoryTO)
                       throws RppsException
Creates a new card's category.

Specified by:
addCategory in interface IRppsService
Parameters:
categoryTO - the card category information
Returns:
Returns saved card category object
Throws:
RppsException - some situation

addClaimValuesMRU

public void addClaimValuesMRU(String claimType,
                              String claimValue)
                       throws RppsException
Adds most recently used record.

Specified by:
addClaimValuesMRU in interface IRppsService
Parameters:
claimType - claim's type
claimValue - claim's value
Throws:
RppsException - some situation

addUrlCardRelation

public boolean addUrlCardRelation(String cuid,
                                  String url)
                           throws RppsException,
                                  org.eclipse.higgins.userprofile.UserProfileException
Deprecated.  

Create relation between card and url.

Specified by:
addUrlCardRelation in interface IRppsService
Parameters:
cuid - the icard's CUID
url - the url of site
Returns:
Returns true if relation was added. Otherwise false
Throws:
RppsException - some situation
org.eclipse.higgins.userprofile.UserProfileException

addRPEndPointCardRelation

public boolean addRPEndPointCardRelation(String cuid,
                                         RPEndPointTO rpEndPointTO)
                                  throws RppsException,
                                         org.eclipse.higgins.userprofile.UserProfileException
Create relation between card and relying party.

Specified by:
addRPEndPointCardRelation in interface IRppsService
Parameters:
cuid - the icard's CUID
rpEndPointTO - the object which represents logging form on relying party
Returns:
Returns true if relation was added. Otherwise false
Throws:
RppsException - some situation
org.eclipse.higgins.userprofile.UserProfileException - some situation

addUserProfile

public ResponseMessage addUserProfile(UserProfileTO userProfile,
                                      String password)
                               throws RppsException
Creates a new user profile.

Specified by:
addUserProfile in interface IRppsService
Parameters:
userProfile - the user profile information.
password - the password to identify the user.
Returns:
Returns ResponseMessage with code field equals 0 if profile was added. Otherwise returns ResponseMessage with error code or throws an RemoteException
Throws:
RppsException - some situation

authenticate

public void authenticate(String userId,
                         String password)
                  throws AccessException
Method gets user profile information and prepare authenticated callback handler.

Parameters:
userId - the id to identify the user.
password - the password to identify the user.
Throws:
AccessException - some situation

checkImportStream

public FormatDescriptorTO checkImportStream(byte[] crd)
                                     throws RppsException
Checks whether RppsService can recognize data format of the provided input stream. Some formats require authentication information in order to process 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 process the data successfully.

Specified by:
checkImportStream in interface IRppsService
Parameters:
crd - context of file as byte array
Returns:
the information about input stream data format if it was recognized successfully and null otherwise.
Throws:
RppsException - some situation

clearCardCredential

public ICardTO clearCardCredential(String cuid)
                            throws RppsException
Deletes saved authentication card information for specified card.

Specified by:
clearCardCredential in interface IRppsService
Parameters:
cuid - the icard's CUID
Returns:
Returns updated card object
Throws:
RppsException - some situation

clearCardHistory

public boolean clearCardHistory(String cuid)
                         throws RppsException
Deletes card history of the specified card on all URLs unless it is checked as "Use Always".

Specified by:
clearCardHistory in interface IRppsService
Parameters:
cuid - the icard's CUID
Returns:
Returns true if card history was cleared. Otherwise false
Throws:
RppsException - some situation

createDuplicateICard

public ICardTO createDuplicateICard(String cardName,
                                    String cuid,
                                    String pinCode)
                             throws RppsException
Creates duplicate of personal card only with new card's name.

Specified by:
createDuplicateICard in interface IRppsService
Parameters:
cardName - new card's name
cuid - the old icard's cuid
pinCode - pinCode for retrieve claims of personal card if that is pin protected. Otherwise null
Returns:
Returns updated card object
Throws:
RppsException - some situation

createICard

public ICardTO createICard(ICardTemplateTO template)
                    throws RppsException
Creates a new card by template.

Specified by:
createICard in interface IRppsService
Parameters:
template - the icard's template
Returns:
a new card object
Throws:
RemoteException
RppsException

createICardFromHBX

public String createICardFromHBX(String cardname)
                          throws RppsException
Deprecated.  

Creates a new card for HBX.

Specified by:
createICardFromHBX in interface IRppsService
Parameters:
cardname - the card's name
Returns:
a new card's cuid
Throws:
RppsException - some situation

deleteAllICard

public void deleteAllICard()
                    throws RppsException
Deletes all user's card.

Specified by:
deleteAllICard in interface IRppsService
Throws:
RppsException - some situation

deleteCardHistoryRecord

public boolean deleteCardHistoryRecord(String cuid,
                                       String url)
                                throws RppsException
Deprecated.  

Delete specified record of card history.

Specified by:
deleteCardHistoryRecord in interface IRppsService
Parameters:
cuid - the icard's CUID
url - url of site which will be deleted from card history
Returns:
Returns true if card history record was deleted. Otherwise false
Throws:
RppsException - some situation

deleteCardHistoryRecord

public boolean deleteCardHistoryRecord(String cuid,
                                       RPEndPointTO rpEndPointTO)
                                throws RppsException
Delete specified record of card history.

Specified by:
deleteCardHistoryRecord in interface IRppsService
Parameters:
cuid - the icard's CUID
rpEndPointTO - the object which represents logging form on relying party
Returns:
Returns true if card history record was deleted. Otherwise false
Throws:
RppsException - some situation

deleteCategory

public void deleteCategory(String categoryId)
                    throws RppsException
Delete the card's category.

Specified by:
deleteCategory in interface IRppsService
Parameters:
categoryId - category identifier
Throws:
RppsException - some situation

deleteICard

public ICardUpdateResponseTO deleteICard(String cuid)
                                  throws RppsException
Deletes specified card.

Specified by:
deleteICard in interface IRppsService
Parameters:
cuid - the icard's CUID
Returns:
Returns ICardUpdateResponseTO which contains delete status for card. If code field equals 0 then card was updated correctly. Otherwise code field contains error code. If deleted card had self signed type then cuid field contains cuid of personal card which had been used to signed managed card.
Throws:
RppsException - some situation

deleteOldPassword

public void deleteOldPassword()
                       throws org.eclipse.higgins.userprofile.UserProfileException
Specified by:
deleteOldPassword in interface IRppsService
Throws:
org.eclipse.higgins.userprofile.UserProfileException

deleteRPEndPointCardRelation

public boolean deleteRPEndPointCardRelation(String cuid,
                                            RPEndPointTO rpEndPointTO)
                                     throws RppsException
Delete relation between card and relying party.

Specified by:
deleteRPEndPointCardRelation in interface IRppsService
Parameters:
cuid - the icard's CUID
rpEndPointTO - the object which represents logging form on relying party
Returns:
Returns true if relation was deleted. Otherwise false
Throws:
RppsException - some situation

deleteUrlCardRelation

public boolean deleteUrlCardRelation(String cuid,
                                     String url)
                              throws RppsException
Deprecated.  

Delete relation between card and site's url.

Specified by:
deleteUrlCardRelation in interface IRppsService
Parameters:
cuid - the icard's CUID
url - the url of site
Returns:
Returns true if relation was deleted. Otherwise false
Throws:
RppsException - some situation

deleteUrlsCardsRelations

public boolean deleteUrlsCardsRelations(String cuid)
                                 throws RppsException
Deprecated.  

Delete all relations between card and site's urls.

Specified by:
deleteUrlsCardsRelations in interface IRppsService
Parameters:
cuid - the icard's CUID
Returns:
Returns true if relations were deleted. Otherwise false
Throws:
RppsException - some situation

deleteRPEndPointsCardsRelations

public boolean deleteRPEndPointsCardsRelations(String cuid)
                                        throws RppsException
Delete relation between card and relying party.

Specified by:
deleteRPEndPointsCardsRelations in interface IRppsService
Parameters:
cuid - the icard's CUID
Returns:
Returns true if relation was deleted. Otherwise false
Throws:
RppsException - some situation

deleteUserProfile

public ResponseMessage deleteUserProfile()
                                  throws RppsException
Deletes user profile.

Specified by:
deleteUserProfile in interface IRppsService
Returns:
ResponseMessage
Throws:
RppsException - some situation

editPinCode

public ICardTO editPinCode(String cuid,
                           String oldPinCode,
                           String newPinCode)
                    throws RppsException
Changes pin code for personal card.

Specified by:
editPinCode in interface IRppsService
Parameters:
cuid - the icard's CUID
oldPinCode - Old pin code
newPinCode - New pin code
Returns:
Returns updated card object
Throws:
RppsException - some situation

exportICards

public byte[] exportICards(String formatID,
                           String[] cards,
                           UITokenServiceCredentialTO credential)
                    throws RppsException
Returns file as byte array with special which contains select cards.

Specified by:
exportICards in interface IRppsService
Parameters:
formatID - file's format identifier
cards - the icard's CUIDs
credential - authentication information
Returns:
array of byte
Throws:
RppsException - some situation

getCardHistory

public CardUsageTO[] getCardHistory(String cuid,
                                    int startFrom,
                                    int size,
                                    String orderBy,
                                    String orderDirection)
Return list of card history records, beginning at the specified position in selection.

Specified by:
getCardHistory in interface IRppsService
Parameters:
cuid - the icard's CUID
startFrom - starting position in the selection
size - count of record which will be returned
orderBy - name of field which be used for sorting. Can take one of these values: "date"," site","useAlways"
orderDirection - If value of this parameter is "desc" then result will be sorted in descending order. Otherwise in ascending order.
Returns:
array of CardUsageTO
Throws:
RppsException - some situation

getCardHistoryLog

public CardUsageTO[] getCardHistoryLog(String cuid,
                                       int startFrom,
                                       int size,
                                       String orderBy,
                                       String orderDirection)

getCardInformation

public CardInformationTO getCardInformation(String cuid,
                                            int size)
                                     throws RppsException
Gets card information object.

Specified by:
getCardInformation in interface IRppsService
Parameters:
cuid - the icard's CUID
size - count of card history element which will be returned
Returns:
Return card information object
Throws:
RppsException - some situation

getCategory

public CategoryTO[] getCategory()
                         throws RppsException
Description copied from interface: IRppsService
Gets list of card categories.

Specified by:
getCategory in interface IRppsService
Returns:
Throws:
RppsException - some situation

getClaimValuesMRU

public MapTO[] getClaimValuesMRU()
                          throws RppsException
Description copied from interface: IRppsService
Gets most recently used records.

Specified by:
getClaimValuesMRU in interface IRppsService
Returns:
Returns array of MapTO
Throws:
RppsException

getHandler

public CallbackHandler getHandler()

getHigginsServiceGlobalIName

public String getHigginsServiceGlobalIName()
Gets the global i-name registered to the Higgins service (e.g. "=parity").

Specified by:
getHigginsServiceGlobalIName in interface IRppsService
Returns:
the global i-name.

getICardByCUID

public ICardTO getICardByCUID(String cuid)
                       throws RppsException
Gets a card by CUID.

Specified by:
getICardByCUID in interface IRppsService
Parameters:
cuid - the card CUID.
Returns:
the card transfer object.
Throws:
RppsException

getICardByCUIDAndTokenServiceCredential

public ICardTO getICardByCUIDAndTokenServiceCredential(String cuid,
                                                       UITokenServiceCredentialTO tokenCredential)
                                                throws RppsException,
                                                       org.eclipse.higgins.icard.provider.cardspace.common.STSFaultException
Gets a card by CUID and Credential.

Specified by:
getICardByCUIDAndTokenServiceCredential in interface IRppsService
Parameters:
cuid - the card CUID.
tokenCredential - the tokenCredential transfer object
Returns:
the card transfer object.
Throws:
RppsException
org.eclipse.higgins.icard.provider.cardspace.common.STSFaultException

getICardClaims

public UIResponseCardTO getICardClaims(String cuid,
                                       String policy,
                                       String typeofCredential,
                                       String[] credentialKey,
                                       String[] credentialValue)
                                throws RppsException
Deprecated.  

Created for some demo.

Specified by:
getICardClaims in interface IRppsService
Parameters:
cuid - the card's cuid.
policy -
typeofCredential -
credentialKey -
credentialValue -
Returns:
UIResponseCardTO
Throws:
RppsException

getICardClaims

public UIResponseCardTO getICardClaims(String cuid,
                                       String policy,
                                       String typeofCredential,
                                       String[] credentialKey,
                                       String[] credentialValue,
                                       RPEndPointTO rpEndPointTO)
                                throws RppsException
Created for some demo.

Specified by:
getICardClaims in interface IRppsService
Parameters:
cuid - the card's cuid.
policy -
typeofCredential -
credentialKey -
credentialValue -
rpEndPointTO - the object which represents logging form on relying party
Returns:
UIResponseCardTO
Throws:
RppsException

getICardCreationTemplate

public ICardTemplateTO[] getICardCreationTemplate()
Return templates for creating cards

Specified by:
getICardCreationTemplate in interface IRppsService
Returns:
a template list

getICardCreationTemplateByProvider

public org.eclipse.higgins.icard.ICardTemplate[] getICardCreationTemplateByProvider(String extID)
                                                                             throws RppsException
This method return list of card creation template by provider id.

Specified by:
getICardCreationTemplateByProvider in interface IRppsService
Parameters:
extID - the id to identify the card provider.
Returns:
a template list as array of ICardTemplateTO
Throws:
RppsException

getICardCreationTemplateByTUID

public ICardTemplateTO getICardCreationTemplateByTUID(String tuid)
                                               throws RppsException
Return templates for creating cards.

Returns:
a template list
Throws:
RppsException

getICardCreationTemplateByTUID

public org.eclipse.higgins.icard.ICardTemplate getICardCreationTemplateByTUID(org.eclipse.higgins.icard.TUID tuid)
                                                                       throws org.eclipse.higgins.icard.CardException
Return templates for creating cards.

Returns:
a template list
Throws:
org.eclipse.higgins.icard.CardException

getICardsAndCategoriesByUser

public ICardsAndCategoryTO getICardsAndCategoriesByUser()
                                                 throws RppsException
Gets the card and category lists of the specified user.

Specified by:
getICardsAndCategoriesByUser in interface IRppsService
Returns:
the card list
Throws:
RppsException

getICardsByCUIDs

public ICardTO[] getICardsByCUIDs(String[] cuids)
Gets cards by CUIDs array.

Specified by:
getICardsByCUIDs in interface IRppsService
Parameters:
cuids - the card CUIDs.
Returns:
list of cards transfer object.

getICardsByFormat

public ICardTO[] getICardsByFormat(String formatID)
                            throws RppsException
Gets cards which may be export to special file format.

Specified by:
getICardsByFormat in interface IRppsService
Parameters:
formatID - the id of format file
Returns:
list of cards as a array of CardTO
Throws:
RppsException

getICardsByUser

public ICardResponseTO getICardsByUser()
Gets the card list of the specified user.

Specified by:
getICardsByUser in interface IRppsService
Returns:
the card list

getOutputFormats

public FormatDescriptorTO[] getOutputFormats()
                                      throws RppsException
Gets available file format for cards export.

Specified by:
getOutputFormats in interface IRppsService
Returns:
array of FormatDescriptorTO
Throws:
RppsException

getTokenByClaims

public TokenResponseTO getTokenByClaims(String sslCert,
                                        String[] claimName,
                                        String[] claimValue)
                                 throws RppsException
Makes xmlToken usage claim list.

Specified by:
getTokenByClaims in interface IRppsService
Parameters:
sslCert - the SSL certificate
claimName - the array which contains claim names
claimValue - the array which contains claim values
Returns:
the security token transfer object
Throws:
RppsException - some situation

getTokenByUrl

public TokenResponseTO getTokenByUrl(String policy,
                                     String policytype,
                                     String sslCert,
                                     String url)
                              throws RppsException
Deprecated.  

Web service operation. Makes security token usage saved users information

Specified by:
getTokenByUrl in interface IRppsService
Parameters:
policy - the RP Agent's Relying Party Security Policy
policytype - the RP Security Policy type
sslCert - the SSL certificate
url - the url of site which needs token
Returns:
the security token transfer object
Throws:
RemoteException
RppsException

getTokenByRPEndPoint

public TokenResponseTO getTokenByRPEndPoint(String policy,
                                            String policytype,
                                            String sslCert,
                                            RPEndPointTO rpEndPointTO)
                                     throws RppsException
Web service operation. Makes security token usage saved users information

Specified by:
getTokenByRPEndPoint in interface IRppsService
Parameters:
policy - the RP Agent's Relying Party Security Policy
policytype - the RP Security Policy type
sslCert - the SSL certificate
rpEndPointTO - the object which represents logging form on relying party
Returns:
the security token transfer object
Throws:
RemoteException
RppsException

getTokenExtraByRPEndPoint

public ExtraTokenResponseTO getTokenExtraByRPEndPoint(String policy,
                                                      String policytype,
                                                      String sslCert,
                                                      RPEndPointTO rpEndPointTO)
                                               throws RppsException
Web service operation. Makes security token usage saved users information

Specified by:
getTokenExtraByRPEndPoint in interface IRppsService
Parameters:
policy - the RP Agent's Relying Party Security Policy
policytype - the RP Security Policy type
sslCert - the SSL certificate
rpEndPointTO - the object which represents logging form on relying party
Returns:
the security token transfer object
Throws:
RemoteException
RppsException

getTokenExtraByUrl

public ExtraTokenResponseTO getTokenExtraByUrl(String policy,
                                               String policytype,
                                               String sslCert,
                                               String url)
                                        throws RppsException
Deprecated.  

Web service operation. Makes security token usage saved users information

Specified by:
getTokenExtraByUrl in interface IRppsService
Parameters:
policy - the RP Agent's Relying Party Security Policy
policytype - the RP Security Policy type
sslCert - the SSL certificate
url - the url of site which needs token
Returns:
the security token transfer object
Throws:
RemoteException
RppsException

getTokenObject

public TokenResponseTO getTokenObject(String policy,
                                      String policytype,
                                      String sslCert,
                                      String[] cuids,
                                      String typeofCredential,
                                      String[] credentialKey,
                                      String[] credentialValue,
                                      RPEndPointTO rpEndPointTO)
                               throws RppsException
Web service operation. Given the Relying Party Agent (aka 'Requester')'s policy, identity information about the requester, and the set of one or more selections that the user has just made in the ISS Web UI (see userInterfaceRequest), AND presuming that the protocol involved in interacting with the RPA requires a security token, request the token that corresponds to the user's selection(s).

Specified by:
getTokenObject in interface IRppsService
Parameters:
policy - the RP Agent's Relying Party Security Policy
policytype - the RP Security Policy type
sslCert - the SSL certificate
cuids - the user-selected subset of the UIDs (handles) contained in the UserInterfaceResponse object returned from an earlier invocation of 'userInterfaceRequest'
typeofCredential - the type of selected credential
credentialKey - the names of fields of selected credential
credentialValue - the value of fields of selected credential
rpEndPointTO - the object which represents logging form on relying party
Returns:
the security token transfer object
Throws:
RemoteException
RppsException

getTokenObject

public TokenResponseTO getTokenObject(String policy,
                                      String policytype,
                                      String sslCert,
                                      String[] cuids,
                                      String typeofCredential,
                                      String[] credentialKey,
                                      String[] credentialValue)
                               throws RppsException
Deprecated.  

Web service operation. Given the Relying Party Agent (aka 'Requester')'s policy, identity information about the requester, and the set of one or more selections that the user has just made in the ISS Web UI (see userInterfaceRequest), AND presuming that the protocol involved in interacting with the RPA requires a security token, request the token that corresponds to the user's selection(s).

Specified by:
getTokenObject in interface IRppsService
Parameters:
policy - the RP Agent's Relying Party Security Policy
policytype - the RP Security Policy type
sslCert - the SSL certificate
cuids - the user-selected subset of the UIDs (handles) contained in the UserInterfaceResponse object returned from an earlier invocation of 'userInterfaceRequest'
typeofCredential - the type of selected credential
credentialKey - the names of fields of selected credential
credentialValue - the value of fields of selected credential
Returns:
the security token transfer object
Throws:
RemoteException
RppsException

getUserInterface

public UIResponseTO getUserInterface(RPEndPointTO rpEndPointTO,
                                     String target,
                                     String sslCert,
                                     String policytype,
                                     String policy)
                              throws RppsException
This method takes as input a policy---for example, one that has been retrieved from the Relying Party Agent (called here the 'Requester')---as well as a description of the Requester. The UserInterfaceResponse object should contain all information necessary to display both (a) a user interface which shares the same card metaphor, sequences of experiences and decision points (the ceremony) of CardSpace and (b) other interface paradigms to be developed in the future

Specified by:
getUserInterface in interface IRppsService
Parameters:
target -
sslCert - the SSL certificate
policy - the RP Agent's Relying Party Security Policy
rpEndPointTO - the object which represents logging form on relying party
policytype - the RP Security Policy type
Returns:
the UIResponseTO transfer object.
Throws:
RemoteException
RppsException

getUserInterface

public UIResponseTO getUserInterface(String url,
                                     String target,
                                     String sslCert,
                                     String policytype,
                                     String policy)
                              throws RppsException
Deprecated.  

This method takes as input a policy---for example, one that has been retrieved from the Relying Party Agent (called here the 'Requester')---as well as a description of the Requester. The UserInterfaceResponse object should contain all information necessary to display both (a) a user interface which shares the same card metaphor, sequences of experiences and decision points (the ceremony) of CardSpace and (b) other interface paradigms to be developed in the future

Specified by:
getUserInterface in interface IRppsService
Parameters:
url - the URL to the html page with tag
target -
sslCert - the SSL certificate
policy - the RP Agent's Relying Party Security Policy
policytype - the RP Security Policy type
Returns:
the UIResponseTO transfer object.
Throws:
RemoteException
RppsException

getUserProfile

public UserProfileTO getUserProfile()
                             throws RppsException,
                                    AccessException
Description copied from interface: IRppsService
Gets user profile as a UserProfileTO.

Specified by:
getUserProfile in interface IRppsService
Returns:
user profile information
Throws:
AccessException
RppsException

importICards

public ICardResponseTO importICards(byte[] crd)
                             throws RppsException
Imports card from a file.

Specified by:
importICards in interface IRppsService
Parameters:
crd - the card as a byte array.
Returns:
ICardResponseTO
Throws:
RppsException

importICards

public ICardResponseTO importICards(byte[] crd,
                                    String formatID,
                                    UITokenServiceCredentialTO credential)
                             throws RppsException
Imports card from a file.

Specified by:
importICards in interface IRppsService
Parameters:
crd - the card as a byte array.
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:
ICardResponseTO
Throws:
RppsException

modifyCategories

public ResponseMessage modifyCategories(CategoryTO[] categoriesTO)
                                 throws RppsException
Description copied from interface: IRppsService
Modifies list of card's category.

Specified by:
modifyCategories in interface IRppsService
Parameters:
categoriesTO - list of card's category
Returns:
Returns ResponseMessage with code field equals 0 if categories were updated. Otherwise returns ResponseMessage with error code or throws an RppsException
Throws:
RppsException

modifyCategory

public CategoryTO modifyCategory(CategoryTO categoryTO)
                          throws RppsException
Description copied from interface: IRppsService
Modifies the card's category.

Specified by:
modifyCategory in interface IRppsService
Parameters:
categoryTO - category transfer object
Returns:
Returns modified category
Throws:
RppsException

modifyUserProfile

public UserProfileTO modifyUserProfile(UserProfileTO userProfile)
                                throws RppsException
Update user profile.

Specified by:
modifyUserProfile in interface IRppsService
Parameters:
userProfile - user profile transfer object
Returns:
user profile transfer object
Throws:
RppsException - some situation

removeClaimValuesMRU

public void removeClaimValuesMRU(String claimType,
                                 String claimValue)
                          throws RppsException
Description copied from interface: IRppsService
Deletes most recently used record.

Specified by:
removeClaimValuesMRU in interface IRppsService
Parameters:
claimType - claim's type
claimValue - claim's value
Throws:
RppsException

resetPinCode

public ICardTO resetPinCode(String cuid,
                            String oldPinCode)
                     throws RppsException
Description copied from interface: IRppsService
Remove pin code protection from personal card.

Specified by:
resetPinCode in interface IRppsService
Parameters:
cuid - the icard's CUID
oldPinCode - pin code
Returns:
Returns updated card object
Throws:
RppsException

setCardCredential

public boolean setCardCredential(String cuid,
                                 UITokenServiceCredentialTO tokenCredential)
                          throws RppsException
Description copied from interface: IRppsService
Saves authentication card information of the specified card.

Specified by:
setCardCredential in interface IRppsService
Parameters:
cuid - the icard's CUID
tokenCredential - authentication card information
Returns:
Returns true if card credential was set. Otherwise false
Throws:
RppsException

setHandler

public void setHandler(CallbackHandler handler)

setNewPrivateUserPassword

public void setNewPrivateUserPassword(String newPassword)
                               throws org.eclipse.higgins.userprofile.UserProfileException
Specified by:
setNewPrivateUserPassword in interface IRppsService
Throws:
org.eclipse.higgins.userprofile.UserProfileException

setPinCode

public ICardTO setPinCode(String cuid,
                          String pinCode)
                   throws RppsException
Description copied from interface: IRppsService
Sets pin code protection on personal card.

Specified by:
setPinCode in interface IRppsService
Parameters:
cuid - the icard's CUID
pinCode - pin code
Returns:
Returns updated card object
Throws:
RppsException

updateClaimsAcrossCards

public ICardUpdateResponseTO[] updateClaimsAcrossCards(String[] claimTypes,
                                                       String[] claimValues,
                                                       ICardUpdateTO[] cardUpdate)
                                                throws RppsException
Update claim across cards.

Specified by:
updateClaimsAcrossCards in interface IRppsService
Parameters:
claimTypes - array of claim's types
claimValues - array of claim's types. Must be in the same order as claimTypes
cardUpdate - array of ICardUpdateTO
Returns:
Return array of ICardUpdateResponseTO which contains update status for every card. If code field equals 0 then card was updated correctly. Otherwise code field contains error code
Throws:
RppsException

updateICard

public ICardTO updateICard(ICardTO icardTO)
                    throws RppsException
Update card.

Specified by:
updateICard in interface IRppsService
Parameters:
icardTO - the card transfer object.
Returns:
the card transfer object.
Throws:
RppsException

updateICards

public ICardUpdateResponseTO[] updateICards(ICardTO[] icardTOList)
                                     throws RppsException
Update card.

Specified by:
updateICards in interface IRppsService
Parameters:
icardTOList - list of cards which may be updated
Returns:
the card transfer object.
Throws:
RppsException

userIdentifierExists

public boolean userIdentifierExists(String userIdentifier)
Checks availability of user profile by userIdentifier

Specified by:
userIdentifierExists in interface IRppsService
Parameters:
userIdentifier -
Returns:
Returns true if user identifier exists. Otherwise false
Throws:
RppsException - some situation

getDefaultPCard

public ICardTO getDefaultPCard()
                        throws RppsException
Description copied from interface: IRppsService
Return default personal card. This method is part of workflow ' Instant credential m-Cards' http://graceland.parityinc.net:8090/browse/WWM-1150

Specified by:
getDefaultPCard in interface IRppsService
Returns:
default pcard or null if user doesn't have default pcard
Throws:
RppsException

setDefaultPCard

public void setDefaultPCard(String pcardId)
                     throws RppsException
Description copied from interface: IRppsService
Set default personal card. This method is part of workflow ' Instant credential m-Cards' http://graceland.parityinc.net:8090/browse/WWM-1150 if pcardId is null or empty string it just removes old default pcard.

Specified by:
setDefaultPCard in interface IRppsService
Parameters:
pcardId - personal card id (cuid)
Throws:
RppsException - if coudn't find pcardId throw RppsException

generatePasswordResetCode

public void generatePasswordResetCode(String userIdentifier)
                               throws RppsException
Description copied from interface: IRppsService
Generate and send user email with new password reset code. This method is part of reset user password work-flow.

Specified by:
generatePasswordResetCode in interface IRppsService
Parameters:
userIdentifier - user login name
Returns:
UserProfile with new generated password reset code
Throws:
RppsException
See Also:
WWM-1264 RPPS Changes for password reset http://graceland.parityinc.net:8090/browse/WWM-1264

modifyPasswordWithPasswordResetCode

public void modifyPasswordWithPasswordResetCode(String userIdentifier,
                                                String passwordResetCode,
                                                String newPassword)
                                         throws RppsException
Description copied from interface: IRppsService
Update user password, requires password reset code for identify. This method is part of reset user password work-flow.

Specified by:
modifyPasswordWithPasswordResetCode in interface IRppsService
Parameters:
userIdentifier -
newPassword -
passwordResetCode -
Throws:
RppsException
See Also:
WWM-1264 RPPS Changes for password reset http://graceland.parityinc.net:8090/browse/WWM-1264

modifyPasswordWithOldPassword

public void modifyPasswordWithOldPassword(String userIdentifier,
                                          String oldPassword,
                                          String newPassword)
                                   throws RppsException
Description copied from interface: IRppsService
Update user password, requires oldPassword for identify. This method is part of reset user password work-flow.

Specified by:
modifyPasswordWithOldPassword in interface IRppsService
Parameters:
userIdentifier -
oldPassword -
newPassword -
Throws:
RppsException
See Also:
WWM-1264 RPPS Changes for password reset http://graceland.parityinc.net:8090/browse/WWM-1264

createCaptcha

public org.eclipse.higgins.userprofile.entity.Captcha createCaptcha()
                                                             throws RppsException
Description copied from interface: IRppsService
Create new Captcha entity and store it via UserProfileService. This method is part of reset user password work-flow.

Specified by:
createCaptcha in interface IRppsService
Returns:
Captcha
Throws:
RppsException
See Also:
WWM-1264 RPPS Changes for password reset http://graceland.parityinc.net:8090/browse/WWM-1264

getCaptcha

public org.eclipse.higgins.userprofile.entity.Captcha getCaptcha(String id)
                                                          throws RppsException
Description copied from interface: IRppsService
Retrieve Captcha entity via UserProfileService. This method is part of reset user password work-flow.

Specified by:
getCaptcha in interface IRppsService
Parameters:
id - entity Id
Returns:
Captcha entity
Throws:
RppsException
See Also:
WWM-1264 RPPS Changes for password reset http://graceland.parityinc.net:8090/browse/WWM-1264

deleteCaptcha

public void deleteCaptcha(String id)
                   throws RppsException
Description copied from interface: IRppsService
Delete Captcha entity via UserProfileService. This method is part of reset user password work-flow.

Specified by:
deleteCaptcha in interface IRppsService
Parameters:
id -
Throws:
RppsException
See Also:
WWM-1264 RPPS Changes for password reset http://graceland.parityinc.net:8090/browse/WWM-1264