Interface Connector


  • public interface Connector
    A connector is bound to a specific saperion system. The communication protocol varies by implementation. Given valid user credentials of its saperion system it is able to connect, authenticate and create a service factory that uses the user context of the given credentials.
    Author:
    jschwarz
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      ServiceFactory changePassword​(java.lang.String userName, java.lang.String oldPassword, java.lang.String newPassword, com.lexmark.saperion.LicenseEnumeration licenseType, java.lang.String tenantName)
      This method connects to the saperion server, authenticates the given credentials, changes the password and creates a ServiceFactory that uses the user context of the given credentials.
      ServiceFactory connect​(java.lang.String token, com.lexmark.saperion.LicenseEnumeration licenseType, java.lang.String tenantName)
      This method connects to the saperion server, authenticates the given credentials and creates a ServiceFactory that uses the user context of the given credentials.
      ServiceFactory connect​(java.lang.String userName, java.lang.String password, com.lexmark.saperion.LicenseEnumeration licenseType, java.lang.String tenantName)
      This method connects to the saperion server, authenticates the given credentials and creates a ServiceFactory that uses the user context of the given credentials.
      ServiceFactory connect​(java.lang.String userName, java.lang.String password, com.lexmark.saperion.LicenseEnumeration licenseType, java.lang.String tenantName, java.lang.String impersonatedUser)
      This method connects to the saperion server, authenticates the given credentials and creates a ServiceFactory that uses the user context of the given credentials.
    • Method Detail

      • connect

        ServiceFactory connect​(java.lang.String userName,
                               java.lang.String password,
                               com.lexmark.saperion.LicenseEnumeration licenseType,
                               java.lang.String tenantName)
                        throws com.lexmark.saperion.exceptions.EcmException
        This method connects to the saperion server, authenticates the given credentials and creates a ServiceFactory that uses the user context of the given credentials.
        Parameters:
        userName - the name of the user
        password - the password of the user
        licenseType - the license used
        tenantName - the name of the tenant of the user
        Returns:
        a ServiceFactory that uses the user context of the given credentials
        Throws:
        com.lexmark.saperion.exceptions.EcmException
      • connect

        ServiceFactory connect​(java.lang.String userName,
                               java.lang.String password,
                               com.lexmark.saperion.LicenseEnumeration licenseType,
                               java.lang.String tenantName,
                               java.lang.String impersonatedUser)
                        throws com.lexmark.saperion.exceptions.EcmException
        This method connects to the saperion server, authenticates the given credentials and creates a ServiceFactory that uses the user context of the given credentials.
        Parameters:
        userName - the name of the user
        password - the password of the user
        licenseType - the license used
        tenantName - the name of the tenant of the user
        impersonatedUser - the name of the impersonated user
        Returns:
        a ServiceFactory that uses the user context of the given credentials
        Throws:
        com.lexmark.saperion.exceptions.EcmException
      • connect

        ServiceFactory connect​(java.lang.String token,
                               com.lexmark.saperion.LicenseEnumeration licenseType,
                               java.lang.String tenantName)
                        throws com.lexmark.saperion.exceptions.EcmException
        This method connects to the saperion server, authenticates the given credentials and creates a ServiceFactory that uses the user context of the given credentials.
        Parameters:
        token - a token retrieved from an authorization service
        licenseType - the license used
        tenantName - the name of the tenant of the user
        Returns:
        a ServiceFactory that uses the user context of the given credentials
        Throws:
        com.lexmark.saperion.exceptions.EcmException
      • changePassword

        ServiceFactory changePassword​(java.lang.String userName,
                                      java.lang.String oldPassword,
                                      java.lang.String newPassword,
                                      com.lexmark.saperion.LicenseEnumeration licenseType,
                                      java.lang.String tenantName)
                               throws com.lexmark.saperion.exceptions.EcmException
        This method connects to the saperion server, authenticates the given credentials, changes the password and creates a ServiceFactory that uses the user context of the given credentials. For a user that whose password is expired this is the only option to log in (and change the password) again.
        Parameters:
        userName - the name of the user
        oldPassword - the old (possibly expired) password of the user
        newPassword - the new password of the user
        licenseType - the license used
        tenantName - the name of the tenant of the user
        Returns:
        a ServiceFactory that uses the user context of the given credentials
        Throws:
        com.lexmark.saperion.exceptions.EcmException