The global objectList json file structure

interface iObject {
    _error: string;
    about: iObjectAbout;
    attributes: idAttrList;
    extensions?: iExtensionsList;
    methods?: object;
    operations?: iOperList;
    responsibilities?: ObjectResponsibility[];
    tableSQL?: TableSQL;
    views?: Views;
}

Hierarchy (view full)

Properties

_error: string

optional error related with object - should be forced to the user.

Basic informations about obuect

attributes: idAttrList

Attributes

extensions?: iExtensionsList

Optional extension of other objectes

methods?: object

list of optinal conditions and rules that can be used in operations and other formulas

  • Each condition should be a single string,
  • e.g. "rightMan":"=[obj.responsibleID, obj.managerID].includes(user.ID)" - command SHOULD START with =
  • if command starts with = or @ it is evaluated as a command, if statrt with oter letters, it is evaluated as a regular command
  • Condition can use a condition above in the list, but not bellow (they are evaluated in order how they are in the list and should be evaluated before use)
  • they can use complete command 'server.meObject.getComment' to get value from server or 'tskFunction.GetCommand' to get value from js module.
  • Never use window command, because value can be evaluated repeatedly and unpredictebly for user!!!
  • see e.g. tsk/meetingAgenda for example
operations?: iOperList

Operations related with object Suppoorted are both array format and object format; in array format each method should have name property

  • In single object definition only a single type for records could be used - both in object and methods
  • object-like model is recomended for better readibility

Some global operatins has special behaviour:

get

Get is not required and when no defined, there is no special rights contol, Usually there is no reaon to use if

update

Update support special attribute "checkUpdateRights". When true client has got lock for object only if he has also right assigned by className::checkRightsInt method on backend. Views of this object do not need internal control for edit rights because client has got information from serer

delete

When icon of delete is trash (instead of default reject) object supports delete/undelete to trash. It should have status field with state 'DE' for items in the trash

responsibilities?: ObjectResponsibility[]
tableSQL?: TableSQL

pcom-related information; not required for add-on views that do not define whole object

views?: Views

Views that client can use