Developer

Introduction to Definition Tags

Use definition tags as a way to mark definitions of any type with a consistent tag for organizational purposes.

As of version 5.2 of the Agentry Mobile Platform, the concept of Definition Tags is available. Definition tags, or simply tags, are a way to mark definitions of any type with a consistent tag for organizational purposes. Tags can be public or private. Public tags are associated with definitions and remain a part of those definitions during export, import, and share repository operations. Private tags are primarily for use with team configuration functionality, applied to definitions whenever they are changed, and are not included in any export, import, or share operations. Private tags are stripped from the definitions in the local project before they are committed to a share revision or exported to an Agentry export file.

Public Tags

Public tags are created and maintained by the developer within the Agentry application project. The developer can create as many tags as needed for the project, and a given definition can have multiple tags applied to it. When an application project is exported, committed to a share repository, or when a share repository is created from the local project, the public tags are included in the information written to those destinations. Imports from the export files, or updates from the share repository retrieve the tags for the definitions along with the definitions themselves and are displayed in the local project.

By default, public tags are manually applied to a definition by the developer. When a tag is applied to a definition, it can be applied to just that definition, or recursively applied to the selected definition and its descendents. Public tags can be removed from any definition that currently has a tag, and can be recursively removed from the definition and all its descendents that have the same tag.

As an optional behavior it is possible to set preferences in Eclipse to automatically apply one or more tags to any definition modified by the developer. Within the preference page “Tagging Configuration” for Agentry, one or more public tags can be selected for auto-tagging. This results in the selected tags being applied to any definition modified by the developer in any way. This continues until the auto-tagging is disabled for the previously selected tags.

Auto-tagging can be a useful feature when implementing a feature set or custom functionality in an existing product or previously deployed application. A tag can be created to mark those definitions that have been modified or added specifically in support of the new functionality. During subsequent export operations it is then possible to select these definitions by their tags, creating an export file containing just the definitions with the selected tag.

Private Tags

Within a local Agentry application project, there can be one designated private tag. The private tag is stripped from the definitions before they are committed to the share or before they are exported to an Agentry export file. Private tags are primarily intended for use with the Team Configuration functionality.

The project’s private tag is automatically applied to definitions when they are modified and only when the project is connected to a share repository. The private tag is used by the Agentry Editor during commit operations, with the definitions containing the private tag being those compared to the share revision to determine if there are differences.

Note that a definition with a private tag does not guarantee it will be committed to the share repository. If a definition is modified in such a way that at the time of commit it exactly matches the same definition in the share’s tip revision, the local definition will not be committed to the share.

As an example, if a developer modifies the minimum length of a the string property City in the Customer object to a value of 5 and then commits, a new tip revision is created in the share. If a second developer that has not yet updated the local project to this new tip revision makes the same change to the City property in his or her local project, it will have the private tag applied to it. When the second developer then commits, however, the City property will not be sent to the share as the Agentry Editor recognizes that the two definitions are the same. If this is the only change made to the project, the commit will not proceed. Other changes will be committed if present.

The name of the private tag can be edited within the “Team Configuration” Agentry preference page. By default, if no name is specified, the default private tag name is usernameChanges, where username is the Windows user ID of the developer.

The private tag cannot be manually added to or deleted from definitions. If the Agentry application project is not currently connected to a share repository, there is no private tag available.