Class CustomerProvider


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

      • CustomerProvider

        public CustomerProvider()
    • Method Detail

      • 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