Store Customization SDK

Customization interfaces

This page details the customization points exposed by StoreFront and explains how to use them. For full details see Store_Customization_API.chm in the SDK download.

Four customization points are provided:

  • Resources customization — customize the apps and desktops returned to the client.
  • Sessions customization — customize the HDX sessions returned to the client.
  • Launch customization — customize the ICA file returned to the client when performing an HDX launch. The ICA file is used to provide data to establish an HDX connection from the client to the machine hosting the apps and desktops.
  • Request customization — customize the client data and the list of Delivery Controllers that StoreFront uses to process a request.

The classes and interfaces making up these customization points are bundled in the Citrix.DeliveryServices.ResourcesCommon.Customization.Contract assembly.

Common Methods

Each customization interface provided by the customization points derives from IResultModifier which exposes the following properties.

RunExtendedValidation

This property indicates whether StoreFront validates the returned value to ensure it is of the correct form. Because there is a performance impact associated with extended validation, only set this to ‘on’ during development and debugging, and ensure that extended validation is set to ‘off’ in the production environment.

ReturnOriginalValueOnFailure

This property indicates whether StoreFront returns the original computed value whenever there’s an error in the customized value returned by the method. Citrix recommends you set this property to true.

Resources customization

Use this customization point to modify the resource enumeration XML documents returned to the client.

Note:

Resource customization only takes effect for clients using the native protocols. Customizations don’t take effect for clients that access the store using legacy protocols, such as Program Neighborhood Agent.

The resources customization code must be in a class with the following properties:

Property Value
Assembly name StoreCustomization_Enumeration.dll
Namespace StoreCustomization_Enumeration
Class EnumerationResultModifier

The customization class must implement the interface IEnumerationResultModifier with the following methods:

Modify

Use this method to modify the full resources enumeration result. The method is called with the resource enumeration XML document that StoreFront has generated for all of the resources available to the current user. You must return a modified version of that document that you want to be returned to the client. The returned string must be a valid XML document following the resources schema (see Resources.xsd in the Store Customization SDK). You should use this method only to remove resources and to modify properties of remaining resources. Adding resources or new properties within existing resources may cause errors on the client, unless a customized client is also used.

ModifySingleApp

Use this method to modify a single resource result. The method is called with the resource enumeration XML document that StoreFront has generated for a single resource in response to a client request for the data for that single resource. You must return a modified version of that document that you want to be returned to the client. The returned string must be a valid XML document following the resources schema (see Resources.xsd in the Store Customization SDK). You must use this method only to modify properties of the returned resource, consistent with any modification you make to the same resource in the Modify method as mentioned in the preceding section.

Sessions customization

Use this customization point to modify the HDX sessions enumeration XML documents returned to the client.

Note: Sessions customization only takes effect for clients using the native protocols. Customizations do not take effect for clients that access the store using legacy protocols, such as Program Neighbourhood Agent.

The sessions customization code must be in a class with the following properties:

Property Value
Assembly StoreCustomization_SessionEnumeration.dll
Namespace StoreCustomization_SessionEnumeration
Class SessionListModifier

The customization class must implement the interface ISessionListModifier with the following methods:

Modify

Use this method to modify the session enumeration result. The method is called with the session enumeration XML document that StoreFront has generated for all of the sessions available to the current user. You should return a modified version of that document that you want to be returned to the client. The returned string must be a valid XML document following the session state schema (see SessionState.xsd in the Store Customization SDK). You must use this method only to remove session elements and to modify properties of remaining sessions.

Launch customization

Use this customization point to modify the steps StoreFront follows to generate an ICA file that is used to configure an HDX connection from a client machine to a VDA.

The launch customization code must be in a class with the following properties:

Property Value
Assembly StoreCustomization_Launch.dll
Namespace StoreCustomization_Launch
Class LaunchResultModifier

Two interfaces are provided to allow customization of different steps of this process. The launch customization class may implement either or both of these interfaces IHDXRoutingModifier and ILaunchResultModifier with the following methods:

IHDXRoutingModifier.ModifyAlternateAddress

Use this method to change the value of alternateAddress passed to the broker when requesting the address of a suitable VDA to host a new HDX session. Return true to cause StoreFront to request that the broker processing the launch request return an alternate address. Note that alternate address functionality is not currently supported in XenDesktop 7.x. The customization context object provides information that can be used to determine which Delivery Controller StoreFront is about to contact.

IHDXRoutingModifier.ModifyHdxAddress

Use this method to translate XenDesktop VDA or XenApp application server addresses for access from outside a corporate network. The method is called with the internal address supplied to StoreFront from XenDesktop/XenApp. You should return the address that should be used from the client to access the same server allowing it to traverse any network devices. Return the supplied address unmodified to perform no translation. The customization context object provides information that can be used to identify the location of the client and determine what translation, if any, is required.

IHDXRoutingModifier.ModifyCgpAddress

Use this method to translate a session reliability address for access from outside a corporate network in the same manner as ModifyHDXAddress. Typically this is the same host as the HDX address, but with a different port (the default HDX port is 1494, the default CGP port is 2598).

IHDXRoutingModifier.ModifyGateway

Use this method to change the NetScaler Gateway used to route HDX access to the XenDesktop VDA or XenApp application server. The method is called with the gateway that StoreFront has determined should be used, or null if no gateway is to be used. Return a gateway object containing details of the NetScaler Gateway that should be used to route the HDX connection, or null to prevent any gateway being used for the HDX connection.

StoreFront determines the NetScaler Gateway that should be used for the HDX connection from the gateway, if any, that StoreFront has detected from the HTTP request headers of the launch request. This may be overridden by the Optimal HDX Gateway settings configured for the Store.

ILaunchResultModifier.Modify

Use this method to modify the content of the ICA file returned to the client. The method is called with the ICA file content that StoreFront has generated for the current launch. You should return a modified version of that content that will be returned to the client.

Request customization

Use this customization point to modify a request before it is processed further by StoreFront.

The request customization code must be in a class with the following properties:

Property Value
Assembly StoreCustomization_Input.dll
Namespace StoreCustomization_Input
Class InputModifier

The customization class must implement the interface IInputModifier:

Modify

Use this method to modify the customization context data associated with a request. This method will be called with the customization context data that StoreFront has identified for the current request. The following properties of the context data can be modified in this method:

  • Access conditions — You can customize the access conditions that are passed to the brokers contacted by StoreFront while processing this request.
  • Device information — You can modify the device id, client name, and client address that are used by StoreFront and are passed the brokers contacted while processing this request.
  • Farm Sets — You can modify the ‘farms’ (brokers) that will be contacted by StoreFront while processing this request. You can also, by using the advanced farm sets property, cause StoreFront to aggregate apps and desktops between specified farms. An aggregated app is a collection of several similar apps, each hosted on a different farm, which is returned to the client as a single app. When a user launches an aggregated app, StoreFront can choose the best farm to use to launch the app, giving failover and load balancing support for greater app availability.
Customization interfaces