Customizing and Extending Helix
Helix provides a number of features to customize and extend Helix to build applications.
APIs
Helix includes eight APIs for customizing and extending Helix to build applications. They are summarized in the following table:
This API | Serves this function |
---|---|
Helix C/C++ API |
Enables you to create applications that interact with end users, send commands to the Helix Versioning Engine and process data returned from the versioning service |
Helix P4API.NET API |
Allows you to access Helix version management services from within a .NET program |
P4Java |
Enables Java applications to access the Helix version control system |
P4Perl |
Provides an object-oriented Perl API to the Helix version management system |
P4Ruby |
An extension to the Ruby programming language, it allows you to run Helix commands from within Ruby scripts, and get the results in a Ruby-friendly format |
P4Python |
The Python interface to the Helix Versioning Engine, it enables you to write Python code that interacts with a Helix Versioning Engine |
P4PHP |
The PHP interface to the Helix Versioning Engine, it enables you to write PHP code that interacts with a Helix Versioning Engine |
P4ObjC |
Helix’s API for Objective-C enables you to write Objective-C code that interacts with a Helix Versioning Engine |
See “Documentation and Other Resources” for pointers to further information about these APIs.
Triggers
Triggers allow you to extend or customize Helix functionality, changing existing
behavior or creating new behavior in the Helix system. They are user-written
programs or scripts that are called by a Helix Versioning Engine whenever
certain operations (such as changelist submissions, changes to forms, attempts
by users to log in or change passwords) are performed. If the script returns a
value of 0
, the operation continues; if the script returns any other value, the
operation fails.
Consider the following examples:
- You can use a pre-submit trigger to ensure that whenever
file1
is submitted in a changelist,file2
is also submitted. - You can use form triggers to generate a customized default workspace view when
users run the
p4 client
command, or to ensure that users always enter a meaningful workspace description.
See Perforce Server Administrator Guide: Fundamentals for further information about triggers.
Helix Broker
The Helix Broker enables you to implement local policies in your Helix environment by allowing you to restrict the commands that can be executed, or redirect specific commands to an alternate (replica or edge) Helix Versioning Engine.
The Helix Broker is a server process that mediates between Helix client applications and Helix services, including proxy servers. For example, Helix client applications can connect to a proxy server that connects to the broker, which then connects to a Helix Versioning Engine. Or, Helix client applications can connect to a broker configured to redirect reporting-related commands to a read-only replica server, while passing other commands through to a master server.
See Perforce Server Administrator Guide: Multi-site Deployment for further information about the Helix Broker.