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

Operations with persons (users of this server) and with user groups. More...

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

Public Member Functions

String processRequestBeforePersist (RequestInfo requestInfo)
 
String processRequestAfterPersist (RequestInfo requestInfo, boolean persistFailed)
 
String processQUG (Iterator< String > reqIter, Boolean withPersons, RequestInfo requestInfo)
 
String processQP (Iterator< String > reqIter, Boolean withGroups, RequestInfo requestInfo)
 
String messagesFromFlier (Flier flier, EditorSession session)
 
String getModuleName (int lang)
 
String getModuleDescription (int lang)
 

Private Member Functions

ArrayList< UserGroupgroupQuerry (ArrayList< String > queryList)
 
ArrayList< UseruserQuerry (ArrayList< String > queryList)
 
String getWildcardPrefix (String value)
 

Detailed Description

Operations with persons (users of this server) and with user groups.

Class which performs operations with persons (users of this server) and with user groups

Author
idytrych

Definition at line 49 of file PersonsModule.java.

Member Function Documentation

String cz.vutbr.fit.knot.annotations.modules.PersonsModule.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 594 of file PersonsModule.java.

String cz.vutbr.fit.knot.annotations.modules.PersonsModule.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 582 of file PersonsModule.java.

String cz.vutbr.fit.knot.annotations.modules.PersonsModule.getWildcardPrefix ( String  value)
private

Method checks whether the string contains wildchar "*". If the string contains wildchar the method returns prefix.

Parameters
valuestring in which will be searched
Returns
prefix before wildchar or null if string don't contains wildchar

Definition at line 549 of file PersonsModule.java.

Here is the caller graph for this function:

ArrayList<UserGroup> cz.vutbr.fit.knot.annotations.modules.PersonsModule.groupQuerry ( ArrayList< String >  queryList)
private

Gets queried user groups (for protocol 2.0 only)

Parameters
queryListList with informations about query (filters). For each filter criteria there is one position (index) in the list. Value of the filter is the value on the given index.
Returns
Returns list of groups for gven query

Definition at line 368 of file PersonsModule.java.

Here is the call graph for this function:

Here is the caller graph for this function:

String cz.vutbr.fit.knot.annotations.modules.PersonsModule.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 570 of file PersonsModule.java.

String cz.vutbr.fit.knot.annotations.modules.PersonsModule.processQP ( Iterator< String >  reqIter,
Boolean  withGroups,
RequestInfo  requestInfo 
)

Gets queried persons (users) in XML string

Parameters
reqIterIterator to array with filters (queries)
withGroupsIf users groups have to be included, then true, false otherwise
requestInfoInformations about client request
Returns
Returns XML string with queried persons

Definition at line 199 of file PersonsModule.java.

Here is the call graph for this function:

Here is the caller graph for this function:

String cz.vutbr.fit.knot.annotations.modules.PersonsModule.processQUG ( Iterator< String >  reqIter,
Boolean  withPersons,
RequestInfo  requestInfo 
)

Gets queried user groups in XML string

Parameters
reqIterIterator to array with filters (queries)
withPersonsIf persons have to be included, then true, false otherwise
requestInfoInformations about client request
Returns
Returns XML string with queried user groups

Definition at line 126 of file PersonsModule.java.

Here is the call graph for this function:

Here is the caller graph for this function:

String cz.vutbr.fit.knot.annotations.modules.PersonsModule.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:

  • creating message with queried persons
  • creating message with queried user groups
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 78 of file PersonsModule.java.

Here is the call graph for this function:

String cz.vutbr.fit.knot.annotations.modules.PersonsModule.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.

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

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

Definition at line 60 of file PersonsModule.java.

ArrayList<User> cz.vutbr.fit.knot.annotations.modules.PersonsModule.userQuerry ( ArrayList< String >  queryList)
private

Gets queried users (for protocol 2.0 only)

Parameters
queryListList with informations about query (filters). For each filter criteria there is one position (index) in the list. Value of the filter is the value on the given index.
Returns
Returns list of users for gven query

Definition at line 448 of file PersonsModule.java.

Here is the call graph for this function:

Here is the caller graph for this function:


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