Caplin Trader 5.1.0

Global

Methods

AllowedProductsPermissionQuery(user, product, namespace, name, type, listener)

Parameters:
Name Type Description
user string

User name

product string

Product to query permissions for

namespace string

Namespace of product to query permissions for

name string

Name to query permissions for

type string

Type to query permissions for

listener PermissionServiceListener

Listener that is notified on permission changes

ChildCount()

deprecated(className, methodName, sDate, message)

Invoked by API methods that have been deprecated. If the unary parameter deprecated is included within the query string of the application web page any invocations of this method will result in an error message being displayed, making it easier to find out which deprecated methods are being used by the application.

Remember that we want to be able to pull uses of this method, including the classname, the method name and the date out of our code base using a regex.

Parameters:
Name Type Description
className String

The name of the class that has been deprecated (or the class that the deprecated method belongs to.

methodName String | null

The name of the method that is deprecated. null if the whole class or constructor has been deprecated.

sDate String

The date that this method was deprecated in YYYY-MM-DD format, e.g. "2012-03-20"

message String

A message describing the deprecation. This should explain how code that uses this method should be rewritten.

elementHasClass()

Checks if a given element has the provided class

Expanded()

extend(vSubClass, vSuperClass)

Extends the class definition of the sub class with the class definition of the super class.

Subclassing in JavaScript is done by extending the prototype of the sub class with the properties that are defined on the prototype of the super class.

The properties on the super class can be any type of JavaScript object, including a standard function object, typically used as a class method, or simply an object, typically used a static member.

Parameters:
Name Type Description
vSubClass Variant

The class that is extending the superclass. This can be either a reference to the class's constructor or a String representation

vSuperClass Variant

The class to be extended. This can be either a reference to the class's constructor or a String representation

getClass(fullClassName, vLoadClassopt) → {function}

Returns the constructor function for a class given the fully qualified class name in string form.

This method does not actually load the class unless the bLoadClass argument is true, in which case the class is loaded synchronously
Behaviour for when the class is unknown can be defined; context: name of what needs the class, unknownClass: function returned instead. load: Boolean determining whether to attempt loading the class. singleton: Raise/throw error if the class isn't a singleton.

If no unknownClass is specified an exception will be thrown, otherwise an error will be raised.

caplin.getClass('myapp.SomeClass') - Fetch a loaded class, which isn't a singleton, throw Error if not known.
caplin.getClass('myapp.SomeClass',{unknownClass:myapp.Fallback,context:'myapp'}) - Fetch loaded class, use myapp.Fallback if not known, and raise error in log.

(see caplin#include).

Parameters:
Name Type Attributes Default Description
fullClassName String

The full name of the class.

vLoadClass boolean | object <optional>
false

true if this method should ensure that the specified class is loaded, otherwise false. If a Map is passed details about handling of unknown class must be specified.

Throws:

Error if the specified class name is not a String.

Returns:

The constructor for the specified class.

Type
function

getPackage(packageName) → {Object}

Returns the inner-most package object for the given package name string.

Parameters:
Name Type Description
packageName String
Returns:

the inner most package

Type
Object

implement(fClass, fInterface)

Extends the class definition of fClass with the interface defined in fInterface.

Parameters:
Name Type Description
fClass function

The class that is implementing the interface.

fInterface function

The interface that the class must implement.

isImplementorOf(oInstance, fClass) → {boolean}

Checks that an object instance implements all the public functions of the class (i.e. a duck-typing check).

NB: does not check the entire prototype chain.

Parameters:
Name Type Description
oInstance Object

An object instance that we are checking.

fClass function

The class or interface we are checking against.

Throws:

Error if fClass is not a function.

Returns:

true if the instance is an instance of the class constructed by the function.

Type
boolean

module:br-services/locale/BRLocaleProvider()

BRLocaleProvider is an implementation of {br-services/BRLocaleProvider} that works in the following way:

  1. The locale cookie is used if one is present.
  2. If no locale cookie is present, the browser's Accept-Language headers are used to set the locale cookie.
  3. If {#setActiveLocale} is invoked the locale cookie is updated.

module:ct-sljsadapter/watchlist/StreamLinkWatchlistRequestManager(streamlink)

Parameters:
Name Type Description
streamlink module:sljs/StreamLink

The streamlink service.

PopoutToolPM(propertiesConfig)

Parameters:
Name Type Description
propertiesConfig object

map config for validating popout properties

RowLoading()

Scrolled()

unsupported(className, methodNameopt)

Invoked by API methods that are no longer supported.

Parameters:
Name Type Attributes Description
className String

The name of the class that is no longer supported or the class that the unsupported method belongs to.

methodName String <optional>

The name of the method that is no longer supported (not needed for constructors).