VersaCloud's Type System

Types are the first basic sub-element of our cloud-based time-limited transaction manager's API: although all parameters and return values are sent as character strings over most protocols (like is the case in XML files), the definition of a type system allows our transaction manager's single entry point engine to test parameter values according to each types rules.

For example, if a parameter has been defined as being of type 'boolean', then only values 'True' or 'False' will be accepted by the single entry point engine (plus their equivalents in other human languages). If the value does not follow the type's definition, the engine aborts the API call and returns specific error codes to the caller.

This way, back-end servers are sure to never be called with wrong data as parameters, simplifying the development of callbacks and the existing back-end services they access.

Our type system is in some sense similar to the type system present in many programming languages. However, we have included many types which are specific to the cloud-based time-limited transaction manager's environment: for example, the 'operationhandle' type is used to manage operation handle values used either as API parameters or as API return values.

The 'password' type is used to warrant every user uses strong passwords: the password type rule requires that passwords are built only using letters, digits and special characters from the set '<>{}[]*%$#!+-'. Additionally, they must be at least eight characters long, and contain at least one uppercase letter, one lowercase letter, one digit and one special character. If a user tries to register a password not complying with these rules by calling the 'UserPasswordSetAllow' API, it will be rejected by our single entry point engine and flagged as having passed in a wrong value to its password parameter.

The complete set of types includes many types traditionally found in programming languages, and others that are innovations. Besides 'boolean' and 'password', the complete list of types includes (in alphabetical order): 'callback' (character string containing the name of a callback), 'country' (an ISO3166 standard two letter code), 'date' (Valid calendar date, formatted as yyyymmdd, without any punctuation or separators, between Jan-01-1801 and Dec-31-2399), 'email' (character string containing exactly one @ and at least one dot), 'errorcode' (string composed by 16 characters corresponding to a Valid error code), 'fullname' (a string containing a person's full name), 'group' (character string containing the name of a user group), 'groupcoupon' (a sequence of 80 hex digits), 'hugeunsigned' (an integer between 0 and 9223372036854775807), 'language' (a six character string representing a specific language), 'method' (a character string containing the name of a method), 'operationhandle' (a 48 character string identifying an operation in progress), 'parameter' (a character string containing the name of a method's parameter), 'property' (a character string containing the name of a property), 'propertycategory' (a character string containing the name of a category of properties), 'propertygroup' (a character string containing the name of a group of properties), 'queryInfo' (an information defining a query's characteristics), 'queryType' (a query's type), 'right' (a two-letter string representing an execution right), 'solution' (a character string containing the name of a solution), 'solutiontoken' (a 128-character string composed exclusively by hex digits), 'solutiontokenType' (a single letter defining solutiontoken usage: 'M'aster, 'C'lone, 'Q'uery or 'T'ranslator), 'timestamp' (a specific moment in time, using format yyyy-mm-ddThh:mm:ss.msc, between Jan-01-1801 and Dec-31-2399, following ISO 8601), 'type' (a character string corresponding to the name of one of the types listed), 'unsigned' (an integer number between 0 and 2147483647), 'url' (a string defining a location on the Web, using the http://... format), 'userCoupon' (a 40-character string composed exclusively by hex digits), 'usertoken' (a 64-character string composed exclusively by hex digits), and 'versacoin' (an integer number of cents).

Additionally, types defined by a finite set of name, as is the case with 'country', 'queryInfo', 'queryType' and 'solutiontokenType' are designed to have 'localized type values'. This means that the country code 'us' can be replaced in any API call, for example, not only by 'United States' (English localized value) but also by 'Estados Unidos' (Spanish localized value).

Usage samples for each of these types are given later, together with the explanation of the API calls which require values from these types. The most basic APIs available to handle types, its values and documentation are: 'Valid' (to verify if a value follows the rule of a certain type) plus the 'LanguageDocumentationGet', 'TypeDocumentationGet', 'TypeLocalizedNameGet' and 'TypeLocalizedValueGet' APIs, which allow, respectively, for the retrieval of the description of language codes and types, type names and values in specific human languages.

US Patent Requested