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

java.lang.Object
  extended byorg.eclipse.higgins.rpps.core.impl.ConvertHelper

public class ConvertHelper
extends Object


Constructor Summary
ConvertHelper()
           
 
Method Summary
static org.eclipse.higgins.icard.auth.ICredential convertCardCredential_to_ICredential(org.eclipse.higgins.icard.ICard card, org.eclipse.higgins.icard.userprofile.CardCredential siteCredential)
           
static CardUsageTO convertCardUsage_to_CardUsageTO(org.eclipse.higgins.icard.userprofile.CardUsage cardUsage)
           
static CategoryTO convertCategory_to_CategoryTO(org.eclipse.higgins.icard.userprofile.Category category)
          Convert Category object to Category transfer object
static org.eclipse.higgins.icard.userprofile.Category convertCategoryTO_to_Category(CategoryTO categoryTO)
          Convert Category transfer object to Category object
static PropertyTO[] convertClaims_to_PropertyTO(org.eclipse.higgins.icard.ICard card, boolean isCatchAuthentication, Iterator claimIterator)
          Converts the card's claim to the property transfer object
static org.eclipse.higgins.icard.auth.ICredential convertHashtable_to_Credential(org.eclipse.higgins.icard.ICard card, String typeofCredential, Hashtable table)
          Converts arrays with credential's fields values from HBX to ICredential object
static ICardTemplateTO convertICardTemplate_to_ICardTemplateTO(org.eclipse.higgins.icard.ICardTemplate template)
           
static org.eclipse.higgins.icard.userprofile.CardCredential convertICredential_to_CardCredential(org.eclipse.higgins.icard.auth.ICredential credential)
           
static URI convertString_to_URI(String url)
           
static org.eclipse.higgins.icard.userprofile.CardCredential convertUITokenServiceCredentialTO_to_CardCredential(UITokenServiceCredentialTO credential)
           
static org.eclipse.higgins.icard.auth.ICredential convertUITokenServiceCredentialTO_to_ICredentials(org.eclipse.higgins.icard.ICard card, UITokenServiceCredentialTO siteCredential)
          Converts UITokenServiceCredential transfer object to ICredential object
static org.eclipse.higgins.icard.auth.ICredential convertUITokenServiceCredentialTO_to_ICredentials(UITokenServiceCredentialTO siteCredential)
           
static UserProfileTO convertUserProfile_to_UserProfileTO(org.eclipse.higgins.icard.userprofile.UserProfile userProfile)
          Convert UserProfile to UserProfile transfer object
static org.eclipse.higgins.icard.userprofile.UserProfile convertUserProfileTO_to_UserProfile(UserProfileTO userProfileTO)
          Convert UserProfile transfer object to UserProfile object
static CardInformationTO createCardInformationTO(List cardHistory, int sizeHistory)
          Gets CardInformation transfer object
static TokenResponseTO createTokenResponse(String token)
          Gets userProfile trasfer object
static PropertyTO[] getComplexValues(org.eclipse.higgins.icard.IComplexClaimType rootClaimType, org.eclipse.higgins.icard.IComplexClaim rootClaim, boolean isCatchAuthentication, Iterator claimIterator)
          Gets the complex values from the claim object.
static String[] getSimpleValues(org.eclipse.higgins.icard.IClaim claim, int size)
          Gets the simple values from the claim object.
static org.eclipse.higgins.icard.ICardTemplate loadTemplate(org.eclipse.higgins.icard.ICardTemplate[] templates, ICardTemplateTO templeteTO)
          Loads the properties from the string array.
static void setITemplateContainer(org.eclipse.higgins.icard.ITemplateContainer root, ITemplateElementTO[] elementsTO)
           
static void setITemplateValue(org.eclipse.higgins.icard.ITemplateValue element, String elementTOValue)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConvertHelper

public ConvertHelper()
Method Detail

convertUITokenServiceCredentialTO_to_ICredentials

public static org.eclipse.higgins.icard.auth.ICredential convertUITokenServiceCredentialTO_to_ICredentials(org.eclipse.higgins.icard.ICard card,
                                                                                                           UITokenServiceCredentialTO siteCredential)
Converts UITokenServiceCredential transfer object to ICredential object

Parameters:
card - ICard object
siteCredential - UITokenServiceCredentialTO which is need converting
Returns:
ICredential object

convertUITokenServiceCredentialTO_to_ICredentials

public static org.eclipse.higgins.icard.auth.ICredential convertUITokenServiceCredentialTO_to_ICredentials(UITokenServiceCredentialTO siteCredential)

convertCardCredential_to_ICredential

public static org.eclipse.higgins.icard.auth.ICredential convertCardCredential_to_ICredential(org.eclipse.higgins.icard.ICard card,
                                                                                              org.eclipse.higgins.icard.userprofile.CardCredential siteCredential)

convertICredential_to_CardCredential

public static org.eclipse.higgins.icard.userprofile.CardCredential convertICredential_to_CardCredential(org.eclipse.higgins.icard.auth.ICredential credential)

convertUITokenServiceCredentialTO_to_CardCredential

