In order for additional product data to display and be accessible from within GX Tools, a new product must be created in the GX Tools database. This document will walk through the necessary steps for setting up a new product for Horizon.
The first step is to login to the appropriate database server for the desired environment. For list of environments see GX Tools Servers.
|
Creating a Product
In order to create a new entry for a product, run the following query in the desired environment:
INSERT INTO `gxtools`.`products` (`product_key`, `product_name`, `product_enabled`) VALUES ('horizon', 'Horizon', '1');
Creating Product Settings
After creating the product, some essential settings are required such as logo, url, etc. In order to complete this entry run the query similar to the following in the desired environment:
INSERT INTO `gxtools`.`product_settings` (`product_id`, `name`, `value`) VALUES ('22', 'icon_url', 'assets/images/logos/horizon.png');
INSERT INTO `gxtools`.`product_settings` (`product_id`, `name`, `value`) VALUES ('22', 'disneyid_genprefix', 'horizon');
INSERT INTO `gxtools`.`product_settings` (`product_id`, `name`, `value`) VALUES ('22', 'disneyid_namespace', 'DN-DISNEYINTERACTIVE');
Setting Product Language
Set the product language by running the following query in the desired environment:
INSERT INTO `gxtools`.`product_languages` (`product_id`, `language`) VALUES ('22', 'en');
Adding Product Adapters
The final step in adding a product is to setup null product adapters (classes that follow the Null Pattern and implement an interface but provide no "useful" function) to used as stand-ins until correct implementations can be provided. These adapter entries are required in order for GX Tools to work correctly.
INSERT INTO `gxtools`.`product_adapters` (`product_id`, `adapter_type_id`, `classname`) VALUES ('22', '1', 'DisneyIdAccountAdapter');
INSERT INTO `gxtools`.`product_adapters` (`product_id`, `adapter_type_id`, `classname`) VALUES ('22', '4', 'NullAvatarAdapter');
INSERT INTO `gxtools`.`product_adapters` (`product_id`, `adapter_type_id`, `classname`) VALUES ('22', '5', 'DictionaryEditorAdapter');
INSERT INTO `gxtools`.`product_adapters` (`product_id`, `adapter_type_id`, `classname`) VALUES ('22', '6', 'NullFinancialAdapter');
INSERT INTO `gxtools`.`product_adapters` (`product_id`, `adapter_type_id`, `classname`) VALUES ('22', '8', 'ModerationReportController');
INSERT INTO `gxtools`.`product_adapters` (`product_id`, `adapter_type_id`, `classname`) VALUES ('22', '11', 'GenericStatsAdapter');
INSERT INTO `gxtools`.`product_adapters` (`product_id`, `adapter_type_id`, `classname`) VALUES ('22', '14', 'EmailAdapter');
Note: For more information on the Null Pattern see Null Object Pattern.