API FinTP REST
 All Classes Namespaces Files Functions Variables
ro.allevo.fintpws.resources.MessagesResource Class Reference

Resource class implementing /messages path methods and acting as /messages/{id} sub-resource locator. More...

Inheritance diagram for ro.allevo.fintpws.resources.MessagesResource:
ro.allevo.fintpws.resources.PagedCollection

Public Member Functions

 MessagesResource (UriInfo uriInfo, EntityManager entityManagerData, EntityManager entityManagerConfig, QueueEntity queueEntity)
 Creates a new instance of MessagesResource. More...
 
MessageResource getMessage (@PathParam("id") String messageGuid)
 Returns a message sub-resource with id messageId. More...
 
JSONObject getMessagesAsJson ()
 GET method : returns an application/json formatted list of messages. More...
 
Response postForm (JSONObject jsonEntity)
 POST method : creates a message. More...
 
JSONObject asJson () throws JSONException
 Returns the resource formatted as json. More...
 
- Public Member Functions inherited from ro.allevo.fintpws.resources.PagedCollection
 PagedCollection (UriInfo uriInfo, Query itemsQuery, Query totalQuery)
 Constructor for PagedCollection. More...
 
List<?> getItems ()
 Method getItems. More...
 
Query getItemsQuery ()
 Method getItemsQuery. More...
 
Query getTotalQuery ()
 Method getTotalQuery. More...
 
void setItemsQuery (Query itemsQuery)
 Method setItemsQuery. More...
 
void setTotalQuery (Query totalQuery)
 Method setTotalQuery. More...
 
boolean hasMore ()
 Method has_more. More...
 
UriInfo getUriInfo ()
 Method getUriInfo. More...
 

Private Attributes

boolean isMessageInQueue = false
 Field isMessageInQueue. More...
 
boolean needsPayload = false
 Field needsPayload. More...
 
UriInfo uriInfo
 Field uriInfo. More...
 
EntityManager entityManagerData
 Field entityManagerData. More...
 
EntityManager entityManagerConfig
 Field entityManagerConfig. More...
 
QueueEntity queueEntity = null
 Field queueEntity. More...
 

Static Private Attributes

static Logger logger
 Field logger. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ro.allevo.fintpws.resources.PagedCollection
void getPage ()
 Method getPage. More...
 
JSONObject asJson () throws JSONException
 Method asJson. More...
 

Detailed Description

Resource class implementing /messages path methods and acting as /messages/{id} sub-resource locator.

Author
horia
Version
Revision:
1.0

Constructor & Destructor Documentation

ro.allevo.fintpws.resources.MessagesResource.MessagesResource ( UriInfo  uriInfo,
EntityManager  entityManagerData,
EntityManager  entityManagerConfig,
QueueEntity  queueEntity 
)
inline

Creates a new instance of MessagesResource.

Parameters
uriInfoUriInfo
entityManagerDataEntityManager
queueEntityQueueEntity
entityManagerConfigEntityManager

Member Function Documentation

JSONObject ro.allevo.fintpws.resources.MessagesResource.asJson ( ) throws JSONException
inline

Returns the resource formatted as json.

Returns
JSONObject *
Exceptions
JSONException
MessageResource ro.allevo.fintpws.resources.MessagesResource.getMessage ( @PathParam("id") String  messageGuid)
inline

Returns a message sub-resource with id messageId.

Parameters
messageGuidString
Returns
MessageResource The message sub-resource
JSONObject ro.allevo.fintpws.resources.MessagesResource.getMessagesAsJson ( )
inline

GET method : returns an application/json formatted list of messages.

Returns
JSONObject The list of messages
Response ro.allevo.fintpws.resources.MessagesResource.postForm ( JSONObject  jsonEntity)
inline

POST method : creates a message.

Parameters
jsonEntityJSONObject The message to be created
Returns
Response The URI of the newly created message *
Exceptions
JSONException

Member Data Documentation

EntityManager ro.allevo.fintpws.resources.MessagesResource.entityManagerConfig
private

Field entityManagerConfig.

EntityManager ro.allevo.fintpws.resources.MessagesResource.entityManagerData
private

Field entityManagerData.

boolean ro.allevo.fintpws.resources.MessagesResource.isMessageInQueue = false
private

Field isMessageInQueue.

Logger ro.allevo.fintpws.resources.MessagesResource.logger
staticprivate
Initial value:
= LogManager.getLogger(MessagesResource.class
.getName())

Field logger.

boolean ro.allevo.fintpws.resources.MessagesResource.needsPayload = false
private

Field needsPayload.

QueueEntity ro.allevo.fintpws.resources.MessagesResource.queueEntity = null
private

Field queueEntity.

UriInfo ro.allevo.fintpws.resources.MessagesResource.uriInfo
private

Field uriInfo.


The documentation for this class was generated from the following file: