Many of the methods in the API are generic, i.e. they take a type class as argument and performs an action depending of the type.
Type classes
These are the available type classes for generic methods.
Name | Description |
---|---|
Dictionary | A dictionary for the current client |
Domain | A domain in the currently selected dictionary |
Language | A language in the currently selected dictionary |
Section | A section in the currently selected dictionary |
ConceptEntry | A concept entry in the currently selected dictionary |
TermEntry | A term entry in the currently selected dictionary |
Filter | A filter for the current client |
ImportSettings | An import settings for the current client |
VirtualFile | A virtual file (and also import file) for the current client |
Project | A project for the current client |
Client | A client in the system |
User | A user for the current client |
Generic methods
The table below describes the available generic methods. The type argument is the name of the type, and is a case-insensitive string.
Method | Applicable Types | Return type | Description |
---|---|---|---|
getAll(sessionID, type) |
| array | Returns all objects of the specified type that are available for the user. |
getSelected(sessionID, type) |
| struct (see Data objects) | Returns the currently selected object of the specified type. |
getObject(sessionID, type, objID) |
| struct (see Data objects) | Returns the object with specified ID and type. |
getObjectByName(sessionID, type, name) |
| struct (see Data objects) | Returns the object with specified ID and name. |
getSelectedList(sessionID, type) |
| array | Returns a list of the currently selected object(s) of the specified type. |
setSelected(sessionID, type, objID) |
| int | Sets the object with specified ID and type to be selected. |
setSelected(sessionID, type, idList) |
| int | Sets the objects with specified IDs and type to be selected. |
setAllSelected(sessionID, type) |
| int | Sets all objects of the specified type to be selected. |
isSelected(sessionID, type, objID) |
| boolean | Checks if the object with specified ID and type is selected. |
exists(sessionID, type, objID) |
| boolean | Checks if the object with specified ID and type exists. |
existsByName(sessionID, type, name) |
| boolean | Checks if the object with specified ID and type exists. |