public static org.eclipse.higgins.icard.userprofile.CardCredential convertUITokenServiceCredentialTO_to_CardCredential(UITokenServiceCredentialTO credential)

convertHashtable_to_Credential

public static org.eclipse.higgins.icard.auth.ICredential convertHashtable_to_Credential(org.eclipse.higgins.icard.ICard card,
                                                                                        String typeofCredential,
                                                                                        Hashtable table)
                                                                                 throws org.eclipse.higgins.icard.CardException,
                                                                                        UnsupportedEncodingException
Converts arrays with credential's fields values from HBX to ICredential object

Parameters:
typeofCredential - type of credential which is need convert
table - table which contains arrays values
Returns:
ICredential object
Throws:
org.eclipse.higgins.icard.CardException
UnsupportedEncodingException

convertClaims_to_PropertyTO

public static PropertyTO[] convertClaims_to_PropertyTO(org.eclipse.higgins.icard.ICard card,
                                                       boolean isCatchAuthentication,
                                                       Iterator claimIterator)
                                                throws org.eclipse.higgins.icard.AuthenticationRequiredException,
                                                       org.eclipse.higgins.icard.CardException
Converts the card's claim to the property transfer object

Parameters:
card -
isCatchAuthentication -
Returns:
array of PropertyTO
Throws:
org.eclipse.higgins.icard.AuthenticationRequiredException
org.eclipse.higgins.icard.CardException

getSimpleValues

public static String[] getSimpleValues(org.eclipse.higgins.icard.IClaim claim,
                                       int size)
Gets the simple values from the claim object.

Parameters:
claim - the claim object.
size - the size of the value array.
Returns:
the string array of values.

getComplexValues

public static PropertyTO[] getComplexValues(org.eclipse.higgins.icard.IComplexClaimType rootClaimType,
                                            org.eclipse.higgins.icard.IComplexClaim rootClaim,
                                            boolean isCatchAuthentication,
                                            Iterator claimIterator)
                                     throws org.eclipse.higgins.icard.CardException,
                                            org.eclipse.higgins.icard.InvalidTypeException
Gets the complex values from the claim object.

Parameters:
isCatchAuthentication - equals "true" if needs to generete AuthenticationRequiredException or AuthenticationException
Returns:
the array of properties.
Throws:
org.eclipse.higgins.icard.CardException
org.eclipse.higgins.icard.InvalidTypeException

convertUserProfile_to_UserProfileTO

public static UserProfileTO convertUserProfile_to_UserProfileTO(org.eclipse.higgins.icard.userprofile.UserProfile userProfile)
Convert UserProfile to UserProfile transfer object

Parameters:
userProfile -
Returns:
UserProfile transfer object

convertUserProfileTO_to_UserProfile

public static org.eclipse.higgins.icard.userprofile.UserProfile convertUserProfileTO_to_UserProfile(UserProfileTO userProfileTO)
Convert UserProfile transfer object to UserProfile object

Returns:
instance of UserProfile object

convertCategory_to_CategoryTO

public static CategoryTO convertCategory_to_CategoryTO(org.eclipse.higgins.icard.userprofile.Category category)
Convert Category object to Category transfer object

Parameters:
category -
Returns:
category transfer object

convertCategoryTO_to_Category

public static org.eclipse.higgins.icard.userprofile.Category convertCategoryTO_to_Category(CategoryTO categoryTO)
Convert Category transfer object to Category object

Parameters:
categoryTO - transfer object
Returns:
instance of Category object

createCardInformationTO

public static CardInformationTO createCardInformationTO(List cardHistory,
                                                        int sizeHistory)
Gets CardInformation transfer object

Parameters:
cardHistory -
Returns:
CardInformation transfer object

loadTemplate

public static org.eclipse.higgins.icard.ICardTemplate loadTemplate(org.eclipse.higgins.icard.ICardTemplate[] templates,
                                                                   ICardTemplateTO templeteTO)
Loads the properties from the string array.

Parameters:
templeteTO -
Returns:
the properties.

setITemplateValue

public static void setITemplateValue(org.eclipse.higgins.icard.ITemplateValue element,
                                     String elementTOValue)
Parameters:
element -
elementTOValue -

setITemplateContainer

public static void setITemplateContainer(org.eclipse.higgins.icard.ITemplateContainer root,
                                         ITemplateElementTO[] elementsTO)
Parameters:
root -
elementsTO -

createTokenResponse

public static TokenResponseTO createTokenResponse(String token)
Gets userProfile trasfer object

Returns:
user profile trasfer object
Throws:
Exception

convertICardTemplate_to_ICardTemplateTO

public static ICardTemplateTO convertICardTemplate_to_ICardTemplateTO(org.eclipse.higgins.icard.ICardTemplate template)
Parameters:
template -
Returns:

convertString_to_URI

public static URI convertString_to_URI(String url)
                                throws MalformedURLException,
                                       URISyntaxException
Throws:
MalformedURLException
URISyntaxException

convertCardUsage_to_CardUsageTO

public static CardUsageTO convertCardUsage_to_CardUsageTO(org.eclipse.higgins.icard.userprofile.CardUsage cardUsage)