BaltradDex
BALTRAD Data Exchange System
Loading...
Searching...
No Matches
eu.baltrad.dex.net.controller.UpdateSubscriptionController Class Reference

Public Member Functions

 UpdateSubscriptionController ()
 
String subscribedPeers (Model model)
 
String subscriptionByPeer (Model model, @RequestParam(value="peer_name", required=true) String peerName)
 
String selectedSubscription (Model model, @RequestParam(value="peer_name", required=true) String peerName, @RequestParam(value="current_subscription_ids", required=true) String[] currentSubscriptionIds, @RequestParam(value="selected_subscription_ids", required=false) String[] selectedSubscriptionIds)
 
String updateSubscription (Model model, @RequestParam(value="peer_name", required=true) String peerName, @RequestParam(value="active_subscription_ids", required=false) String[] activeSubscriptionIds, @RequestParam(value="inactive_subscription_ids", required=false) String[] inactiveSubscriptionIds)
 
void setConfigurationManager (IConfigurationManager confManager)
 
void setSubscriptionManager (ISubscriptionManager subscriptionManager)
 
void setNodeStatusManager (INodeStatusManager nodeStatusManager)
 
void setUserManager (IUserManager userManager)
 
void setHttpClient (IHttpClientUtil httpClient)
 
void setLog (Logger log)
 
void setAuthenticator (Authenticator authenticator)
 
void setMessageHelper (ModelMessageHelper messageHelper)
 
void setProtocolManager (ProtocolManager protocolManager)
 

Protected Member Functions

void initConfiguration ()
 
List< SubscriptioncreateSubscriptionRequest (String[] activeSubscriptionIds, String[] inactiveSubscriptionIds)
 
void storeLocalSubscriptions (String nodeName, List< Subscription > subscriptions) throws InternalControllerException
 

Protected Attributes

User localNode
 

Detailed Description

Controls subscription process.

Author
Maciej Szewczykowski | macie.nosp@m.j@ba.nosp@m.ltrad.nosp@m..eu
Version
1.1.0
Since
1.1.0

Constructor & Destructor Documentation

◆ UpdateSubscriptionController()

eu.baltrad.dex.net.controller.UpdateSubscriptionController.UpdateSubscriptionController ( )
inline

Default constructor.

Member Function Documentation

◆ createSubscriptionRequest()

List< Subscription > eu.baltrad.dex.net.controller.UpdateSubscriptionController.createSubscriptionRequest ( String[] activeSubscriptionIds,
String[] inactiveSubscriptionIds )
inlineprotected

Creates subscription request list.

Parameters
activeSubscriptionIdsActive subscription ids
inactiveSubscriptionIdsInactive subscription ids
Returns
List of requested subscriptions

◆ initConfiguration()

void eu.baltrad.dex.net.controller.UpdateSubscriptionController.initConfiguration ( )
inlineprotected

Initializes controller with current configuration

◆ selectedSubscription()

String eu.baltrad.dex.net.controller.UpdateSubscriptionController.selectedSubscription ( Model model,
@RequestParam(value="peer_name", required=true) String peerName,
@RequestParam(value="current_subscription_ids", required=true) String[] currentSubscriptionIds,
@RequestParam(value="selected_subscription_ids", required=false) String[] selectedSubscriptionIds )
inline

Shows list of selected subscriptions. The list is posted on the remote node and subscription status is modified accordingly.

Parameters
modelModel
peerNamePeer node name
currentSubscriptionIdsIDs of current subscriptions
selectedSubscriptionIdsIDs of selected subscriptions
Returns
Selected subscriptions view

◆ setAuthenticator()

void eu.baltrad.dex.net.controller.UpdateSubscriptionController.setAuthenticator ( Authenticator authenticator)
inline
Parameters
authenticatorthe authenticator to set

◆ setConfigurationManager()

void eu.baltrad.dex.net.controller.UpdateSubscriptionController.setConfigurationManager ( IConfigurationManager confManager)
inline
Parameters
configurationManager

◆ setHttpClient()

void eu.baltrad.dex.net.controller.UpdateSubscriptionController.setHttpClient ( IHttpClientUtil httpClient)
inline
Parameters
httpClientthe httpClient to set

◆ setLog()

void eu.baltrad.dex.net.controller.UpdateSubscriptionController.setLog ( Logger log)
inline
Parameters
logthe log to set

◆ setMessageHelper()

void eu.baltrad.dex.net.controller.UpdateSubscriptionController.setMessageHelper ( ModelMessageHelper messageHelper)
inline
Parameters
messageHelperthe message helper

◆ setNodeStatusManager()

void eu.baltrad.dex.net.controller.UpdateSubscriptionController.setNodeStatusManager ( INodeStatusManager nodeStatusManager)
inline
Parameters
nodeStatusManagerthe nodeStatusManager to set

◆ setProtocolManager()

void eu.baltrad.dex.net.controller.UpdateSubscriptionController.setProtocolManager ( ProtocolManager protocolManager)
inline
Parameters
protocolManagerthe protocol manager

◆ setSubscriptionManager()

void eu.baltrad.dex.net.controller.UpdateSubscriptionController.setSubscriptionManager ( ISubscriptionManager subscriptionManager)
inline
Parameters
subscriptionManagerthe subscriptionManager to set

◆ setUserManager()

void eu.baltrad.dex.net.controller.UpdateSubscriptionController.setUserManager ( IUserManager userManager)
inline
Parameters
userManagerthe userManager to set

◆ storeLocalSubscriptions()

void eu.baltrad.dex.net.controller.UpdateSubscriptionController.storeLocalSubscriptions ( String nodeName,
List< Subscription > subscriptions ) throws InternalControllerException
inlineprotected

Stores local subscriptions.

Parameters
resHttp response
subscriptionStringSubscriptions Json string
Returns
True if subscriptions are successfully saved

◆ subscribedPeers()

String eu.baltrad.dex.net.controller.UpdateSubscriptionController.subscribedPeers ( Model model)
inline

Shows lists of subscribed peer nodes.

Parameters
modelModel
Returns
Subscribed peers view

◆ subscriptionByPeer()

String eu.baltrad.dex.net.controller.UpdateSubscriptionController.subscriptionByPeer ( Model model,
@RequestParam(value="peer_name", required=true) String peerName )
inline

Shows list of subscriptions for a given peer node.

Parameters
modelModel
peerNamePeer node name
Returns
Subscriptions by peer view

◆ updateSubscription()

String eu.baltrad.dex.net.controller.UpdateSubscriptionController.updateSubscription ( Model model,
@RequestParam(value="peer_name", required=true) String peerName,
@RequestParam(value="active_subscription_ids", required=false) String[] activeSubscriptionIds,
@RequestParam(value="inactive_subscription_ids", required=false) String[] inactiveSubscriptionIds )
inline

Post subscription request on the peer node.

Parameters
modelModel
peerNamePeer node name
activeSubscriptionIdsList contains IDs of active subscriptions
inactiveSubscriptionIdsList contains IDs of inactive subscriptions
Returns
Subscription status view

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