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

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

public class NewsletterSubscriptionHandler
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
NewsletterSubscriptionHandler(java.lang.String workspace)
          Instantiates a new newsletter subscription handler.
NewsletterSubscriptionHandler(java.lang.String repository, java.lang.String workspace)
          Deprecated. 
 
Method Summary
 void add(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider, java.lang.String portalName, NewsletterSubscriptionConfig subscription)
          Adds the.
 void delete(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider, java.lang.String portalName, java.lang.String categoryName, NewsletterSubscriptionConfig subscription)
          Delete.
 void edit(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider, java.lang.String portalName, NewsletterSubscriptionConfig subscription)
          Edits the.
 long getNumberOfNewslettersWaiting(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider, java.lang.String portalName, java.lang.String categoryName, java.lang.String subScriptionName)
          Gets the number of newsletters waiting.
 java.util.List<NewsletterSubscriptionConfig> getSubscriptionByRedactor(java.lang.String portalName, java.lang.String categoryName, java.lang.String userName, org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider)
           
 java.util.List<NewsletterSubscriptionConfig> getSubscriptionIdsByPublicUser(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider, java.lang.String portalName, java.lang.String userEmail)
          Gets the subscription ids by public user.
 java.util.List<NewsletterSubscriptionConfig> getSubscriptionsByCategory(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider, java.lang.String portalName, java.lang.String categoryName)
          Gets the subscriptions by category.
 NewsletterSubscriptionConfig getSubscriptionsByName(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider, java.lang.String portalName, java.lang.String categoryName, java.lang.String subCriptionName)
          Gets the subscriptions by name.
 boolean isRemove()
           
 void setRemove(boolean isRemove)
           
 java.util.List<java.lang.String> updatePermissionForSubscriptionNode(javax.jcr.Node subscriptionNode, NewsletterSubscriptionConfig subscriptionConfig, boolean isAddNew)
          Update permission for category node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NewsletterSubscriptionHandler

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

Instantiates a new newsletter subscription handler.

Parameters:
repository - the repository
workspace - the workspace

NewsletterSubscriptionHandler

public NewsletterSubscriptionHandler(java.lang.String workspace)
Instantiates a new newsletter subscription handler.

Parameters:
workspace - the workspace
Method Detail

isRemove

public boolean isRemove()

setRemove

public void setRemove(boolean isRemove)

updatePermissionForSubscriptionNode

public java.util.List<java.lang.String> updatePermissionForSubscriptionNode(javax.jcr.Node subscriptionNode,
                                                                            NewsletterSubscriptionConfig subscriptionConfig,
                                                                            boolean isAddNew)
                                                                     throws java.lang.Exception
Update permission for category node.

Parameters:
subscriptionNode - node which is will be updated
subscriptionConfig - Category Object
isAddNew - is True if is add new category node and False if only update
Throws:
java.lang.Exception - The Exception

add

public void add(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider,
                java.lang.String portalName,
                NewsletterSubscriptionConfig subscription)
         throws java.lang.Exception
Adds the.

Parameters:
sessionProvider - the session provider
portalName - the portal name
subscription - the subscription
Throws:
java.lang.Exception - the exception

edit

public void edit(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider,
                 java.lang.String portalName,
                 NewsletterSubscriptionConfig subscription)
Edits the.

Parameters:
portalName - the portal name
subscription - the subscription
sessionProvider - the session provider

delete

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

Parameters:
portalName - the portal name
categoryName - the category name
subscription - the subscription
sessionProvider - the session provider

getSubscriptionsByCategory

public java.util.List<NewsletterSubscriptionConfig> getSubscriptionsByCategory(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider,
                                                                               java.lang.String portalName,
                                                                               java.lang.String categoryName)
                                                                        throws java.lang.Exception
Gets the subscriptions by category.

Parameters:
portalName - the portal name
categoryName - the category name
sessionProvider - the session provider
Returns:
the subscriptions by category
Throws:
java.lang.Exception - the exception

getSubscriptionByRedactor

public java.util.List<NewsletterSubscriptionConfig> getSubscriptionByRedactor(java.lang.String portalName,
                                                                              java.lang.String categoryName,
                                                                              java.lang.String userName,
                                                                              org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider)
                                                                       throws java.lang.Exception
Throws:
java.lang.Exception

getSubscriptionIdsByPublicUser

public java.util.List<NewsletterSubscriptionConfig> getSubscriptionIdsByPublicUser(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider,
                                                                                   java.lang.String portalName,
                                                                                   java.lang.String userEmail)
                                                                            throws java.lang.Exception
Gets the subscription ids by public user.

Parameters:
portalName - the portal name
userEmail - the user email
sessionProvider - the session provider
Returns:
the subscription ids by public user
Throws:
java.lang.Exception - the exception

getSubscriptionsByName

public NewsletterSubscriptionConfig getSubscriptionsByName(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider,
                                                           java.lang.String portalName,
                                                           java.lang.String categoryName,
                                                           java.lang.String subCriptionName)
                                                    throws java.lang.Exception
Gets the subscriptions by name.

Parameters:
portalName - the portal name
categoryName - the category name
subCriptionName - the sub cription name
sessionProvider - the session provider
Returns:
the subscriptions by name
Throws:
java.lang.Exception - the exception

getNumberOfNewslettersWaiting

public long getNumberOfNewslettersWaiting(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 number of newsletters waiting.

Parameters:
portalName - the portal name
categoryName - the category name
subScriptionName - the sub scription name
sessionProvider - the session provider
Returns:
the number of newsletters waiting
Throws:
java.lang.Exception - the exception


Copyright © 2014 eXo Platform SAS. All Rights Reserved.