Class GetNewslettersAction
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.acting.AbstractAction
org.apache.cocoon.acting.ServiceableAction
org.ametys.plugins.newsletter.actions.GetNewslettersAction
- All Implemented Interfaces:
Component
,LogEnabled
,Serviceable
,Action
SAX events for category providers, categories and newsletters
-
Field Summary
Fields inherited from class org.apache.cocoon.acting.ServiceableAction
manager
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionact
(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) categoryToJSON
(Category category, CategoryProvider categoryProvider, boolean categoriesOnly) Gets category's properties to JSON formatnewsletterToJSON
(Content newsletter, CategoryProvider categoryProvider) Gets newsletter's properties to JSON formatproviderToJSON
(CategoryProvider categoryProvider, String siteName, String lang) Gets category provider's properties to JSON formatvoid
service
(ServiceManager serviceManager) Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Constructor Details
-
GetNewslettersAction
public GetNewslettersAction()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classServiceableAction
- Throws:
ServiceException
-
act
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception - Throws:
Exception
-
providerToJSON
protected Map<String,Object> providerToJSON(CategoryProvider categoryProvider, String siteName, String lang) Gets category provider's properties to JSON format- Parameters:
categoryProvider
- The category providersiteName
- The site namelang
- The lang- Returns:
- The category provider properties
-
categoryToJSON
protected Map<String,Object> categoryToJSON(Category category, CategoryProvider categoryProvider, boolean categoriesOnly) Gets category's properties to JSON format- Parameters:
category
- The categorycategoryProvider
- The category providercategoriesOnly
- true if only categories are displayed- Returns:
- The category properties
-
newsletterToJSON
protected Map<String,Object> newsletterToJSON(Content newsletter, CategoryProvider categoryProvider) Gets newsletter's properties to JSON format- Parameters:
newsletter
- The newslettercategoryProvider
- The category provider- Returns:
- The newsletter's properties
-