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

Class provides methods for transforming objects to messages. More...

Collaboration diagram for cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2MessagesCreator:
Collaboration graph

Static Public Member Functions

static String lineXMLElement (String elementName, String params)
 
static String blockXMLElement (String elementName, String params, String value)
 
static String XMLParam (String name, String value)
 
static String getXMLLoggedUser (User user)
 
static String getXMLUser (User user, boolean params[])
 
static String getXMLUsersList (ArrayList< User > users, boolean params[])
 
static String getXMLGroupsList (ArrayList< UserGroup > groups, boolean withUsers, boolean params[])
 
static String getXMLGroup (UserGroup group, boolean withUsers, boolean params[])
 
static String getXMLUserSettings (ArrayList< Settings > settings)
 

Detailed Description

Class provides methods for transforming objects to messages.

Class provides methods for transforming objects to messages.

Author
Martin Petr (xpetrm05)

Definition at line 29 of file P2MessagesCreator.java.

Member Function Documentation

static String cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2MessagesCreator.blockXMLElement ( String  elementName,
String  params,
String  value 
)
static

Method makes string with XML block element.

Parameters
elementNamename of lemeent
paramsparamethers of element
valuevalue of element
Returns
string with element

Definition at line 58 of file P2MessagesCreator.java.

Here is the caller graph for this function:

static String cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2MessagesCreator.getXMLGroup ( UserGroup  group,
boolean  withUsers,
boolean  params[] 
)
static

Method create XML message "group" element with informations about users group as parameters wit or without users in group. Displayed parameters of users can be restricted. Here is example of message:

* <group name="{group name}"
*  uri="{URI of group}">
*    {list of users in group}
* </group>
* 
Parameters
groupusers group
withUsersusers in group will be included if value is true
paramsrestrictions for users parameters in groups
Returns
XML message with users group

Definition at line 256 of file P2MessagesCreator.java.

Here is the call graph for this function:

Here is the caller graph for this function:

static String cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2MessagesCreator.getXMLGroupsList ( ArrayList< UserGroup groups,
boolean  withUsers,
boolean  params[] 
)
static

The method creates a XML message with a list of users groups. Here is example of message:

* <userGroups>
*   {list of users groups}
* </userGroups>
* 
Parameters
groupslist of users groups
paramsrestrictions for users parameters in groups
withUsersusers in group will be included if value is true
Returns
message with a list of users groups

Definition at line 228 of file P2MessagesCreator.java.

Here is the call graph for this function:

static String cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2MessagesCreator.getXMLLoggedUser ( User  user)
static

Method create XML message "logged" message with informations about user as parameters. Here is example of message:

* <logged uri="{user uri}"
*   login="{user login}"
*   name="{user name}"
*   email="{user email address}"
*   image="{URI of image of user}"/>
* 
Parameters
useruser that will be transform to message
Returns
string with message

Definition at line 108 of file P2MessagesCreator.java.

Here is the call graph for this function:

static String cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2MessagesCreator.getXMLUser ( User  user,
boolean  params[] 
)
static

Method create XML message "user" element with informations about user as parameters. Displayed parameters can be restricted. Here is example of message:

* <user uri="{user uri}"
*   login="{user login}"
*   name="{user name}"
*   email="{user email address}"
*   image="{URI of image of user}"/>
* 
* or:
* 
* <user uri="{user uri}"
*   login="{user login}"
*   name="{user name}"
*   email="{user email address}"
*   image="{URI of image of user}">
*    <groups>
*      {list of groups}
*    </groups>
* </user>
* 
Parameters
useruser that will be transform to message
paramsboolean array that inform which parameter will be include in final message if it's null all parameters will be include
Returns
string with message

Definition at line 149 of file P2MessagesCreator.java.

Here is the call graph for this function:

Here is the caller graph for this function:

static String cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2MessagesCreator.getXMLUserSettings ( ArrayList< Settings settings)
static

Method create XML message "settings" element with informations about users settings. Here is example of message:

* <settings>
*    {list of users settings}
* </settings>
* 
Parameters
settingsarray with user settings
Returns
XML message with users settings

Definition at line 291 of file P2MessagesCreator.java.

static String cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2MessagesCreator.getXMLUsersList ( ArrayList< User users,
boolean  params[] 
)
static

The method creates a XML message with a list of users. Here is example of message:

* <users>
*   {list of users}
* </users>
* 
Parameters
userslist of users
paramsrestrictions for users parameters
Returns
message with a list of users

Definition at line 202 of file P2MessagesCreator.java.

Here is the call graph for this function:

static String cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2MessagesCreator.lineXMLElement ( String  elementName,
String  params 
)
static

Method makes string with XML line element.

Parameters
elementNamename of lemeent
paramsparamethers of element
Returns
string with element

Definition at line 39 of file P2MessagesCreator.java.

Here is the caller graph for this function:

static String cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2MessagesCreator.XMLParam ( String  name,
String  value 
)
static

Method make string with XML parameter of element.

Parameters
namename of parameter
valuevalue of parameter
Returns
string with paramether

Definition at line 84 of file P2MessagesCreator.java.

Here is the caller graph for this function:


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