App Objects

AppModule

Application Module is a piece of the Gnosis Application or the whole Gnosis Application.
Includes solutions, teams and app files that can be released and delivered to another Gnosis Platform instance.

AppModule Properties

Id : Integer

Name : String
Entity name.

Uid : String
Unique ID of the module. Can be empty for local module.

Description : String
Module description.

Installed : Boolean
Indicates that the module was installed from the application package (false for local module).

Identity

Represents a user or a team.

Identity Properties

Id : Guid

Name : String
Entity name.

AppModule : AppModule
The module the team identity belongs to (null for user identities).

IsUser : Boolean
Indicates that the identity represents a user account.

Role : String
Identity role (always ‘Team’ for team identities).

  • User
  • Administrator
  • Developer
  • Support
  • Anonymous
  • Team

IsAnonymous : Boolean
Indicates that the identity is an anonymous user.

IsAdmin : Boolean
Indicates that the identity is a user with the role ‘Administrator’.

IsDeveloper : Boolean
Indicates that the identity is a user with the role ‘Developer’.

IsSupport : Boolean
Indicates that the identity is a user with the role ‘Support’.

IsTechnical : Boolean
Indicates that the identity is a user with the role ‘Developer’ or ‘Support’.

IsTeamManager : Boolean
Indicates that the user is a team manager and has permissions to manage the assigned team.

IsEnabled : Boolean
Indicates that the user account is not disabled.

IsLocked : Boolean
Indicates that the user is locked out due to security reasons.

IsActive : Boolean
Indicates that the user account is active (enabled, not locked, with confirmed email).

FirstName : String
User’s first name.

LastName : String
User’s last name.

FullName : String
User’s full name.

Email : String
User’s email address.

EmailConfirmed : Boolean
Indicates that the user’s email was confirmed.

PhoneNumber : String
User’s phone number.

PhoneNumberConfirmed : Boolean
Indicates that the user’s phone number was confirmed.

TimeZone : TimeZone
User’s time zone.

Language : String
User’s language.

ServiceMode : Boolean?
Indicates that the technical user can see items regardless of items permissions.

Avatar : Binary
User’s avatar image.

LastOnlineTime : DateTime?
Last time when the user was online (hint value from last user ping).

ImpersonatedBy : Identity
Reference to the real user identity who is impersonated under this identity.

IsImpersonated : Boolean
Indicates that the user identity is being impersonated by another user.

Settings : Dict
Own identity settings dictionary.

Teams : Identity[]
Teams the identity is direct member of.

Members : Identity[]
Direct members of the team.

DefaultSolution : Solution
Effective default solution for the identity (can be set directly or inherited from a team).

Identity Methods

GetMergedSettings() : Dict

Get merged settings from all identity teams and own settings.

GetAllTeams() : Identity[]

Get all teams the identity is member of, directly or indirectly.

GetAllMembers() : Identity[]

Get all team members, including direct and indirect members.

IsMemberOf(team) : Boolean

Check if this identity is a member of specified team.

IsMemberOf Parameters

team

CanManage(identity?) : Boolean

Check if this identity can manage specified identity.

CanManage Parameters

identity? : Identity

IsSolutionTeam() : Boolean

Check if the identity is a solution team.

GetDataReferences() : ItemList

Find items that refer this identity.

HasDataReferences() : Boolean

Check if any item has reference to this identity.

Refresh() : Identity

Refresh the identity from DB.

Solution

Solution incapsulates types, views, lifecycles and workflows.

Solution Properties

Id : Integer

Name : String
Entity name.

Label : String
Solution label used by UI.

Description : String

IsUtility : Boolean
Indicates that the solution is a library.

DefaultGenerator : String
Default generator used for auto views.

FontIcon : String
Icon class used by UI.

AppModule : AppModule
The module the solution belongs to.

TranslatedLabel : String
Label translated to the current user’s language.

TranslatedDescription : String
Description translated to the current user’s language.

Workflows : Workflow[]
All solution workflows.

Lifecycles : Lifecycle[]
All solution lifecycles.

ItemType : ItemType
Solution type that defines all solution properties.

ItemTypes : ItemType[]
All types of the solution except the solution type itself.

AllItemTypes : ItemType[]
All types of the solution including the solution type itself.

Team : Identity
Solution users team (users who have access to the solution).

$Item : Item
The item of the solution type.

Solution Methods

Workflow(name, required = true) : Workflow

Get public workflow of the solution by name.

Workflow Parameters

name : String

required : Boolean = true

View(name, isAction = false, required = true) : View

Returns a view of this solution by name.

View Parameters

name : String
Can be ‘{ViewName}’ or ‘{ItemTypeName}.{ViewName}’.

isAction? : Boolean?
True to find action view, false to find non-action view, null to find all.

required : Boolean = true
False to return null if a view was not found.

ActionView(name, required = true) : View

Returns an action view of this solution by name.

ActionView Parameters

name : String
Can be ‘{ViewName}’ or ‘{ItemTypeName}.{ViewName}’.

required : Boolean = true
False to return null if view was not found.

Layouts() : View[]

Returns all views of Items type from the solution type (called solution layouts).

IsAccessibleFor(identity) : Boolean

Check if the solution is accessible for specified identity.

IsAccessibleFor Parameters

identity
Identity object, or team name, or user email.

IsAccessibleFor Examples

$Solutions.SomeSolution.IsAccessibleFor('Everyone');

IsAccessible() : Boolean

Check if the solution is accessible for the current user.

EncryptString(value) : String

Encrypt a string using secret solution key.

EncryptString Parameters

value : String

DecryptString(value) : String

Decrypt a string using secret solution key.

DecryptString Parameters

value : String

Workflow

Contains application logic such as event handler.

Workflow Properties

Id : Integer

Name : String
Entity name.

Solution : Solution
Target solution the entity belongs to.

Uid : String
Unique ID of the workflow.

FullName : String
Full name of the workflow in the form ‘{SolutionName}.{WorkflowName}’.

IsPublic : Boolean
Indicates that the workflow is public and can be used by other workflows and solutions.

IsEmpty : Boolean
Indicates that the workflow is empty (i.e. does nothing).

Description : String

Workflow Methods

IsUsed() : Boolean

Check if the workflow is being used as an event handler or by another workflow.

Expression() : Expression

Get AST of the workflow.

Execute(vars?)

Execute the workflow with specified context variables.

Execute Parameters

vars? : Dict

IsAccessibleFor(identity) : Boolean

Check if the entity is accessible for the specified identity.

IsAccessibleFor Parameters

identity
Identity object, or team name, or user email.

IsAccessibleFor Examples

$Solutions.SomeSolution.IsAccessibleFor('Everyone');

IsAccessible() : Boolean

Check if the entity is accessible for the current user.

Leave a Comment

Your email address will not be published. Required fields are marked *