Package org.exoplatform.leadcapture
Class Utils
- java.lang.Object
-
- org.exoplatform.leadcapture.Utils
-
public class Utils extends Object
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Utils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static floatcalculateNumberOfDays(long from, long to)static org.json.JSONObjectcommentToJson(org.exoplatform.task.dto.CommentDto comment, String author, String authorName)static org.exoplatform.social.core.activity.model.ExoSocialActivitycreateActivity(LeadEntity lead)static <T> TfromJsonString(String value, Class<T> resultClass)static StringgetCaptureMethode(String form)static org.json.JSONArraygetCommentsJson(List<org.exoplatform.task.dto.CommentDto> comments)static MailContentDTOgetContentForMail(MailTemplateDTO mailTemplateDTO, LeadEntity lead)static StringgetGeoZone(String country)static List<org.exoplatform.services.organization.User>getGroupMembers(String groupId)static StringgetLeadSource(String originalReferrer)static org.exoplatform.task.dto.ProjectDtogetTaskProject(String groupId, String taskProject)static booleanisInList(String referrer, String[] sources)static booleanisResourceRequest(String field)static voidsaveComment(String activityId, ResponseEntity responseEntity)static voidsaveComment(org.exoplatform.social.core.activity.model.ExoSocialActivity activity, String commentText, String userId, String posterId)static StringtoJsonString(Object object)static org.json.JSONObjecttoResponseJson(ResponseEntity responseEntity)
-
-
-
Field Detail
-
LEAD_DEFAULT_STATUS
public static final String LEAD_DEFAULT_STATUS
- See Also:
- Constant Field Values
-
LEAD_OPEN_STATUS
public static final String LEAD_OPEN_STATUS
- See Also:
- Constant Field Values
-
LEAD_COMPLET_STATUS
public static final String LEAD_COMPLET_STATUS
- See Also:
- Constant Field Values
-
LEAD_BAD_STATUSES
public static final String[] LEAD_BAD_STATUSES
-
LEAD_COMPLET_STATUSES
public static final String[] LEAD_COMPLET_STATUSES
-
LEAD_INACTIVE_STATUSES
public static final String[] LEAD_INACTIVE_STATUSES
-
CREATION_DATE_FIELD_NAME
public static final String CREATION_DATE_FIELD_NAME
- See Also:
- Constant Field Values
-
FIELDS_DELIMITER
public static final String FIELDS_DELIMITER
- See Also:
- Constant Field Values
-
MAIL_DEFAULT_LANGUAGE
public static final String MAIL_DEFAULT_LANGUAGE
- See Also:
- Constant Field Values
-
NEW_LEAD_EVENT
public static final String NEW_LEAD_EVENT
- See Also:
- Constant Field Values
-
NEW_RESPONSE_EVENT
public static final String NEW_RESPONSE_EVENT
- See Also:
- Constant Field Values
-
DATE_FORMAT
public static final String DATE_FORMAT
- See Also:
- Constant Field Values
-
TASK_DATE_FORMAT
public static final String TASK_DATE_FORMAT
- See Also:
- Constant Field Values
-
QUERY_DATE_FORMAT
public static final String QUERY_DATE_FORMAT
- See Also:
- Constant Field Values
-
EMPTY_STR
public static final String EMPTY_STR
- See Also:
- Constant Field Values
-
ACTIVE_FILTER
public static final String ACTIVE_FILTER
- See Also:
- Constant Field Values
-
formatter
public static final SimpleDateFormat formatter
-
taskFormatter
public static final SimpleDateFormat taskFormatter
-
quryDateFormatter
public static final SimpleDateFormat quryDateFormatter
-
LEAD_CAPTURE_SCOPE_NAME
public static final String LEAD_CAPTURE_SCOPE_NAME
- See Also:
- Constant Field Values
-
LEAD_CAPTURE_CONTEXT_NAME
public static final String LEAD_CAPTURE_CONTEXT_NAME
- See Also:
- Constant Field Values
-
LEAD_CAPTURE_CONTEXT
public static final org.exoplatform.commons.api.settings.data.Context LEAD_CAPTURE_CONTEXT
-
LEAD_CAPTURE_SCOPE
public static final org.exoplatform.commons.api.settings.data.Scope LEAD_CAPTURE_SCOPE
-
LEAD_CAPTURE_SETTINGS_KEY_NAME
public static final String LEAD_CAPTURE_SETTINGS_KEY_NAME
- See Also:
- Constant Field Values
-
USERS_EXPERENCE_GROUP_NAME
public static final String USERS_EXPERENCE_GROUP_NAME
- See Also:
- Constant Field Values
-
ALLOWED_MAIL_DOMAIN
public static final String ALLOWED_MAIL_DOMAIN
- See Also:
- Constant Field Values
-
LEAD_CAPTURE_TOKEN
public static final String LEAD_CAPTURE_TOKEN
- See Also:
- Constant Field Values
-
LC_SOURCE_SOCIAL_NAME
public static final String LC_SOURCE_SOCIAL_NAME
- See Also:
- Constant Field Values
-
LC_SOURCE_DIRECT_NAME
public static final String LC_SOURCE_DIRECT_NAME
- See Also:
- Constant Field Values
-
LC_SOURCE_ORGANIC_NAME
public static final String LC_SOURCE_ORGANIC_NAME
- See Also:
- Constant Field Values
-
LC_SOURCE_REFERRAL_NAME
public static final String LC_SOURCE_REFERRAL_NAME
- See Also:
- Constant Field Values
-
LC_STATUSES
public static final String[] LC_STATUSES
-
LC_SOURCE_SOCIAL
public static final String[] LC_SOURCE_SOCIAL
-
LC_SOURCE_DIRECT
public static final String[] LC_SOURCE_DIRECT
-
LC_SOURCE_ORGANIC
public static final String[] LC_SOURCE_ORGANIC
-
LC_G_ZONE_US_CANADA_NAME
public static final String LC_G_ZONE_US_CANADA_NAME
- See Also:
- Constant Field Values
-
LC_G_ZONE_WESTERN_EUROPE_NAME
public static final String LC_G_ZONE_WESTERN_EUROPE_NAME
- See Also:
- Constant Field Values
-
LC_G_ZONE_ESTERN_EUROPE_NAME
public static final String LC_G_ZONE_ESTERN_EUROPE_NAME
- See Also:
- Constant Field Values
-
LC_G_ZONE_EUROPE_NAME
public static final String LC_G_ZONE_EUROPE_NAME
- See Also:
- Constant Field Values
-
LC_G_ZONE_LAT_AM_NAME
public static final String LC_G_ZONE_LAT_AM_NAME
- See Also:
- Constant Field Values
-
LC_G_ZONE_APAC_NAME
public static final String LC_G_ZONE_APAC_NAME
- See Also:
- Constant Field Values
-
LC_G_ZONE_MEA_NAME
public static final String LC_G_ZONE_MEA_NAME
- See Also:
- Constant Field Values
-
LC_G_ZONE_EUROPE
public static final String[] LC_G_ZONE_EUROPE
-
LC_G_ZONE_APAC
public static final String[] LC_G_ZONE_APAC
-
LC_G_ZONE_LAT_AM
public static final String[] LC_G_ZONE_LAT_AM
-
LC_G_ZONE_MEA
public static final String[] LC_G_ZONE_MEA
-
LC_G_ZONE_US_CANADA
public static final String[] LC_G_ZONE_US_CANADA
-
LC_CAPTURE_METHODE_CONTACT_US
public static final String[] LC_CAPTURE_METHODE_CONTACT_US
-
LC_CAPTURE_METHODE_DEMO_REQUEST
public static final String[] LC_CAPTURE_METHODE_DEMO_REQUEST
-
LC_CAPTURE_METHODE_RESOURCE_DOWNLOAD
public static final String[] LC_CAPTURE_METHODE_RESOURCE_DOWNLOAD
-
LC_CAPTURE_METHODE_REWARD
public static final String[] LC_CAPTURE_METHODE_REWARD
-
LC_CONTACT_US
public static final String LC_CONTACT_US
- See Also:
- Constant Field Values
-
LC_DEMO_REQUEST
public static final String LC_DEMO_REQUEST
- See Also:
- Constant Field Values
-
LC_RESOURCE_DOWNLOAD
public static final String LC_RESOURCE_DOWNLOAD
- See Also:
- Constant Field Values
-
LC_REWARD
public static final String LC_REWARD
- See Also:
- Constant Field Values
-
CASE_STUDY
public static final String CASE_STUDY
- See Also:
- Constant Field Values
-
WHITE_PAPER
public static final String WHITE_PAPER
- See Also:
- Constant Field Values
-
JSON_PARSER
public static final org.exoplatform.ws.frameworks.json.JsonParser JSON_PARSER
-
JSON_GENERATOR
public static final org.exoplatform.ws.frameworks.json.JsonGenerator JSON_GENERATOR
-
-
Method Detail
-
toResponseJson
public static org.json.JSONObject toResponseJson(ResponseEntity responseEntity)
-
getGroupMembers
public static List<org.exoplatform.services.organization.User> getGroupMembers(String groupId)
-
getContentForMail
public static MailContentDTO getContentForMail(MailTemplateDTO mailTemplateDTO, LeadEntity lead)
-
createActivity
public static org.exoplatform.social.core.activity.model.ExoSocialActivity createActivity(LeadEntity lead)
-
saveComment
public static void saveComment(String activityId, ResponseEntity responseEntity)
-
saveComment
public static void saveComment(org.exoplatform.social.core.activity.model.ExoSocialActivity activity, String commentText, String userId, String posterId)
-
getTaskProject
public static org.exoplatform.task.dto.ProjectDto getTaskProject(String groupId, String taskProject)
-
getCommentsJson
public static org.json.JSONArray getCommentsJson(List<org.exoplatform.task.dto.CommentDto> comments)
-
commentToJson
public static org.json.JSONObject commentToJson(org.exoplatform.task.dto.CommentDto comment, String author, String authorName)
-
isResourceRequest
public static boolean isResourceRequest(String field)
-
calculateNumberOfDays
public static float calculateNumberOfDays(long from, long to)
-
-