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.userprofile.entity.CardCredential siteCredential)
           
static CardUsageTO convertCardUsage_to_CardUsageTO(org.eclipse.higgins.userprofile.entity.CardUsage cardUsage)
           
static CategoryTO convertCategory_to_CategoryTO(org.eclipse.higgins.userprofile.entity.Category category)
          Convert Category object to Category transfer object
static org.eclipse.higgins.userprofile.entity.Category convertCategoryTO_to_Category(CategoryTO categoryTO)
          Convert Category transfer object to Category object
static Map 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.userprofile.entity.CardCredential convertICredential_to_CardCredential(org.eclipse.higgins.icard.auth.ICredential credential)
           
static RPPolicy convertIPolicyToRPPolicy(org.eclipse.higgins.icard.IPolicy atom)
           
static org.eclipse.higgins.userprofile.entity.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.userprofile.entity.UserProfile userProfile)
          Convert UserProfile to UserProfile transfer object
static org.eclipse.higgins.userprofile.entity.UserProfile convertUserProfileTO_to_UserProfile(org.eclipse.higgins.userprofile.entity.UserProfile 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.userprofile.entity.CardCredential siteCredential)

convertICredential_to_CardCredential

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

convertUITokenServiceCredentialTO_to_CardCredential

public static org.eclipse.higgins.userprofile.entity.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 Map 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
See Also:
implimantation *AIRICM.

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.userprofile.entity.UserProfile userProfile)
Convert UserProfile to UserProfile transfer object

Parameters:
userProfile -
Returns:
UserProfile transfer object

convertUserProfileTO_to_UserProfile

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

Parameters:
userProfile - transfer object
Returns:
instance of UserProfile object

convertCategory_to_CategoryTO

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

Parameters:
category -
Returns:
category transfer object

convertCategoryTO_to_Category

public static org.eclipse.higgins.userprofile.entity.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:

convertCardUsage_to_CardUsageTO

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

convertIPolicyToRPPolicy

public static RPPolicy convertIPolicyToRPPolicy(org.eclipse.higgins.icard.IPolicy atom)