Class CustomerProvider


  • public class CustomerProvider
    extends java.lang.Object
    This class provides customers
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      fr.paris.lutece.plugins.grubusiness.business.customer.Customer decrypt​(fr.paris.lutece.plugins.grubusiness.business.customer.Customer customer, java.lang.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​(java.lang.String strGuid, java.lang.String strCuid)
      Provides a customer with the specified GUID / CID
      boolean hasIdentityService()
      has identity service
      static CustomerProvider instance()
      retrieve singleton
      static boolean isConnectionIdValid​(java.lang.String strId)
      check connection ID : must contains at least 36 chars
      static boolean isCustomerIdValid​(java.lang.String strId)
      check customer ID : must contains 36 chars
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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​(java.lang.String strGuid,
                                                                                  java.lang.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,
                                                                                      java.lang.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​(java.lang.String strId)
        check customer ID : must contains 36 chars
        Parameters:
        strId -
        Returns:
        true if valid
      • isConnectionIdValid

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