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

java.lang.Object
  extended by org.eclipse.higgins.rpps.core.impl.RppsHelper

public class RppsHelper
extends Object


Constructor Summary
RppsHelper()
           
 
Method Summary
static boolean equalsObject(Object obj1, Object obj2)
           
static org.eclipse.higgins.icard.ICardTemplate fillICardTemplate_from_ICardTemplateTO(org.eclipse.higgins.icard.ICardTemplate[] templates, ICardTemplateTO templeteTO)
          Loads the properties from the string array.
static void fillITemplateContainer(org.eclipse.higgins.icard.ITemplateContainer root, ITemplateElementTO[] elementsTO)
           
static void fillITemplateValue(org.eclipse.higgins.icard.ITemplateValue element, String elementTOValue)
           
static org.eclipse.higgins.icard.ICardTemplate fillPersonalCardTemplate(org.eclipse.higgins.icard.ICardTemplate template, String cardname, String surname, String givenname, String emailaddress, String streetaddress, String locality, String stateorprovince, String postalcode, String country, String homephone, String otherphone, String mobilephone, String dateofbirth, String gender, String webpage)
           
static CallbackHandler getCallbackHandler(Serializable userId)
          Creates CallbackHandler object with username.
static CallbackHandler getCallbackHandler(String userId, String password)
          Creates CallbackHandler object with username/password.
static KeyStore loadKeyStore(String filename)
           
static Properties loadProperties(String[] properties)
          Loads the properties from the string array.
static X509Certificate[] parseSSLCert(String soapval)
          Parses a string representation of the certificate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RppsHelper

public RppsHelper()
Method Detail

parseSSLCert

public static X509Certificate[] parseSSLCert(String soapval)
Parses a string representation of the certificate

Parameters:
soapval - the security certificate as a String
Returns:
the X509Certificate object

getCallbackHandler

public static CallbackHandler getCallbackHandler(String userId,
                                                 String password)
Creates CallbackHandler object with username/password.

Parameters:
userId - the id to identify the user.
password - the password to identify the user.
Returns:
the CallbackHandler object.

getCallbackHandler

public static CallbackHandler getCallbackHandler(Serializable userId)
Creates CallbackHandler object with username.

Parameters:
userId - the id to identify the user.
password - the password to identify the user.
Returns:
the CallbackHandler object.

loadProperties

public static Properties loadProperties(String[] properties)
Loads the properties from the string array.

Parameters:
properties - the string array of properties.
Returns:
the properties.

fillICardTemplate_from_ICardTemplateTO

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

Parameters:
properties - the string array of properties.
templeteTO -
Returns:
the properties.

fillITemplateValue

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

fillITemplateContainer

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

fillPersonalCardTemplate

public static org.eclipse.higgins.icard.ICardTemplate fillPersonalCardTemplate(org.eclipse.higgins.icard.ICardTemplate template,
                                                                               String cardname,
                                                                               String surname,
                                                                               String givenname,
                                                                               String emailaddress,
                                                                               String streetaddress,
                                                                               String locality,
                                                                               String stateorprovince,
                                                                               String postalcode,
                                                                               String country,
                                                                               String homephone,
                                                                               String otherphone,
                                                                               String mobilephone,
                                                                               String dateofbirth,
                                                                               String gender,
                                                                               String webpage)
Parameters:
handler - the callback handler to be used to request user's identity
cardname - name of new card
surname - value of surname field
givenname - value of givenname field
emailaddress - value of emailaddress field
Returns:
ICardTemplate object with filling field
Throws:
Exception

equalsObject

public static boolean equalsObject(Object obj1,
                                   Object obj2)
Parameters:
obj1 -
obj2 -
Returns:
true if this object is the same as the obj argument; false otherwise.

loadKeyStore

public static KeyStore loadKeyStore(String filename)
                             throws KeyStoreException,
                                    NoSuchAlgorithmException,
                                    CertificateException,
                                    IOException
Throws:
KeyStoreException
NoSuchAlgorithmException
CertificateException
IOException