Class CustomerProvider

java.lang.Object
fr.paris.lutece.plugins.notificationstore.service.CustomerProvider

public class CustomerProvider extends Object
This class provides customers
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    fr.paris.lutece.plugins.grubusiness.business.customer.Customer
    decrypt(fr.paris.lutece.plugins.grubusiness.business.customer.Customer customer, String strCode)
    Decrypts a Customer from the specified Customer.
    fr.paris.lutece.plugins.grubusiness.business.customer.Customer
    decrypt(fr.paris.lutece.plugins.grubusiness.business.demand.Demand demand)
    Decrypts a Customer from the specified Customer.
    fr.paris.lutece.plugins.grubusiness.business.customer.Customer
    get(String strGuid, String strCuid)
    Provides a customer with the specified GUID / CID
    boolean
    has identity service
    retrieve singleton
    static boolean
    check connection ID : must contains at least 36 chars
    static boolean
    check customer ID : must contains 36 chars

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CustomerProvider

      public CustomerProvider()
  • Method Details

    • instance

      public static CustomerProvider instance()
      retrieve singleton
    • hasIdentityService

      public boolean hasIdentityService()
      has identity service
      Returns:
      true if identityService is not null
    • get

      public fr.paris.lutece.plugins.grubusiness.business.customer.Customer get(String strGuid, String strCuid) throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
      Provides a customer with the specified GUID / CID
      Parameters:
      strGuid - the connection id
      strCuid - the customer id
      Returns:
      the customer
      Throws:
      fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
    • decrypt

      public fr.paris.lutece.plugins.grubusiness.business.customer.Customer decrypt(fr.paris.lutece.plugins.grubusiness.business.customer.Customer customer, String strCode)

      Decrypts a Customer from the specified Customer.

      The provided Customer is not modified.

      Parameters:
      customer - the customer from which the Customer is decrypted. Must not be null
      strCode - the code used to decrypt the Customer. Must not be null
      Returns:
      the decrypted Customer
    • decrypt

      public fr.paris.lutece.plugins.grubusiness.business.customer.Customer decrypt(fr.paris.lutece.plugins.grubusiness.business.demand.Demand demand)

      Decrypts a Customer from the specified Customer.

      The provided Customer is not modified.

      Parameters:
      customer - the customer from which the Customer is decrypted. Must not be null
      demand - the demand for which the Customer is decrypted. Must not be null
      Returns:
      the decrypted Customer
    • isCustomerIdValid

      public static boolean isCustomerIdValid(String strId)
      check customer ID : must contains 36 chars
      Parameters:
      strId -
      Returns:
      true if valid
    • isConnectionIdValid

      public static boolean isConnectionIdValid(String strId)
      check connection ID : must contains at least 36 chars
      Parameters:
      strId -
      Returns:
      true if valid