Class CustomerProvider
- java.lang.Object
-
- fr.paris.lutece.plugins.notificationstore.service.CustomerProvider
-
public class CustomerProvider extends java.lang.ObjectThis class provides customers
-
-
Constructor Summary
Constructors Constructor Description CustomerProvider()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description fr.paris.lutece.plugins.grubusiness.business.customer.Customerdecrypt(fr.paris.lutece.plugins.grubusiness.business.customer.Customer customer, java.lang.String strCode)Decrypts aCustomerfrom the specifiedCustomer.fr.paris.lutece.plugins.grubusiness.business.customer.Customerdecrypt(fr.paris.lutece.plugins.grubusiness.business.demand.Demand demand)Decrypts aCustomerfrom the specifiedCustomer.fr.paris.lutece.plugins.grubusiness.business.customer.Customerget(java.lang.String strGuid, java.lang.String strCuid)Provides a customer with the specified GUID / CIDbooleanhasIdentityService()has identity servicestatic CustomerProviderinstance()retrieve singletonstatic booleanisConnectionIdValid(java.lang.String strId)check connection ID : must contains at least 36 charsstatic booleanisCustomerIdValid(java.lang.String strId)check customer ID : must contains 36 chars
-
-
-
Method Detail
-
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(java.lang.String strGuid, java.lang.String strCuid) throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreExceptionProvides a customer with the specified GUID / CID- Parameters:
strGuid- the connection idstrCuid- 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
Customerfrom the specifiedCustomer.The provided
Customeris not modified.- Parameters:
customer- the customer from which theCustomeris decrypted. Must not benullstrCode- the code used to decrypt theCustomer. Must not benull- 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
Customerfrom the specifiedCustomer.The provided
Customeris not modified.- Parameters:
customer- the customer from which theCustomeris decrypted. Must not benulldemand- the demand for which theCustomeris decrypted. Must not benull- 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
-
-