Interface
caplin.trading.service

TradePermissionService

Constructor Summary

Attributes Name and Description
caplin.trading.service.TradePermissionService()

A helper class that fronts caplin.services.security.PermissionService, and provides higher level permissioning information that can be used throughout the application.

Method Summary

Attributes Name and Description
int addAccountsListener(String sInstrument, Object oListener)

Add a listener that will be called back each time the permission on the given instrument changes in respect to the set of accounts the user has.

int addInstrumentViewableListener(String sInstrument, Object oListener)

Add a listener that will be called back each time the permission on the given instrument changes in respect to whether is it is viewable.

int addTicketTradableListener(String sInstrument, Object oListener)

Add a listener that will be called back each time the permission on the given instrument changes in respect to whether ticket trading is possible.

int addTileTradableListener(String sInstrument, Object oListener)

Add a listener that will be called back each time the permission on the given instrument changes in respect to whether tile trading is possible.

void canTradeInTicket(String sInstrument)

Determine whether the user is permitted to trade the given instrument within a ticket.

void canTradeInTile(String sInstrument)

Determine whether the user is permitted to trade the given instrument within a tile.

void filterOutNonViewPermissionedBaseCurrencies(Array pListOfBaseCurrencies, Array pCompleteList)

Returns a filtered array of currency bases, filtering pListOfBaseCurrencies, letting through the filter only the currency bases that are VIEW permitted.

void filterOutNonViewPermissionedCurrencyPairs(Array pListOfPairs)

Returns a filtered array of currency pairs, filtering pListOfPairs, letting through the filter only the currency pairs that are VIEW permitted.

void removeListener(int nListenerId)

Remove a previously registered listener using the given identifier

Constructor Detail

caplin.trading.service.TradePermissionService()

A helper class that fronts caplin.services.security.PermissionService, and provides higher level permissioning information that can be used throughout the application.

Method Detail

int addAccountsListener(String sInstrument, Object oListener)

Add a listener that will be called back each time the permission on the given instrument changes in respect to the set of accounts the user has.

Parameters
String sInstrument
Object oListener Listener to receive onAccountsPermissionsChanged() callbacks
Returns
a unique identifier for this listener so it can later be removed using #removeListener

int addInstrumentViewableListener(String sInstrument, Object oListener)

Add a listener that will be called back each time the permission on the given instrument changes in respect to whether is it is viewable.

Parameters
String sInstrument
Object oListener Listener to receive onViewPermissionsChanged() callbacks
Returns
a unique identifier for this listener so it can later be removed using #removeListener

int addTicketTradableListener(String sInstrument, Object oListener)

Add a listener that will be called back each time the permission on the given instrument changes in respect to whether ticket trading is possible.

Parameters
String sInstrument
Object oListener Listener to receive onTicketPermissionsChanged() callbacks
Returns
a unique identifier for this listener so it can later be removed using #removeListener

int addTileTradableListener(String sInstrument, Object oListener)

Add a listener that will be called back each time the permission on the given instrument changes in respect to whether tile trading is possible.

Parameters
String sInstrument
Object oListener Listener to receive onTilePermissionsChanged() callbacks
Returns
a unique identifier for this listener so it can later be removed using #removeListener

void canTradeInTicket(String sInstrument)

Determine whether the user is permitted to trade the given instrument within a ticket.

Parameters
String sInstrument the instrument to be traded.

void canTradeInTile(String sInstrument)

Determine whether the user is permitted to trade the given instrument within a tile.

Parameters
String sInstrument the instrument to be traded.

void filterOutNonViewPermissionedBaseCurrencies(Array pListOfBaseCurrencies, Array pCompleteList)

Returns a filtered array of currency bases, filtering pListOfBaseCurrencies, letting through the filter only the currency bases that are VIEW permitted.

Parameters
Array pListOfBaseCurrencies an array of the possible currency bases.
Array pCompleteList an array containing all possible currencies.

void filterOutNonViewPermissionedCurrencyPairs(Array pListOfPairs)

Returns a filtered array of currency pairs, filtering pListOfPairs, letting through the filter only the currency pairs that are VIEW permitted.

Parameters
Array pListOfPairs an array of the possible currencies.

void removeListener(int nListenerId)

Remove a previously registered listener using the given identifier

Parameters
int nListenerId The id of the listener to remove.