4A Server -  2.0
 All Classes Namespaces Files Functions Variables Enumerator
cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionManagerModule Class Reference

Class implements module for suggestiong of annotations. More...

Inheritance diagram for cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionManagerModule:
Inheritance graph
Collaboration diagram for cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionManagerModule:
Collaboration graph

Public Member Functions

String processRequestBeforePersist (RequestInfo requestInfo)
 
String processRequestAfterPersist (RequestInfo requestInfo, boolean persistFailed)
 
String messagesFromFlier (Flier flier, EditorSession session)
 
String getModuleName (int lang)
 
String getModuleDescription (int lang)
 

Detailed Description

Class implements module for suggestiong of annotations.

Class implements AnotServerModule calss for prupose of suggestiong of annotations. The module retrieves suggestions from NER or SEC API, stores them with their feedback and provides related services to the clients.

Author
Martin Petr (xpetrm05)

Definition at line 37 of file SuggestionManagerModule.java.

Member Function Documentation

String cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionManagerModule.getModuleDescription ( int  lang)

Returns description of this module. It will be part of information about server functions.

Parameters
langRequested language of description
Returns
Description of this module

Implements cz.vutbr.fit.knot.annotations.comet.AnnotServerModule.

Definition at line 117 of file SuggestionManagerModule.java.

String cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionManagerModule.getModuleName ( int  lang)

Returns name of this module. Name will be included in XML element attribute so usable characters are restricted.

Parameters
langRequested language of name
Returns
Name of this module

Implements cz.vutbr.fit.knot.annotations.comet.AnnotServerModule.

Definition at line 105 of file SuggestionManagerModule.java.

String cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionManagerModule.messagesFromFlier ( Flier  flier,
EditorSession  session 
)

This method is called for each sleeping comet handler when he receives flier (part of informations about this or another client request).

In this module it always returns empty string.

Parameters
flierFlier, which has been sent to all comet handlers.
sessionSession associated with comet handler.
Returns
If this handler hasn't react to this flier (not interested) return null, else return messages for client in single string.

Implements cz.vutbr.fit.knot.annotations.comet.AnnotServerModule.

Definition at line 93 of file SuggestionManagerModule.java.

String cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionManagerModule.processRequestAfterPersist ( RequestInfo  requestInfo,
boolean  persistFailed 
)

This method is called when client sent message, these message has been processed and changes in entities are persisted. Composed response is sent to client after calling this method from all modules. It performs:

  • starting of new thread which will handles main functionality of this module
Parameters
requestInfoInformations about client request
persistFailedTrue if changes not persisted, false otherwise.
Returns
String with messages for client or empty string

Implements cz.vutbr.fit.knot.annotations.comet.AnnotServerModule.

Definition at line 72 of file SuggestionManagerModule.java.

String cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionManagerModule.processRequestBeforePersist ( RequestInfo  requestInfo)

This method is called when client sent message and these message has been processed. Changes in types, annotations and in other entities are persisted after calling this method from all modules. It performs:

  • cleanup of suggestions in session after synchronization of document

In this module it always returns empty string.

Parameters
requestInfoInformations about client request
Returns
String with messages for client or empty string

Implements cz.vutbr.fit.knot.annotations.comet.AnnotServerModule.

Definition at line 52 of file SuggestionManagerModule.java.

Here is the call graph for this function:


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