org.exoplatform.services.wcm.newsletter.handler
Class NewsletterManageUserHandler

java.lang.Object
  extended by org.exoplatform.services.wcm.newsletter.handler.NewsletterManageUserHandler

public class NewsletterManageUserHandler
extends java.lang.Object

Created by The eXo Platform SAS Author : eXoPlatform chuong.phan@exoplatform.com, phan.le.thanh.chuong@gmail.com May 21, 2009


Constructor Summary
NewsletterManageUserHandler(java.lang.String workspace)
          Instantiates a new newsletter manage user handler.
NewsletterManageUserHandler(java.lang.String repository, java.lang.String workspace)
          Deprecated. 
 
Method Summary
 javax.jcr.Node add(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider, java.lang.String portalName, java.lang.String userMail)
          Adds the.
 void addAdministrator(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider, java.lang.String portalName, java.lang.String userId)
          Adds the administrator.
 void changeBanStatus(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider, java.lang.String portalName, java.lang.String userMail, boolean isBanClicked)
          Change ban status.
 boolean checkExistedEmail(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider, java.lang.String portalName, java.lang.String email)
          Check existed email.
 void delete(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider, java.lang.String portalName, java.lang.String userMail)
          Delete.
 void deleteUserAddministrator(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider, java.lang.String portalName, java.lang.String userId)
          Delete user addministrator.
 java.util.List<java.lang.String> getAllAdministrator(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider, java.lang.String portalName)
          Gets the all administrator.
 int getQuantityUserBySubscription(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider, java.lang.String portalName, java.lang.String categoryName, java.lang.String subscriptionName)
          Gets the quantity user by subscription.
 java.util.List<NewsletterUserConfig> getUsers(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider, java.lang.String portalName, java.lang.String categoryName, java.lang.String subscriptionName)
          Gets the users.
 boolean isAdministrator(java.lang.String portalName, java.lang.String userId)
          Check if user is an administrator or not
 boolean isModerator(java.lang.String userId, NewsletterCategoryConfig config)
          Check if user is a moderator of current category or not
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NewsletterManageUserHandler

@Deprecated
public NewsletterManageUserHandler(java.lang.String repository,
                                              java.lang.String workspace)
Deprecated. 

Instantiates a new newsletter manage user handler.

Parameters:
repository - the repository
workspace - the workspace

NewsletterManageUserHandler

public NewsletterManageUserHandler(java.lang.String workspace)
Instantiates a new newsletter manage user handler.

Parameters:
workspace - the workspace
Method Detail

getAllAdministrator

public java.util.List<java.lang.String> getAllAdministrator(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider,
                                                            java.lang.String portalName)
Gets the all administrator.

Parameters:
portalName - the portal name
Returns:
the all administrator

addAdministrator

public void addAdministrator(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider,
                             java.lang.String portalName,
                             java.lang.String userId)
                      throws java.lang.Exception
Adds the administrator.

Parameters:
portalName - the portal name
userId - the user id
Throws:
java.lang.Exception - the exception

deleteUserAddministrator

public void deleteUserAddministrator(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider,
                                     java.lang.String portalName,
                                     java.lang.String userId)
                              throws java.lang.Exception
Delete user addministrator.

Parameters:
portalName - the portal name
userId - the user id
Throws:
java.lang.Exception - the exception

add

public javax.jcr.Node add(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider,
                          java.lang.String portalName,
                          java.lang.String userMail)
                   throws java.lang.Exception
Adds the.

Parameters:
portalName - the portal name
userMail - the user mail
sessionProvider - the session provider
Returns:
the node
Throws:
java.lang.Exception

changeBanStatus

public void changeBanStatus(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider,
                            java.lang.String portalName,
                            java.lang.String userMail,
                            boolean isBanClicked)
Change ban status.

Parameters:
portalName - the portal name
userMail - the user mail
isBanClicked - the is ban clicked

delete

public void delete(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider,
                   java.lang.String portalName,
                   java.lang.String userMail)
Delete.

Parameters:
portalName - the portal name
userMail - the user mail
SessionProvider - the sessionprovider

getUsers

public java.util.List<NewsletterUserConfig> getUsers(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider,
                                                     java.lang.String portalName,
                                                     java.lang.String categoryName,
                                                     java.lang.String subscriptionName)
                                              throws java.lang.Exception
Gets the users.

Parameters:
portalName - the portal name
categoryName - the category name
subscriptionName - the subscription name
Returns:
the users
Throws:
java.lang.Exception - the exception

getQuantityUserBySubscription

public int getQuantityUserBySubscription(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider,
                                         java.lang.String portalName,
                                         java.lang.String categoryName,
                                         java.lang.String subscriptionName)
Gets the quantity user by subscription.

Parameters:
portalName - the portal name
categoryName - the category name
subscriptionName - the subscription name
Returns:
the quantity user by subscription

checkExistedEmail

public boolean checkExistedEmail(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider,
                                 java.lang.String portalName,
                                 java.lang.String email)
Check existed email.

Parameters:
portalName - the portal name
email - the email
Returns:
true, if successful

isAdministrator

public boolean isAdministrator(java.lang.String portalName,
                               java.lang.String userId)
Check if user is an administrator or not

Parameters:
userId - the current user
Returns:
true if user is an administrator, otherwise return false
Throws:
java.lang.Exception - the exception

isModerator

public boolean isModerator(java.lang.String userId,
                           NewsletterCategoryConfig config)
Check if user is a moderator of current category or not

Parameters:
userId - the current user
categoryName - the current category's name
Returns:
true if user is an administrator, otherwise return false
Throws:
java.lang.Exception - the exception


Copyright © 2014 eXo Platform SAS. All Rights Reserved.