Class MailChimpServiceImpl
- java.lang.Object
-
- org.apache.unomi.mailchimp.services.internal.MailChimpServiceImpl
-
- All Implemented Interfaces:
MailChimpService
public class MailChimpServiceImpl extends Object implements MailChimpService
-
-
Constructor Summary
Constructors Constructor Description MailChimpServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MailChimpResult
addToMCList(Profile profile, Action action)
This function will add the current visitor to a MailChimp list.List<HashMap<String,String>>
getAllLists()
This function will get all MailChimp lists.MailChimpResult
removeFromMCList(Profile profile, Action action)
This function will remove the current visitor from a MailChimp list.void
setApiKey(String apiKey)
void
setIsMergeFieldsActivate(Boolean isMergeFieldsActivate)
void
setListMergeFieldMapping(String listMergeFields)
void
setUrlSubDomain(String urlSubDomain)
MailChimpResult
unsubscribeFromMCList(Profile profile, Action action)
This function will unsbscribe the current visitor to a MailChimp list.MailChimpResult
updateMCProfileProperties(Profile profile, Action action)
This function will update merge properties of MailChimp list.
-
-
-
Method Detail
-
getAllLists
public List<HashMap<String,String>> getAllLists()
Description copied from interface:MailChimpService
This function will get all MailChimp lists.- Specified by:
getAllLists
in interfaceMailChimpService
- Returns:
- a List of MailChimp lists with the name and the id.
-
addToMCList
public MailChimpResult addToMCList(Profile profile, Action action)
Description copied from interface:MailChimpService
This function will add the current visitor to a MailChimp list.- Specified by:
addToMCList
in interfaceMailChimpService
- Parameters:
profile
- the Unomi profile to add to the list @see org.apache.unomi.api.Profileaction
- the action used to call this method, to retrieve parameters @see org.apache.unomi.api.actions.Action- Returns:
- true if the visitor is successfully added to a MailChimp list.
-
removeFromMCList
public MailChimpResult removeFromMCList(Profile profile, Action action)
Description copied from interface:MailChimpService
This function will remove the current visitor from a MailChimp list.- Specified by:
removeFromMCList
in interfaceMailChimpService
- Parameters:
profile
- the Unomi profile to remove from the list @see org.apache.unomi.api.Profileaction
- the action used to call this method, to retrieve parameters @see org.apache.unomi.api.actions.Action- Returns:
- true if the visitor is successfully removed to a MailChimp list.
-
unsubscribeFromMCList
public MailChimpResult unsubscribeFromMCList(Profile profile, Action action)
Description copied from interface:MailChimpService
This function will unsbscribe the current visitor to a MailChimp list.- Specified by:
unsubscribeFromMCList
in interfaceMailChimpService
- Parameters:
profile
- the Unomi profile to unsubscribe from the list @see org.apache.unomi.api.Profileaction
- the action used to call this method, to retrieve parameters @see org.apache.unomi.api.actions.Action- Returns:
- true if the visitor is successfully unsbscribed to a MailChimp list.
-
updateMCProfileProperties
public MailChimpResult updateMCProfileProperties(Profile profile, Action action)
Description copied from interface:MailChimpService
This function will update merge properties of MailChimp list.- Specified by:
updateMCProfileProperties
in interfaceMailChimpService
- Parameters:
profile
- the Unomi profile to unsubscribe from the list @see org.apache.unomi.api.Profileaction
- the action used to call this method, to retrieve parameters @see org.apache.unomi.api.actions.Action- Returns:
- true if the visitor is successfully unsbscribed to a MailChimp list.
-
setApiKey
public void setApiKey(String apiKey)
-
setUrlSubDomain
public void setUrlSubDomain(String urlSubDomain)
-
setListMergeFieldMapping
public void setListMergeFieldMapping(String listMergeFields)
-
setIsMergeFieldsActivate
public void setIsMergeFieldsActivate(Boolean isMergeFieldsActivate)
-
-