org.eclipse.higgins.userprofile
Interface IUserProfileService

All Superinterfaces:
org.eclipse.higgins.registry.IServiceProvider
All Known Implementing Classes:
MemoryUserProfileService

public interface IUserProfileService
extends org.eclipse.higgins.registry.IServiceProvider

Author:
Yuriy Pilipenko

Method Summary
 Captcha addCaptcha(Captcha captcha)
           
 Category addCategory(CallbackHandler handler, Category category)
           
 void addSelectorAndSetPasswordByPasswordIsapMd5(String userId, String privateSelectorINumber, byte[] passwordIsapMd5, String newPassword)
          Add the new Selector given by the privateSelectorINumber and set the new password without remembering it.
 UserProfile addUserProfile(CallbackHandler handler, UserProfile userProfile)
           
 CardInformation clearCardCredential(CallbackHandler handler, org.eclipse.higgins.icard.CUID cuid)
          Clears credential information for the given card.
 void deleteCaptcha(Captcha captcha)
           
 void deleteCategory(CallbackHandler handler, String categoryId)
           
 void deleteOldPassword(CallbackHandler handler)
          Deletes the old password and change it to the new one.
 void deleteUserProfile(CallbackHandler handler)
           
 Captcha getCaptcha(String captchaID)
           
 CardInformation getCardInformation(CallbackHandler handler, org.eclipse.higgins.icard.CUID cuid)
          Returns the whole information about the given card
 ICardUsageManager getCardUsageManager(CallbackHandler handler)
          Returns class that manages all Card usage and URI relations information
 List getCategories(CallbackHandler handler)
           
 PolicyVersion getRPPolicyVersion(CallbackHandler handler, WebForm form)
           
 UserProfile getUserProfile(CallbackHandler handler)
           
 UserProfile getUserProfile(String userID)
           
 Captcha modifyCaptcha(Captcha captcha)
           
 Category modifyCategory(CallbackHandler handler, Category category)
           
 void modifyPassword(String userId, String newPassword)
           
 UserProfile modifyUserProfile(CallbackHandler handler, UserProfile userProfile)
           
 UserProfile modifyUserProfile(UserProfile userProfile)
           
 String resetPassword(CallbackHandler handler)
           
 String resolveUserIdentifier(String privateSelectorINumber)
          Resolves user private Selector I-Number to user Identifier
 CardInformation setCardCredential(CallbackHandler handler, org.eclipse.higgins.icard.CUID cuid, CardCredential cardCredential)
          Sets credential information for the given card.
 void setNewPassword(CallbackHandler handler, String newPassword)
          Sets the new password allowing authentication both by new and old passwords until the successful deleteOldPassword() call.
 void setNewPasswordByPasswordIsapMd5(String userId, byte[] passwordIsapMd5, String newPassword)
          Sets the new password allowing authentication both by new and old passwords until the successful deleteOldPassword() call.
 void setRPPolicyVersion(CallbackHandler handler, PolicyVersion policyVersion)
           
 boolean userIdentifierExists(String userIdentifier)
           
 
Methods inherited from interface org.eclipse.higgins.registry.IServiceProvider
getConfiguration, getID, setID
 

Method Detail

getUserProfile

public UserProfile getUserProfile(CallbackHandler handler)
                           throws UserProfileException
Returns:
Throws:
org.eclipse.higgins.icard.CardException
UserProfileException

getUserProfile

public UserProfile getUserProfile(String userID)
                           throws UserProfileException
Parameters:
userID -
Returns:
Throws:
UserProfileException

addUserProfile

public UserProfile addUserProfile(CallbackHandler handler,
                                  UserProfile userProfile)
                           throws UserProfileException
Parameters:
userProfile -
Returns:
Throws:
org.eclipse.higgins.icard.CardException
UserProfileException

modifyUserProfile

public UserProfile modifyUserProfile(CallbackHandler handler,
                                     UserProfile userProfile)
                              throws UserProfileException
Parameters:
userProfile -
Returns:
Throws:
UserProfileException

modifyUserProfile

public UserProfile modifyUserProfile(UserProfile userProfile)
                              throws UserProfileException
Parameters:
userProfile -
Returns:
Throws:
UserProfileException

deleteUserProfile

public void deleteUserProfile(CallbackHandler handler)
                       throws UserProfileException
Returns:
Throws:
UserProfileException

resetPassword

public String resetPassword(CallbackHandler handler)
                     throws UserProfileException
Returns:
Throws:
UserProfileException

modifyPassword

public void modifyPassword(String userId,
                           String newPassword)
                    throws UserProfileException
Parameters:
userId -
newPassword -
Throws:
UserProfileException

userIdentifierExists

public boolean userIdentifierExists(String userIdentifier)
                             throws UserProfileException
Parameters:
userIdentifier -
Returns:
true if the specified user profile already exists
Throws:
UserProfileException

resolveUserIdentifier

public String resolveUserIdentifier(String privateSelectorINumber)
                             throws UserProfileException
Resolves user private Selector I-Number to user Identifier

Parameters:
privateSelectorINumber -
Returns:
Throws:
UserProfileException

getCategories

public List getCategories(CallbackHandler handler)
                   throws UserProfileException
Parameters:
handler - - authentication handler
Returns:
List object with all user categories.
Throws:
UserProfileException

addCategory

public Category addCategory(CallbackHandler handler,
                            Category category)
                     throws UserProfileException
Parameters:
handler - - authentication handler
category -
Returns:
new created category instance.
Throws:
UserProfileException

modifyCategory

