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

Resource class implementing /messages/{id} path methods. More...

Public Member Functions

 MessageResource (UriInfo uriInfo, EntityManager entityManagerData, EntityManager entityManagerConfig, String messageId, boolean isMessageInQueue, boolean needsPayload)
 Creates a new instance of MessageResource. More...
 
JSONObject findDetailsMessage (JSONObject message) throws IllegalAccessException, InstantiationException, ClassNotFoundException, JSONException, IllegalArgumentException, SecurityException
 Method findDetailsMessage. More...
 
JSONObject getMessage ()
 GET method : returns an application/json formatted message. More...
 
EventsResource getEvents ()
 Method getEvents. More...
 
Response updateMessage (JSONObject jsonEntity)
 PUT method : updates the message. More...
 
Response deleteMessage ()
 DELETE method : deletes the message. More...
 
String toString ()
 Method toString. More...
 

Static Public Member Functions

static JSONObject asJson (RoutedMessageEntity messageEntity, boolean isMessageInQueue, boolean needsPayload, String path) throws JSONException
 Returns the resource formatted as json. More...
 
static JSONObject asJson (EntryQueueEntity messageEntity, boolean isMessageInQueue, boolean needsPayload, String path) throws JSONException
 

Private Attributes

UriInfo uriInfo
 Field uriInfo. More...
 
EntityManager entityManagerData
 Field entityManagerData. More...
 
EntityManager entityManagerConfig
 Field entityManagerConfig. More...
 
RoutedMessageEntity messageEntity
 Field messageEntity. More...
 
EntryQueueEntity messageQueueEntity
 Field messageQueueEntity. More...
 
boolean isMessageInQueue = false
 Field isMessageInQueue. More...
 
boolean needsPayload = false
 Field needsPayload. More...
 
String messageId
 Field messageId. More...
 

Static Private Attributes

static Logger logger
 Field logger. More...
 

Detailed Description

Resource class implementing /messages/{id} path methods.

Author
costi
Version
Revision:
1.0

Constructor & Destructor Documentation

ro.allevo.fintpws.resources.MessageResource.MessageResource ( UriInfo  uriInfo,
EntityManager  entityManagerData,
EntityManager  entityManagerConfig,
String  messageId,
boolean  isMessageInQueue,
boolean  needsPayload 
)
inline

Creates a new instance of MessageResource.

Parameters
uriInfoUriInfo actual uri passed by parent resource
entityManagerDataEntityManager passed by parent resource
messageIdString
isMessageInQueueboolean
needsPayloadboolean
entityManagerConfigEntityManager

Member Function Documentation

static JSONObject ro.allevo.fintpws.resources.MessageResource.asJson ( RoutedMessageEntity  messageEntity,
boolean  isMessageInQueue,
boolean  needsPayload,
String  path 
) throws JSONException
inlinestatic

Returns the resource formatted as json.

Parameters
messageEntityBusinessMessage
pathString
isMessageInQueueboolean
needsPayloadboolean
Returns
JSONObject *
Exceptions
JSONException
static JSONObject ro.allevo.fintpws.resources.MessageResource.asJson ( EntryQueueEntity  messageEntity,
boolean  isMessageInQueue,
boolean  needsPayload,
String  path 
) throws JSONException
inlinestatic
Response ro.allevo.fintpws.resources.MessageResource.deleteMessage ( )
inline

DELETE method : deletes the message.

Returns
Response
JSONObject ro.allevo.fintpws.resources.MessageResource.findDetailsMessage ( JSONObject  message) throws IllegalAccessException, InstantiationException, ClassNotFoundException, JSONException, IllegalArgumentException, SecurityException
inline

Method findDetailsMessage.

Parameters
messageJSONObject
Returns
JSONObject
Exceptions
IllegalAccessException
InstantiationException
ClassNotFoundException
JSONException
NoSuchMethodException
InvocationTargetException
SecurityException
IllegalArgumentException
EventsResource ro.allevo.fintpws.resources.MessageResource.getEvents ( )
inline

Method getEvents.

Returns
EventsResource
JSONObject ro.allevo.fintpws.resources.MessageResource.getMessage ( )
inline

GET method : returns an application/json formatted message.

Returns
JSONObject the message
String ro.allevo.fintpws.resources.MessageResource.toString ( )
inline

Method toString.

Returns
String
Response ro.allevo.fintpws.resources.MessageResource.updateMessage ( JSONObject  jsonEntity)
inline

PUT method : updates the message.

Parameters
jsonEntityJSONObject the message holding new values
Returns
Response

Member Data Documentation

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

Field entityManagerConfig.

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

Field entityManagerData.

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

Field isMessageInQueue.

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

Field logger.

RoutedMessageEntity ro.allevo.fintpws.resources.MessageResource.messageEntity
private

Field messageEntity.

String ro.allevo.fintpws.resources.MessageResource.messageId
private

Field messageId.

EntryQueueEntity ro.allevo.fintpws.resources.MessageResource.messageQueueEntity
private

Field messageQueueEntity.

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

Field needsPayload.

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

Field uriInfo.


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