org.eclipse.higgins.rpps.core
Interface IRppsService

All Known Implementing Classes:
RppsService

public interface IRppsService

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

Author:
Sergei Yakovlev, Artem Verkhovets

Field Summary
static String IPasswordCredential
           
static String IPinCodeCredential
           
static String ITSKerberosV5Credential
           
static String ITSSelfIssuedCredential
           
static String ITSSelfIssuedNonPinCredential
           
static String ITSUsernamePasswordCredential
           
static String ITSX509V3Credential
           
static String IUsernamePasswordCredential
           
 
Method Summary
 String acquireICard(String subscribeURL)
          Acquires the i-card from RP site.
 CategoryTO addCategory(CategoryTO categoryTO)
           
 ResponseMessage addUserProfile(UserProfileTO userProfile)
          Creates new user profile
 void addUserProfileFromHBX(String userId, String password)
          Creates new user profile
 FormatDescriptorTO checkImportStream(byte[] crd)
           
 ICardTO clearCardCredential(String cuid)
           
 boolean clearCardHistory(String cuid)
           
 void connectionNotify(String host, String username, boolean success)
          Locate the URIICard-type I-Card whose URI matches 'cref'.
 boolean connectionVerify(String host, String username)
          The RP site invokes this method to verify that user really has an account on the specified site.
 ICardTO createDuplicateICard(String cardName, String cuid, String pinCode)
          Creates the duplicate card with new card's name
 ICardTO createICard(ICardTemplateTO template)
          Creates a new card by template
 ICardTO createICard(String id, String[] properties)
          Creates a new card
 String createICardFromHBX(String cardname)
          Creates new card
 void deleteAllICard()
          Deletes all user's card.
 void deleteCategory(String categoryId)
           
 void deleteICard(String cuid)
          Deletes specified card.
 boolean deleteUrlCardRelation(String cuid, String url)
           
 ResponseMessage deleteUserProfile()
          Deletes user profile
 ICardTO editPinCode(String cuid, String oldPinCode, String newPinCode)
           
 byte[] exportICards(String formatID, String[] cards, UITokenServiceCredentialTO credential)
           
 CardUsageTO[] getCardHistory(String cuid, int startFrom, int capacity, String orderBy, String orderDirection)
           
 CardInformationTO getCardInformation(String cuid, int size)
           
 CategoryTO[] getCategory()
           
 String getFormFillingScript(URL page, String username, String form)
          Gets a form filling script for the specified site&user
 String getHigginsServiceGlobalIName()
          Gets the global i-name registered to the Higgins service (e.g.
 String getHtmlScrapingScript(String page)
          Gets an HTML scraping script for the specified site
 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)
           
 ICardTemplateTO[] getICardCreationTemplate()
          Return templates for creating cards
 org.eclipse.higgins.icard.ICardTemplate[] getICardCreationTemplateByProvider(String extID)
           
 ICardsAndCategoryTO getICardsAndCategoriesByUser()
          Gets the card and category lists of the specified user.
 ICardTO[] getICardsByFormat(String formatID)
           
 ICardTO[] getICardsByUser()
          Gets the card list of the specified user.
 FormatDescriptorTO[] getOutputFormats()
           
 ICardTemplateTO getPersonalICardCreationTemplate()
          Get a icard template for creating personal card
 TokenResponseTO getTokenByClaims(String sslCert, String[] claimName, String[] claimValue)
          Web service operation.
 TokenResponseTO getTokenByUrl(String policy, String policytype, String sslCert, String url)
          Web service operation.
 ExtraTokenResponseTO getTokenExtraByUrl(String policy, String policytype, String sslCert, String url)
          Web service operation.
 TokenResponseTO getTokenObject(String policy, String policytype, String sslCert, String[] cuids, String typeofCredential, String[] credentialKey, String[] credentialValue)
          Web service operation.
 UIResponseTO getUserInterface(String url, 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.
 UserProfileTO getUserProfile()
           
 ICardTO[] importICards(byte[] crd)
          Imports card from a file.
 ICardTO[] importICards(byte[] crd, String formatID, UITokenServiceCredentialTO credential)
           
 ResponseMessage modifyCategories(CategoryTO[] categoriesTO)
           
 CategoryTO modifyCategory(CategoryTO categoryTO)
           
 UserProfileTO modifyUserProfile(UserProfileTO userProfile)
          Update user profile
 ICardTO resetPinCode(String cuid, String oldPinCode)
           
 boolean setCardCredential(String cuid, UITokenServiceCredentialTO tokenCredential)
           
 void setHtmlScrapingScript(String page, String script)
          Sets an HTML scraping script for the specified site
 ICardTO setPinCode(String cuid, String pinCode)
           
 ICardTO updateICard(ICardTO icardTO)
          Update card.
 boolean userIdentifierExists(String userIdentifier)
          Checks availability of user profile by userIdentifier
 

Field Detail

ITSUsernamePasswordCredential

public static final String ITSUsernamePasswordCredential
See Also:
Constant Field Values

ITSSelfIssuedCredential

public static final String ITSSelfIssuedCredential
See Also:
Constant Field Values

ITSKerberosV5Credential

public static final String ITSKerberosV5Credential
See Also:
Constant Field Values

ITSX509V3Credential

public static final String ITSX509V3Credential
See Also:
Constant Field Values

IPinCodeCredential

public static final String IPinCodeCredential
See Also:
Constant Field Values

ITSSelfIssuedNonPinCredential

public static final String ITSSelfIssuedNonPinCredential
See Also:
Constant Field Values

IUsernamePasswordCredential

public static final String IUsernamePasswordCredential
See Also:
Constant Field Values

IPasswordCredential

public static final String IPasswordCredential
See Also:
Constant Field Values
Method Detail

acquireICard

public String acquireICard(String subscribeURL)
                    throws MalformedURLException
Acquires the i-card from RP site.

Parameters:
subscribeURL - the URL of the site from where i-card will be acquired
Returns:
a new card id
Throws:
MalformedURLException

connectionNotify

public void connectionNotify(String host,
                             String username,
                             boolean success)
                      throws MalformedURLException
Locate the URIICard-type I-Card whose URI matches 'cref'. If no such card exists, create it. Find the Node whose unique identifier is 'cuid'. On the uniqueIdentifier attribute value itself: (1) if 'success' is true, add/update to "now" the the lastVerifiedFromSource metadata property's timestamp and (2) add/update the lastVerifiedAttempt metadata property's timestamp to "now".

Parameters:
host - the host name of the RP site where user is verified
username - the user name to login to the RP site
success - the verifying result
Throws:
MalformedURLException

connectionVerify

public boolean connectionVerify(String host,
                                String username)
                         throws MalformedURLException
The RP site invokes this method to verify that user really has an account on the specified site.

Parameters:
host - The verified site url.
username - The username to login onto verified site.
Returns:
The result of verification process.
Throws:
MalformedURLException

getFormFillingScript

public String getFormFillingScript(URL page,
                                   String username,
                                   String form)
Gets a form filling script for the specified site&user

Parameters:
page - the page url where user lands on
username - the user name
form - the HTML form name
Returns:
a form filling script

getHtmlScrapingScript

public String getHtmlScrapingScript(String page)
                             throws MalformedURLException,
                                    RppsException
Gets an HTML scraping script for the specified site

Parameters:
page - the page url
Returns:
an HTML scraping script
Throws:
MalformedURLException
RppsException

setHtmlScrapingScript

public void setHtmlScrapingScript(String page,
                                  String script)
                           throws MalformedURLException,
                                  RppsException
Sets an HTML scraping script for the specified site

Parameters:
page - the page url
script - the script body
Throws:
MalformedURLException
RppsException

createICard

public ICardTO createICard(String id,
                           String[] properties)
                    throws RppsException
Creates a new card

Parameters:
id - the i-card id
properties - the i-card properties
Returns:
a new card id
Throws:
RppsException

createICard

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

Returns:
a new card id
Throws:
RppsException

createDuplicateICard

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

Parameters:
cardName - new card's name
cuid - cuid of old card
pinCode - pincode if it needs
Returns:
card trasfer object
Throws:
RppsException

createICardFromHBX

public String createICardFromHBX(String cardname)
                          throws RppsException
Creates new card

Parameters:
cardname - name of card
Returns:
cuid of new card
Throws:
RppsException

getICardByCUID

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

Parameters:
cuid - the card CUID.
Returns:
the card transfer object.
Throws:
RppsException

getICardByCUIDAndTokenServiceCredential

public ICardTO getICardByCUIDAndTokenServiceCredential(String cuid,
                                                       UITokenServiceCredentialTO tokenCredential)
                                                throws RppsException
Gets a card by CUID and Credential.

Parameters:
cuid - the card CUID.
tokenCredential - the tokenCredential transfer object
Returns:
the card transfer object.
Throws:
RppsException

getICardClaims

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

getICardsByUser

public ICardTO[] getICardsByUser()
Gets the card list of the specified user.

Returns:
the card list

getICardsAndCategoriesByUser

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

Returns:
the card list
Throws:
RppsException

updateICard

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

Parameters:
icardTO - the card transfer object.
Returns:
the card transfer object.
Throws:
RppsException

importICards

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

Parameters:
crd - the card as a byte array.
Throws:
RppsException

importICards

public ICardTO[] importICards(byte[] crd,
                              String formatID,
                              UITokenServiceCredentialTO credential)
                       throws RppsException
Throws:
RppsException

checkImportStream

public FormatDescriptorTO checkImportStream(byte[] crd)
                                     throws RppsException
Throws:
RppsException

exportICards

public byte[] exportICards(String formatID,
                           String[] cards,
                           UITokenServiceCredentialTO credential)
                    throws RppsException
Throws:
RppsException

getICardsByFormat

public ICardTO[] getICardsByFormat(String formatID)
                            throws RppsException
Throws:
RppsException

getOutputFormats

public FormatDescriptorTO[] getOutputFormats()
                                      throws RppsException
Throws:
RppsException

deleteICard

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

Parameters:
cuid - the i-card CUID
Throws:
RppsException

deleteAllICard

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

Throws:
RppsException

getUserInterface

public UIResponseTO getUserInterface(String url,
                                     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

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

getTokenByClaims

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

Parameters:
sslCert - the SSL certificate
Returns:
the security token as a String
Throws:
RppsException

getTokenObject

public TokenResponseTO getTokenObject(String policy,
                                      String policytype,
                                      String sslCert,
                                      String[] cuids,
                                      String typeofCredential,
                                      String[] credentialKey,
                                      String[] credentialValue)
                               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).

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 as a String
Throws:
RemoteException
RppsException

getTokenByUrl

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

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 as a String
Throws:
RemoteException
RppsException

getTokenExtraByUrl

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

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 as a String with extra card's information
Throws:
RemoteException
RppsException

getICardCreationTemplate

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

Returns:
a template list
Throws:
RppsException

getICardCreationTemplateByProvider

public org.eclipse.higgins.icard.ICardTemplate[] getICardCreationTemplateByProvider(String extID)
                                                                             throws RppsException
Throws:
RppsException

getPersonalICardCreationTemplate

public ICardTemplateTO getPersonalICardCreationTemplate()
                                                 throws RppsException
Get a icard template for creating personal card

Returns:
a template
Throws:
RppsException

setPinCode

public ICardTO setPinCode(String cuid,
                          String pinCode)
                   throws RppsException
Throws:
RppsException

resetPinCode

public ICardTO resetPinCode(String cuid,
                            String oldPinCode)
                     throws RppsException
Throws:
RppsException

editPinCode

public ICardTO editPinCode(String cuid,
                           String oldPinCode,
                           String newPinCode)
                    throws RppsException
Throws:
RppsException

clearCardHistory

public boolean clearCardHistory(String cuid)
                         throws RppsException
Throws:
RppsException

getCardHistory

public CardUsageTO[] getCardHistory(String cuid,
                                    int startFrom,
                                    int capacity,
                                    String orderBy,
                                    String orderDirection)

getCategory

public CategoryTO[] getCategory()
                         throws RppsException
Throws:
RppsException

addCategory

public CategoryTO addCategory(CategoryTO categoryTO)
                       throws RppsException
Throws:
RppsException

deleteCategory

public void deleteCategory(String categoryId)
                    throws RppsException
Throws:
RppsException

modifyCategory

public CategoryTO modifyCategory(CategoryTO categoryTO)
                          throws RppsException
Throws:
RppsException

modifyCategories

public ResponseMessage modifyCategories(CategoryTO[] categoriesTO)
                                 throws RppsException
Throws:
RppsException

userIdentifierExists

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

Parameters:
userIdentifier -
Returns:
true if user profile exists otherwise false
Throws:
RppsException

getUserProfile

public UserProfileTO getUserProfile()
                             throws RppsException,
                                    AccessException
Throws:
RppsException
AccessException

addUserProfileFromHBX

public void addUserProfileFromHBX(String userId,
                                  String password)
                           throws RppsException
Creates new user profile

Parameters:
userId - the id to identify the user.
password - the password to identify the user.
Throws:
RppsException

addUserProfile

public ResponseMessage addUserProfile(UserProfileTO userProfile)
                               throws RppsException
Creates new user profile

Parameters:
userProfile - user profile trasfer object
Throws:
RppsException

deleteUserProfile

public ResponseMessage deleteUserProfile()
                                  throws RppsException
Deletes user profile

Throws:
RppsException

modifyUserProfile

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

Parameters:
userProfile - user profile transfer object
Returns:
user profile transfer object
Throws:
RppsException

getCardInformation

public CardInformationTO getCardInformation(String cuid,
                                            int size)
                                     throws RppsException
Parameters:
cuid -
Returns:
Throws:
RppsException

clearCardCredential

public ICardTO clearCardCredential(String cuid)
                            throws RppsException
Throws:
RppsException

setCardCredential

public boolean setCardCredential(String cuid,
                                 UITokenServiceCredentialTO tokenCredential)
                          throws RppsException
Throws:
RppsException

deleteUrlCardRelation

public boolean deleteUrlCardRelation(String cuid,
                                     String url)
                              throws RppsException
Throws:
RppsException

getHigginsServiceGlobalIName

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

Returns:
the global i-name.