public Category modifyCategory(CallbackHandler handler,
                               Category category)
                        throws UserProfileException
Parameters:
handler - - authentication handler
category -
Returns:
updated category instance .
Throws:
UserProfileException

deleteCategory

public void deleteCategory(CallbackHandler handler,
                           String categoryId)
                    throws UserProfileException
Parameters:
categoryId -
Returns:
.
Throws:
UserProfileException

setCardCredential

public CardInformation setCardCredential(CallbackHandler handler,
                                         org.eclipse.higgins.icard.CUID cuid,
                                         CardCredential cardCredential)
                                  throws UserProfileException
Sets credential information for the given card.

Parameters:
handler -
cuid -
cardCredential -
Returns:
CardInformation object with all related card information, or null if card info not found
Throws:
UserProfileException

clearCardCredential

public CardInformation clearCardCredential(CallbackHandler handler,
                                           org.eclipse.higgins.icard.CUID cuid)
                                    throws UserProfileException
Clears credential information for the given card.

Parameters:
handler -
Returns:
CardInformation object with all related card information, or null if card info not found
Throws:
UserProfileException

getCardInformation

public CardInformation getCardInformation(CallbackHandler handler,
                                          org.eclipse.higgins.icard.CUID cuid)
                                   throws UserProfileException
Returns the whole information about the given card

Parameters:
handler -
cuid -
Returns:
Throws:
UserProfileException

getCardUsageManager

public ICardUsageManager getCardUsageManager(CallbackHandler handler)
                                      throws UserProfileException
Returns class that manages all Card usage and URI relations information

Parameters:
handler -
Returns:
instance of ICardUsageRelationManager
Throws:
UserProfileException

getRPPolicyVersion

public PolicyVersion getRPPolicyVersion(CallbackHandler handler,
                                        WebForm form)
                                 throws UserProfileException
Throws:
UserProfileException

setRPPolicyVersion

public void setRPPolicyVersion(CallbackHandler handler,
                               PolicyVersion policyVersion)
                        throws UserProfileException
Throws:
UserProfileException

setNewPassword

public void setNewPassword(CallbackHandler handler,
                           String newPassword)
                    throws UserProfileException
Sets the new password allowing authentication both by new and old passwords until the successful deleteOldPassword() call. This implements change password logic according to ISAP sequences CP1 and CP2.

Parameters:
handler - - Callback handler containing current and valid "old password" or the new one.
newPassword - - password, on which the authentication will try. If not succeeded, will conduct on the old one.
Throws:
UserProfileException

setNewPasswordByPasswordIsapMd5

public void setNewPasswordByPasswordIsapMd5(String userId,
                                            byte[] passwordIsapMd5,
                                            String newPassword)
                                     throws UserProfileException
Sets the new password allowing authentication both by new and old passwords until the successful deleteOldPassword() call. This implements change password logic according to ISAP sequences CP1 and CP2. The Private Broker MUST authenticate this message came from an authorized Selector by verifying that the $password$isap$md5 value matches the hash of the same value registered with the Private Broker in ISAP Sequence P1. This value is the Installation Key MD5 defined in the Credentials section of ISAP Common. Note that the Private Broker should store a HASH of this value, even though the value is already a hash of the Installation Key

Parameters:
passwordIsapMd5 - - hash of Installation Key MD5 by which authentication occurs here
newPassword - - password, on which the authentication will try. If not succeeded, will conduct on the old one.
Throws:
UserProfileException

deleteOldPassword

public void deleteOldPassword(CallbackHandler handler)
                       throws UserProfileException
Deletes the old password and change it to the new one. After this successful call change password process assumed completed and all subsequent authentication will conduct on the changed (new) password. This implements change password logic according to ISAP sequences CP1 and CP2.

Parameters:
handler - - Callback handler containing current and valid "old password" or the new one.
Throws:
UserProfileException

addSelectorAndSetPasswordByPasswordIsapMd5

public void addSelectorAndSetPasswordByPasswordIsapMd5(String userId,
                                                       String privateSelectorINumber,
                                                       byte[] passwordIsapMd5,
                                                       String newPassword)
                                                throws UserProfileException
Add the new Selector given by the privateSelectorINumber and set the new password without remembering it. Note that all subsuquent operations will be authenticated by this new password. The Private Broker MUST authenticate this message came from an authorized Selector by verifying that the Installation Key MD5 matches the Installation Key MD5 registered with the Private Broker in ISAP Sequence P1.
The Private Broker MUST:
1. Register the new Selector as defined in ISAP Sequence P2.
2. Change the Private User Password and defined in ISAP Sequence CP2 except that in this sequence the old Private User Password is NOT saved because a new Selector is being installed.

Parameters:
userId - - private-user-i-number at the Private Broker
privateSelectorINumber -
passwordIsapMd5 -
newPassword -
Throws:
UserProfileException

getCaptcha

public Captcha getCaptcha(String captchaID)
                   throws UserProfileException
Parameters:
captchaID -
Returns:
Throws:
UserProfileException

addCaptcha

public Captcha addCaptcha(Captcha captcha)
                   throws UserProfileException
Parameters:
captcha -
Returns:
Throws:
UserProfileException

deleteCaptcha

public void deleteCaptcha(Captcha captcha)
                   throws UserProfileException
Parameters:
captcha -
Returns:
Throws:
UserProfileException

modifyCaptcha

public Captcha modifyCaptcha(Captcha captcha)
                      throws UserProfileException
Parameters:
captcha -
Returns:
Throws:
UserProfileException