Class GetFeedsContentsAction
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.apache.cocoon.acting.AbstractAction
-
- org.apache.cocoon.acting.ServiceableAction
-
- org.ametys.plugins.mobileapp.action.AbstractPostAction
-
- org.ametys.plugins.mobileapp.action.AbstractLoggedAction
-
- org.ametys.plugins.mobileapp.action.GetFeedsContentsAction
-
- All Implemented Interfaces:
Component,LogEnabled,Serviceable,Action
public class GetFeedsContentsAction extends AbstractLoggedAction
Returns the list of feeds for a user
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classGetFeedsContentsAction.QuerySearchresultContent fetched from a query
-
Field Summary
Fields Modifier and Type Field Description protected QueriesHelper_queryHelperThe Ametys object resolver-
Fields inherited from class org.ametys.plugins.mobileapp.action.AbstractLoggedAction
_currentUserProvider
-
Fields inherited from class org.ametys.plugins.mobileapp.action.AbstractPostAction
_jsonUtils
-
Fields inherited from class org.apache.cocoon.acting.ServiceableAction
manager
-
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP
-
-
Constructor Summary
Constructors Constructor Description GetFeedsContentsAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intcompareDates(Object o1, Object o2)protected Map<String,String>contentToJson(GetFeedsContentsAction.QuerySearchresult searchResult)Transform a content into a json mapprotected Map<String,Object>doLoggedInAction(Request request, Map<String,Object> jsonParams)Execute the action that requires to be logged invoidservice(ServiceManager smanager)-
Methods inherited from class org.ametys.plugins.mobileapp.action.AbstractLoggedAction
doAction
-
Methods inherited from class org.ametys.plugins.mobileapp.action.AbstractPostAction
act, getParameter, getParameters
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
_queryHelper
protected QueriesHelper _queryHelper
The Ametys object resolver
-
-
Constructor Detail
-
GetFeedsContentsAction
public GetFeedsContentsAction()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classAbstractLoggedAction- Throws:
ServiceException
-
doLoggedInAction
protected Map<String,Object> doLoggedInAction(Request request, Map<String,Object> jsonParams)
Description copied from class:AbstractLoggedActionExecute the action that requires to be logged in- Specified by:
doLoggedInActionin classAbstractLoggedAction- Parameters:
request- the requestjsonParams- map of parameters passed in the post body as json- Returns:
- the json map to return
-
contentToJson
protected Map<String,String> contentToJson(GetFeedsContentsAction.QuerySearchresult searchResult)
Transform a content into a json map- Parameters:
searchResult- the search result containing tho content- Returns:
- a json map
-
compareDates
protected int compareDates(Object o1, Object o2) throws ClassCastException
- Parameters:
o1- aZonedDateTimeand/orLocalDateand/orDateo2- aZonedDateTimeand/orLocalDateand/orDate- Returns:
- -1 if o1 is before o2, +1 if o1 is after o2, 0 if same date (not equals)
- Throws:
ClassCastException- one of the object is not aZonedDateTimeorLocalDateorDate
-
-