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

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

public class NewsletterCategoryHandler
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
NewsletterCategoryHandler(java.lang.String workspace)
          Instantiates a new newsletter category handler.
NewsletterCategoryHandler(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, NewsletterCategoryConfig categoryConfig)
          Adds the.
 void delete(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider, java.lang.String portalName, java.lang.String categoryName)
          Delete.
 void edit(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider, java.lang.String portalName, NewsletterCategoryConfig categoryConfig)
          Edits the.
 NewsletterCategoryConfig getCategoryByName(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider, java.lang.String portalName, java.lang.String categoryName)
          Gets the category by name.
 javax.jcr.Node getCategoryFromConfig(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider, java.lang.String portalName, NewsletterCategoryConfig config)
          Gets the category node from NewsletterCategoryConfig.
 NewsletterCategoryConfig getCategoryFromNode(javax.jcr.Node categoryNode)
          Gets the category from node.
 java.util.List<NewsletterCategoryConfig> getListCategories(java.lang.String portalName, org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider)
          Gets the list categories.
 java.util.List<NewsletterCategoryConfig> getListCategoriesCanView(java.lang.String portalName, java.lang.String userName, org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider)
          Get list of categories which - Current user has permission in a category - Current user doesn't have permission but has permissions in one of subscriptions in a category
 boolean isRemove()
           
 void setRemove(boolean isRemove)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NewsletterCategoryHandler

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

Instantiates a new newsletter category handler.

Parameters:
repository - the repository
workspace - the workspace

NewsletterCategoryHandler

public NewsletterCategoryHandler(java.lang.String workspace)
Instantiates a new newsletter category handler.

Parameters:
workspace - the workspace
Method Detail

isRemove

public boolean isRemove()

setRemove

public void setRemove(boolean isRemove)

getCategoryFromNode

public NewsletterCategoryConfig getCategoryFromNode(javax.jcr.Node categoryNode)
                                             throws java.lang.Exception
Gets the category from node.

Parameters:
categoryNode - the category node
Returns:
the category from node
Throws:
java.lang.Exception - the exception

getCategoryFromConfig

public javax.jcr.Node getCategoryFromConfig(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider,
                                            java.lang.String portalName,
                                            NewsletterCategoryConfig config)
                                     throws java.lang.Exception
Gets the category node from NewsletterCategoryConfig.

Parameters:
SessionProvider - the session provider
portalName - the current portal's name
NewsletterCategoryConfig - the newsletter category object
Returns:
the category node
Throws:
java.lang.Exception - the exception

add

public void add(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider,
                java.lang.String portalName,
                NewsletterCategoryConfig categoryConfig)
Adds the.

Parameters:
portalName - the portal name
categoryConfig - the category config
sessionProvider - the session provider

edit

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

Parameters:
portalName - the portal name
categoryConfig - the category config
sessionProvider - the session provider

delete

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

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

getCategoryByName

public NewsletterCategoryConfig getCategoryByName(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider,
                                                  java.lang.String portalName,
                                                  java.lang.String categoryName)
                                           throws java.lang.Exception
Gets the category by name.

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

getListCategories

public java.util.List<NewsletterCategoryConfig> getListCategories(java.lang.String portalName,
                                                                  org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider)
                                                           throws java.lang.Exception
Gets the list categories.

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

getListCategoriesCanView

public java.util.List<NewsletterCategoryConfig> getListCategoriesCanView(java.lang.String portalName,
                                                                         java.lang.String userName,
                                                                         org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider)
                                                                  throws java.lang.Exception
Get list of categories which - Current user has permission in a category - Current user doesn't have permission but has permissions in one of subscriptions in a category

Parameters:
portalName - the current portal's name
userName - the current user's name
sessionProvider - the session provider
Returns:
the list of newsletter category object
Throws:
java.lang.Exception


Copyright © 2014 eXo Platform SAS. All Rights Reserved.