|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.dotmarketing.portlets.mailinglists.factories.MailingListFactory
public class MailingListFactory
| Constructor Summary | |
|---|---|
MailingListFactory()
|
|
| Method Summary | |
|---|---|
static boolean |
addMailingSubscriber(MailingList ml,
UserProxy up,
boolean force)
Add a subscriber to the passed mailing |
static void |
deleteAllBouncesFromMailingList(MailingList ml)
Removes all the associated bounce from the given list |
static void |
deleteAllSubscribersFromMailingList(MailingList ml)
Removes all the associated subscriber from the given list |
static void |
deleteAllUnsubscribersFromMailingList(MailingList ml)
Removes all the associated unsubscriber from the given list |
static boolean |
deleteBounceFromMailingList(MailingList ml,
UserProxy up)
Delete subscriber of the subscriber to the given mailing |
static boolean |
deleteSubscriberFromMailingList(MailingList ml,
UserProxy up)
Delete subscriber of the subscriber to the given mailing |
static boolean |
deleteUnsubscriberFromMailingList(MailingList ml,
UserProxy up)
Delete subscriber of the subscriber to the given mailing |
static boolean |
deleteUserFromMailingList(MailingList ml,
UserProxy up)
Delete a user from the given mailing regardless if it's a subscriber, unsubscriber or bounce |
static java.util.List<MailingList> |
getAllMailingLists()
Retrieves all the mailing lists |
static java.util.List<MailingList> |
getAllMailingLists(java.lang.String orderby)
Retrieves all the mailing lists sort by specified field |
static java.util.List<MailingList> |
getAllMailingLists(java.lang.String orderby,
java.lang.String direction)
Retrieves all the mailing lists sort by specified field |
static java.util.List |
getAllMailingListsCondition(java.lang.String condition)
Retrieves all the mailing lists that match condition. |
static java.util.List<MailingList> |
getAllPublicLists()
Retrieves the list of all public mailing list |
static java.util.List<UserProxy> |
getMailingListBounces(MailingList ml)
Return the list of bounces or errors from a mailing list |
static java.util.List<UserProxy> |
getMailingListBounces(java.lang.String mlInode,
java.lang.String userId,
int start,
int limit,
java.lang.String orderBy)
Return the list of bounces or errors from a mailing list for pagination and filter by only the subscribers the user can see, if userId is null it will pull all results |
static int |
getMailingListBouncesCount(java.lang.String mlInode)
Returns the count of bounces/errors of a mailing list |
static int |
getMailingListBouncesCount(java.lang.String mlInode,
java.lang.String userId)
Return the count of bounces/errors in a mailing list filter by what the user can see if a userId is supplied |
static MailingList |
getMailingListsByInode(java.lang.String inode)
Returns the mailing list specified |
static java.util.List<MailingList> |
getMailingListsBySubscriber(com.liferay.portal.model.User u)
return a list of all the mailing list (private and public) where the user is susbcribed |
static java.util.List<MailingList> |
getMailingListsByUser(com.liferay.portal.model.User u)
Returns a list of mailing lists that belongs to the given user |
static java.util.List<MailingList> |
getMailingListsByUser(com.liferay.portal.model.User u,
java.lang.String orderby)
Returns a list of mailing lists that belongs to the given user |
static java.util.List<MailingList> |
getMailingListsByUser(com.liferay.portal.model.User u,
java.lang.String orderby,
java.lang.String direction)
Returns a list of mailing lists that belongs to the given user |
static java.util.List |
getMailingListsByUserCondition(com.liferay.portal.model.User user,
java.lang.String condition)
Retrieves mailing lists that belong a user and match condition. |
static java.util.List<UserProxy> |
getMailingListSubscribers(MailingList ml)
Return the list of subscriber of a mailing list |
static java.util.List<UserProxy> |
getMailingListSubscribers(java.lang.String mlInode,
java.lang.String userId,
int start,
int limit,
java.lang.String orderBy)
Return the list of subscriber of a mailing list for pagination and filter by only the subscribers the user can see, if userId is null it will pull all results |
static int |
getMailingListSubscribersCount(java.lang.String mlInode)
Returns the count of subscribers of a mailing list |
static int |
getMailingListSubscribersCount(java.lang.String mlInode,
java.lang.String userId)
Return the count of subscribers in a mailing list filter by what the user can see if a userId is supplied |
static java.util.List<UserProxy> |
getMailingListUnsubscribers(MailingList ml)
Return the list of user who unsubscribed from a mailing list |
static java.util.List<UserProxy> |
getMailingListUnsubscribers(java.lang.String mlInode,
java.lang.String userId,
int start,
int limit,
java.lang.String orderBy)
Return the list of user who unsubscribed from a mailing list for pagination and filter by only the subscribers the user can see, if userId is null it will pull all results |
static int |
getMailingListUnsubscribersCount(java.lang.String mlInode)
Return the count of people how unsubscribe from a mailing list |
static int |
getMailingListUnsubscribersCount(java.lang.String mlInode,
java.lang.String userId)
Return the count of people how unsubscribe from a mailing list filter by what the passed user can see if a userId is supplied |
static MailingList |
getUnsubscribersMailingList()
get the Unsubscribers Mailing List, if it doesn't exists, it's created an returned |
static boolean |
isMailingListAdmin(com.liferay.portal.model.User user)
Returns true if the user belongs to the MAILINGLISTS_ADMIN_ROLE |
static boolean |
isMailingListEditor(com.liferay.portal.model.User user)
Returns true if the user belongs to the MAILINGLISTS_EDITOR_ROLE |
static boolean |
isMailingListManager(com.liferay.portal.model.User user)
Returns true if the user belongs to the MAILINGLISTS_ADMIN_ROLE or to the USER_MANAGER_ADMIN_ROLE |
static boolean |
isSubscribed(MailingList ml,
UserProxy up)
Checks if a user is subscribed to a mailing list |
static boolean |
markAsBounceFromMailingList(MailingList ml,
UserProxy up)
Change a user to the bounce list from the passed mailing |
static MailingList |
newInstance()
|
static boolean |
unsubcribeFromMailingList(MailingList ml,
UserProxy up,
boolean force)
Unsubscribe a subscriber from the passed mailing |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MailingListFactory()
| Method Detail |
|---|
public static boolean isMailingListAdmin(com.liferay.portal.model.User user)
throws com.liferay.portal.PortalException,
com.liferay.portal.SystemException
user -
com.liferay.portal.PortalException
com.liferay.portal.SystemException
public static boolean isMailingListEditor(com.liferay.portal.model.User user)
throws com.liferay.portal.PortalException,
com.liferay.portal.SystemException
user -
com.liferay.portal.PortalException
com.liferay.portal.SystemException
public static boolean isMailingListManager(com.liferay.portal.model.User user)
throws com.liferay.portal.PortalException,
com.liferay.portal.SystemException
user -
com.liferay.portal.PortalException
com.liferay.portal.SystemExceptionpublic static MailingList getMailingListsByInode(java.lang.String inode)
inode -
com.liferay.portal.PortalException
com.liferay.portal.SystemExceptionpublic static java.util.List<MailingList> getMailingListsByUser(com.liferay.portal.model.User u)
user -
com.liferay.portal.PortalException
com.liferay.portal.SystemException
public static java.util.List<MailingList> getMailingListsByUser(com.liferay.portal.model.User u,
java.lang.String orderby)
u - orderby - Order field to use
public static java.util.List<MailingList> getMailingListsByUser(com.liferay.portal.model.User u,
java.lang.String orderby,
java.lang.String direction)
u - orderby - Order field to usedirection - sort direction (desc or asc)
public static java.util.List<MailingList> getAllMailingLists()
public static java.util.List<MailingList> getAllMailingLists(java.lang.String orderby)
orderby -
public static java.util.List<MailingList> getAllMailingLists(java.lang.String orderby,
java.lang.String direction)
orderby - direction -
public static java.util.List<MailingList> getAllPublicLists()
public static MailingList newInstance()
public static MailingList getUnsubscribersMailingList()
public static java.util.List<UserProxy> getMailingListSubscribers(MailingList ml)
throws java.lang.Exception
java.lang.Exception
public static java.util.List<UserProxy> getMailingListSubscribers(java.lang.String mlInode,
java.lang.String userId,
int start,
int limit,
java.lang.String orderBy)
throws java.lang.Exception
DotSecurityException
DotDataException
NoSuchUserException
java.lang.Exception
public static int getMailingListSubscribersCount(java.lang.String mlInode)
throws java.lang.Exception
mlInode -
java.lang.Exception
public static int getMailingListSubscribersCount(java.lang.String mlInode,
java.lang.String userId)
throws java.lang.Exception
mlInode - Mailing list inodeuserId - User id to filter the count
java.lang.Exception
public static java.util.List<UserProxy> getMailingListUnsubscribers(MailingList ml)
throws java.lang.Exception
java.lang.Exception
public static java.util.List<UserProxy> getMailingListUnsubscribers(java.lang.String mlInode,
java.lang.String userId,
int start,
int limit,
java.lang.String orderBy)
throws java.lang.Exception
java.lang.Exception
public static int getMailingListUnsubscribersCount(java.lang.String mlInode)
throws java.lang.Exception
mlInode -
java.lang.Exception
public static int getMailingListUnsubscribersCount(java.lang.String mlInode,
java.lang.String userId)
throws java.lang.Exception
mlInode - Mailing list inodeuserId - User id to filter the count
java.lang.Exception
public static java.util.List<UserProxy> getMailingListBounces(MailingList ml)
throws java.lang.Exception
java.lang.Exception
public static java.util.List<UserProxy> getMailingListBounces(java.lang.String mlInode,
java.lang.String userId,
int start,
int limit,
java.lang.String orderBy)
throws java.lang.Exception
java.lang.Exception
public static int getMailingListBouncesCount(java.lang.String mlInode)
throws java.lang.Exception
mlInode -
java.lang.Exception
public static int getMailingListBouncesCount(java.lang.String mlInode,
java.lang.String userId)
throws java.lang.Exception
mlInode - Mailing list inodeuserId - User id to filter the count
java.lang.Exception
public static boolean addMailingSubscriber(MailingList ml,
UserProxy up,
boolean force)
throws DotHibernateException
ml - The mailing list to add itup - The user to addforce - Forces the subscription even if the user was unsubscribed or belongs to the bounces
DotHibernateExceptionpublic static java.util.List<MailingList> getMailingListsBySubscriber(com.liferay.portal.model.User u)
u - user whom mailing lists are obtained
public static boolean unsubcribeFromMailingList(MailingList ml,
UserProxy up,
boolean force)
throws DotHibernateException
ml - The mailing listup - The user to unsubscribedforce - Forces the unsubscription even if the user was never in the list
DotHibernateException
public static boolean deleteUserFromMailingList(MailingList ml,
UserProxy up)
ml - The mailing listup - The user to remove
public static boolean deleteSubscriberFromMailingList(MailingList ml,
UserProxy up)
ml - The mailing listup - The user to remove
public static boolean deleteUnsubscriberFromMailingList(MailingList ml,
UserProxy up)
ml - The mailing listup - The user to remove
public static boolean deleteBounceFromMailingList(MailingList ml,
UserProxy up)
ml - The mailing listup - The user to remove
public static boolean markAsBounceFromMailingList(MailingList ml,
UserProxy up)
throws DotHibernateException
ml - The mailing listup - The user to change his status to bounced
DotHibernateExceptionpublic static void deleteAllSubscribersFromMailingList(MailingList ml)
ml - public static void deleteAllUnsubscribersFromMailingList(MailingList ml)
ml - public static void deleteAllBouncesFromMailingList(MailingList ml)
ml -
public static boolean isSubscribed(MailingList ml,
UserProxy up)
ml - up -
public static java.util.List getAllMailingListsCondition(java.lang.String condition)
condition -
public static java.util.List getMailingListsByUserCondition(com.liferay.portal.model.User user,
java.lang.String condition)
user - condition -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||