Class SaperionClientFactoryImpl

java.lang.Object
com.lexmark.saperion.client.implementation.SaperionClientFactoryImpl
All Implemented Interfaces:
SaperionClientFactory

public class SaperionClientFactoryImpl extends Object implements SaperionClientFactory
This is the default implementation of SaperionClientFactory.
Author:
jschwarz
  • Constructor Details

    • SaperionClientFactoryImpl

      public SaperionClientFactoryImpl(Connector connector)
  • Method Details

    • newClient

      public SaperionClient newClient(String userName, String password, com.lexmark.saperion.LicenseEnumeration licenseType, String tenant) throws com.lexmark.saperion.exceptions.EcmException
      Description copied from interface: SaperionClientFactory
      This method creates a new saperion client with a new session in the context of the given user credentials.
      Specified by:
      newClient in interface SaperionClientFactory
      Parameters:
      userName - the name of the user
      password - the password of the user
      licenseType - the saperion license to use for the session
      tenant - the name of the tenant
      Returns:
      a client in the context of the given credentials
      Throws:
      com.lexmark.saperion.exceptions.EcmException
    • newClient

      public SaperionClient newClient(String userName, String password, com.lexmark.saperion.LicenseEnumeration licenseType) throws com.lexmark.saperion.exceptions.EcmException
      Description copied from interface: SaperionClientFactory
      This method creates a new saperion client with a new session in the context of the given user credentials. On multi-tenant-systems, use SaperionClientFactory.newClient(String, String, LicenseEnumeration, String) instead.
      Specified by:
      newClient in interface SaperionClientFactory
      Parameters:
      userName - the name of the user
      password - the password of the user
      licenseType - the saperion license to use for the session
      Returns:
      a client in the context of the given credentials
      Throws:
      com.lexmark.saperion.exceptions.EcmException
    • newClient

      public SaperionClient newClient(String userName, String password, com.lexmark.saperion.LicenseEnumeration licenseType, String tenant, String impersonatedUser) throws com.lexmark.saperion.exceptions.EcmException
      Description copied from interface: SaperionClientFactory
      This method creates a new saperion client with a new session in the context of the given user credentials.
      Specified by:
      newClient in interface SaperionClientFactory
      Parameters:
      userName - the name of the user
      password - the password of the user
      licenseType - the saperion license to use for the session
      tenant - the name of the tenant
      impersonatedUser - the name of the impersonated user
      Returns:
      a client in the context of the given credentials
      Throws:
      com.lexmark.saperion.exceptions.EcmException
    • newClient

      public SaperionClient newClient(String token, com.lexmark.saperion.LicenseEnumeration licenseType, String tenant) throws com.lexmark.saperion.exceptions.EcmException
      Description copied from interface: SaperionClientFactory
      This method creates a new saperion client with a new session in the context of the given user credentials.
      Specified by:
      newClient in interface SaperionClientFactory
      Parameters:
      token - a token retrieved from an authorization service
      licenseType - the saperion license to use for the session
      tenant - the name of the tenant
      Returns:
      a client in the context of the given credentials
      Throws:
      com.lexmark.saperion.exceptions.EcmException
    • changePassword

      public SaperionClient changePassword(String userName, String oldPassword, String newPassword, com.lexmark.saperion.LicenseEnumeration licenseType, String tenant) throws com.lexmark.saperion.exceptions.EcmException
      Description copied from interface: SaperionClientFactory
      This method creates a new saperion client with a new session in the context of the given user credentials. It also changes the users password. This is the only possibility a user whose password is expired has to log in and change his password.
      Specified by:
      changePassword in interface SaperionClientFactory
      Parameters:
      userName - the name of the user
      oldPassword - the current (possibly expired) password of the user
      newPassword - the new password of the user
      licenseType - the saperion license to use for the session
      tenant - the name of the tenant
      Returns:
      a client in the context of the given credentials
      Throws:
      com.lexmark.saperion.exceptions.EcmException