public class GetNewslettersAction extends ServiceableAction
Modifier and Type | Field and Description |
---|---|
private static String |
__CATEGORY_TYPE
The String representing the type of a newsletter category node
|
private static String |
__MODE_READ
The String representing the read-mode of a node
|
private static String |
__MODE_WRITE
The String representing the write-mode of a node
|
private static String |
__NEWSLETTER_TYPE
The String representing the type of a newsletter node
|
private static String |
__PROVIDER_TYPE
The String representing the type of a newsletter category provider node
|
private CategoryDAO |
_categoryDAO |
private CategoryProviderExtensionPoint |
_categoryProviderEP |
private NewsletterDAO |
_newsletterDAO |
manager
EMPTY_MAP
Constructor and Description |
---|
GetNewslettersAction() |
Modifier and Type | Method and Description |
---|---|
Map |
act(Redirector redirector,
SourceResolver resolver,
Map objectModel,
String source,
Parameters parameters) |
protected Map<String,Object> |
categoryToJSON(Category category,
CategoryProvider categoryProvider)
Gets category's properties to JSON format
|
protected Map<String,Object> |
newsletterToJSON(Content newsletter,
CategoryProvider categoryProvider)
Gets newsletter's properties to JSON format
|
protected Map<String,Object> |
providerToJSON(CategoryProvider categoryProvider,
String siteName,
String lang)
Gets category provider's properties to JSON format
|
void |
service(ServiceManager serviceManager) |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
private static final String __PROVIDER_TYPE
private static final String __CATEGORY_TYPE
private static final String __NEWSLETTER_TYPE
private static final String __MODE_WRITE
private static final String __MODE_READ
private CategoryProviderExtensionPoint _categoryProviderEP
private NewsletterDAO _newsletterDAO
private CategoryDAO _categoryDAO
public GetNewslettersAction()
public void service(ServiceManager serviceManager) throws ServiceException
service
in interface Serviceable
service
in class ServiceableAction
ServiceException
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception
Exception
protected Map<String,Object> providerToJSON(CategoryProvider categoryProvider, String siteName, String lang)
categoryProvider
- The category providersiteName
- The site namelang
- The langprotected Map<String,Object> categoryToJSON(Category category, CategoryProvider categoryProvider)
category
- The categorycategoryProvider
- The category providerprotected Map<String,Object> newsletterToJSON(Content newsletter, CategoryProvider categoryProvider)
newsletter
- The newslettercategoryProvider
- The category provider