using System; using System.Configuration; namespace Xylem.Common.CommonCore.Configuration { /// /// Urls for data base accesses /// public static class ServiceUrls { private const String DefaultGetPcbIdsFromSafeServiceUrl = "http://10.49.40.25/MeterProcessState/GetPcbIdsFromSafe?ContainerDbId="; private const String DefaultAddPcbIdsToSafeServiceUrl = "http://10.49.40.25/MeterProcessState/AddPcbIdsToSafe?ContainerDbId="; private const String DefaultDownloadFilesPartsServiceUrl = "http://10.49.40.25/MeterProcessState/api/FileUpToDate/GetFileParts?ParentFileId="; private const String DefaultListAllFwPackagesServiceUrl = "http://10.49.40.25/MeterProcessState/api/FileUpToDate/GetFwFiles?FileIsForDeveloperOnly=false&FileCategoryID=1"; private const String DefaultListAllFwUpdateSafesServiceUrl = "http://10.49.40.25/MeterProcessState/api/FileUpToDate/GetFwFiles?FileIsForDeveloperOnly=false&FileCategoryID=4"; private const String DefaultSetCordonelAppVersionServiceUrl = "http://10.49.40.25/MeterProcessState/api/ProccesState/SetCordonelProgress?PcbId="; private const String DefaultGetCordonelAppVersionServiceUrl = "http://10.49.40.25/MeterProcessState/api/ProccesState/GetCordonelAppVersion?PcbId="; private const String DefaultListAllCordonelCustomersWithFilterServiceUrl = "http://10.49.40.25/MeterProcessState/api/Order/GetCordonelCustomers?FilterName="; private const String DefaultListAllCordonelCustomerOrdersServiceUrl = "http://10.49.40.25/MeterProcessState/api/Order/GetCustomersCordonelOrders?CustomerNumber="; private const String DefaultListAllOrderCordonelsServiceUrl = "http://10.49.40.25/MeterProcessState/api/Order/GetCordonelOrderList?CustomerOrderNumber="; private const String DefaultDownloadFwUpdateSafeServiceUrl = "http://10.49.40.25/MeterProcessState/GetFWUpdateSafeContainerContent?SafeContainerId="; private const String DefaultListAllFwUpdateSafesForUserServiceUrl = "http://10.49.40.25/MeterProcessState/GetFWUpdateSafeContainers?UserId="; private const String DefaultFileContentDownloadServiceUrl = "http://10.49.40.25/MeterProcessState/GetFileContent?FileId="; private const String DefaultFwUpdateReportUploadServiceUrl = "http://10.49.40.25/MeterProcessState/PostFWUpdateReportFile"; private const String DefaultFwUpdateReportDownloadServiceUrl = "http://10.49.40.25/MeterProcessState/GetFWUpdateReportFile?"; private const String DefaultFwUpdateSafeContainerUploadServiceUrl = "http://10.49.40.25/MeterProcessState/PostFWUpdateSafeOdd"; private const String DefaultEditFwUpdateUserValidityServiceUrl = "http://10.49.40.25/MeterProcessState/EditUserValidity?Id="; private const String DefaultRefreshFwUpdateUsersHardwareIdServiceUrl = "http://10.49.40.25/MeterProcessState/RefreshUsersHardwareId?Id="; private const String DefaultRefreshFwUpdateUsersPasswordHashServiceUrl = "http://10.49.40.25/MeterProcessState/RefreshUsersPasswordHash?Id="; private const String DefaultCreateNewFwUpdateUserServiceUrl = "http://10.49.40.25/MeterProcessState/AddNewUser?"; private const String DefaultListAllFwUpdateUsersServiceUrl = "http://10.49.40.25/MeterProcessState/GetUserList"; private const String DefaultListAllFwUpdateBuilderOperatorsServiceUrl = "http://10.49.40.25/MeterProcessState/GetAllBuilderOperator"; private const String DefaultGetFwUpdateUserByIdServiceUrl = "http://10.49.40.25/MeterProcessState/GetUserList?Id="; private const String DefaultGetFwUpdateUserByLoginNameServiceUrl = "http://10.49.40.25/MeterProcessState/GetUserList?LogInName="; private const String DefaultRegisterWatchServiceUrl = "http://10.49.40.25/MeterProcessState/api/RegisterWatch/"; private const String DefaultGenesisGetOrderNumberServiceUrl = "http://10.49.40.25/MeterProcessState/api/Password/ordernumber?PcbId="; private const String DefaultGenesisGetRadioAddressServiceUrl = "http://10.49.40.25/MeterProcessState/api/Password/radioadress?PcbId="; private const String DefaultGenesisGetKeySetIdServiceUrl = "http://10.49.40.25/MeterProcessState/api/Password/getkeysetid?PcbId="; private const String DefaultGenesisGetPasswordServiceUrl = "http://10.49.40.25/MeterProcessState/api/Password/GetPassword?PcbId="; private const String DefaultGenesisSetPasswordServiceUrl = "http://10.49.40.25/MeterProcessState/api/Password/setpassword?PcbId="; private const String DefaultGenesisPasswordContainerServiceUrl = "http://10.49.40.25/MeterProcessState/api/Password/GetPasswordHashFileContent?PcbId="; private const String DefaultMarriageServiceUrl = "http://10.49.40.25/MeterProcessState/api/Marriage/"; private const String DefaultMeterProcessStateUrl = "http://10.49.40.25/MeterProcessState/api/ProccesState/"; private const String DefaultGenesisFinalCheckServiceUrl = "http://10.49.40.25/MeterProcessState/api/FinalCheck/"; private const String DefaultGenesisRadioCheckServiceUrl = "http://10.49.40.25/MeterProcessState/api/RadioCheck/"; private const String DefaultGetSoftwareStartUpAccessUrl = "http://10.49.40.25/MeterProcessState/api/SoftwareAccess/GetVersionIsValid"; private const String DefaultSetSoftwareLicenseUrl = "http://10.49.40.25/MeterProcessState/api/SoftwareAccess/SetVersionIsValid?Program="; private const String DefaultGetSoftwareLicenseUrl = "http://10.49.40.25/MeterProcessState/api/SoftwareAccess/GetCurrentVersion?Program="; private const String DefaultGenesisCalibrationResult = "http://10.49.40.25/MeterProcessState/api/GenesisMeter/PostCalibrationResult"; private const String DefaultGenesisMeter = "http://10.49.40.25/MeterProcessState/api/GenesisMeter/"; private const String DefaultFileContentController = "http://10.49.40.25/MeterProcessState/api/FileUpToDate/"; private const String DefaultKeyServerCustom = "https://nodes.sms-esaap.com/keygenproxy/api/v3/custom/"; private const String DefaultMeterInfoForTestBench = "http://10.49.40.25/MeterProcessState/api/TestBench/GetMeterInfoForTestBench?PcbID="; //private const String DefaultGenesisGetOrderNumberServiceUrl = // "http://localhost:56011/api/Password/ordernumber?PcbId="; //private const String DefaultGenesisGetRadioAdressServiceUrl = // "http://localhost:56011/api/Password/radioadress?PcbId="; //private const String DefaultGenesisGetKeySetIdServiceUrl = // "http://localhost:56011/api/Password/getkeysetid?PcbId="; //private const String DefaultGenesisGetPasswordServiceUrl = // "http://localhost:56011/api/Password/GetPassword?PcbId="; //private const String DefaultGenesisSetPasswordServiceUrl = // "http://localhost:56011/api/Password/setpassword?PcbId="; //private const String DefaultGenesisPasswordContainerServiceUrl = // "http://localhost:56011/api/Password/GetPasswordHashFileContent?PcbId="; //private const String DefaultMarriageServiceUrl = // "http://localhost:56011/api/Marriage/"; //private const String DefaultMeterProcessStateUrl = // "http://localhost:56011/api/ProccesState/"; //private const String DefaultGenesisFinalCheckServiceUrl = // "http://localhost:56011/api/FinalCheck/"; //private const String DefaultGenesisRadioCheckServiceUrl = // "http://localhost:56011/api/RadioCheck/"; //private const String DefaultGetSoftwareStartUpAccessUrl = // "http://localhost:56011/api/SoftwareAccess/GetVersionIsValid"; /// /// List all PCB IDs from a safe. As the safe may be deleted, this information is still accessible. /// /// public static String MeterInfoForTestBench() { return ConfigurationManager.AppSettings["MeterInfoForTestBenchServiceUrl"] ?? DefaultMeterInfoForTestBench; } /// /// List all PCB IDs from a safe. As the safe may be deleted, this information is still accessible. /// /// public static String ListAllPcbIdsFromSafe() { return ConfigurationManager.AppSettings["GetPcbIdsFromSafeServiceUrl"] ?? DefaultGetPcbIdsFromSafeServiceUrl; } /// /// Add PCB IDs to a safe. As the safe may be deleted, this information is still accessible. /// /// public static String AddPcbIdsToSafeServiceUrl() { return ConfigurationManager.AppSettings["AddPcbIdsToSafeServiceUrl"] ?? DefaultAddPcbIdsToSafeServiceUrl; } /// /// Get all Cordonel FW package. /// /// public static String DownloadFileParts() { return ConfigurationManager.AppSettings["DownloadFilePartsServiceUrl"] ?? DefaultDownloadFilesPartsServiceUrl; } /// /// FW-Update Safe container list for specific user /// /// public static String ListAllFwUpdateSafesForUserServiceUrl() { return ConfigurationManager.AppSettings["ListAllFwUpdateSafesForUserServiceUrl"] ?? DefaultListAllFwUpdateSafesForUserServiceUrl; } /// /// FW-Update Safe container /// /// public static String DownloadFwUpdateSafeServiceUrl() { return ConfigurationManager.AppSettings["DownloadFwUpdateSafeServiceUrl"] ?? DefaultDownloadFwUpdateSafeServiceUrl; } /// /// Get all Cordonel safes description files. /// /// public static String ListAllFwUpdateSafes() { return ConfigurationManager.AppSettings["ListAllFwUpdateSafesServiceUrl"] ?? DefaultListAllFwUpdateSafesServiceUrl; } /// /// Get all Cordonel FW package description files. /// /// public static String ListAllFwPackages() { return ConfigurationManager.AppSettings["ListAllFwPackagesServiceUrl"] ?? DefaultListAllFwPackagesServiceUrl; } /// /// Set all applications versions installed to a specific Cordonel. /// /// public static String UploadCordonelAppVersionServiceUrl() { return ConfigurationManager.AppSettings["SetCordonelAppVersionServiceUrl"] ?? DefaultSetCordonelAppVersionServiceUrl; } /// /// Get all applications versions installed to a specific Cordonel. /// /// public static String DownloadCordonelAppVersionServiceUrl() { return ConfigurationManager.AppSettings["GetCordonelAppVersionServiceUrl"] ?? DefaultGetCordonelAppVersionServiceUrl; } /// /// List all Cordonel customers with search filter (e.g. %sus% where % is a filter for 0 to multiple /// alphanumeric characters) to get the customer names and the order numbers. /// /// public static String ListAllCordonelCustomersWithFilterServiceUrl() { return ConfigurationManager.AppSettings["ListAllCordonelCustomersWithFilterServiceUrl"] ?? DefaultListAllCordonelCustomersWithFilterServiceUrl; } /// /// List all Cordonel orders of a selected customer /// /// public static String ListAllCordonelCustomerOrdersServiceUrl() { return ConfigurationManager.AppSettings["ListAllCordonelCustomerOrdersServiceUrl"] ?? DefaultListAllCordonelCustomerOrdersServiceUrl; } /// /// List all Cordonels of a specific order number to get the customer serial number and the Pcb ID. /// /// public static String ListAllOrderCordonelsServiceUrl() { return ConfigurationManager.AppSettings["ListAllOrderCordonelsServiceUrl"] ?? DefaultListAllOrderCordonelsServiceUrl; } /// /// Register watch service /// /// public static String RegisterWatchServiceUrl() { return ConfigurationManager.AppSettings["RegisterWatchServiceUrl"] ?? DefaultRegisterWatchServiceUrl; } /// /// File content download /// /// public static String DownloadFileContentServiceUrl() { return ConfigurationManager.AppSettings["FileContentDownloadServiceUrl"] ?? DefaultFileContentDownloadServiceUrl; } /// /// FW-Update report doanload as string /// /// public static String DownloadFwUpdateReportServiceUrl() { return ConfigurationManager.AppSettings["FwUpdateReportDownloadServiceUrl"] ?? DefaultFwUpdateReportDownloadServiceUrl; } /// /// FW-Update report upload as string /// /// public static String UploadFwUpdateReportServiceUrl() { return ConfigurationManager.AppSettings["FwUpdateReportUploadServiceUrl"] ?? DefaultFwUpdateReportUploadServiceUrl; } /// /// FW-Update Safe container upload /// /// public static String UploadFwUpdateSafeContainerServiceUrl() { return ConfigurationManager.AppSettings["FwUpdateSafeContainerUploadServiceUrl"] ?? DefaultFwUpdateSafeContainerUploadServiceUrl; } /// /// FW-Update user validation url /// /// public static String EditFwUpdateUserValidityServiceUrl() { return ConfigurationManager.AppSettings["EditFwUpdateUserValidityServiceUrl"] ?? DefaultEditFwUpdateUserValidityServiceUrl; } /// /// FW-Update user HW-Id url /// /// public static String RefreshFwUpdateUsersHardwareIdServiceUrl() { return ConfigurationManager.AppSettings["RefreshFwUpdateUsersHardwareIdServiceUrl"] ?? DefaultRefreshFwUpdateUsersHardwareIdServiceUrl; } /// /// FW-Update user password hash for encryption url /// /// public static String RefreshFwUpdateUsersPasswordHashServiceUrl() { return ConfigurationManager.AppSettings["RefreshFwUpdateUsersPasswordHashServiceUrl"] ?? DefaultRefreshFwUpdateUsersPasswordHashServiceUrl; } /// /// FW-Update create new user url /// /// public static String CreateNewFwUpdateUserServiceUrl() { return ConfigurationManager.AppSettings["CreateNewFwUpdateUserServiceUrl"] ?? DefaultCreateNewFwUpdateUserServiceUrl; } /// /// FW-Update list all users url /// /// public static String ListAllFwUpdateUsersServiceUrl() { return ConfigurationManager.AppSettings["ListAllFwUpdateUsersServiceUrl"] ?? DefaultListAllFwUpdateUsersServiceUrl; } /// /// FW-Update list all users url /// /// public static String ListAllFwUpdateBuilderOperatorsServiceUrl() { return ConfigurationManager.AppSettings["ListAllFwUpdateBuilderOperatorsServiceUrl"] ?? DefaultListAllFwUpdateBuilderOperatorsServiceUrl; } /// /// FW-Update get user information by user Id url /// /// public static String GetFwUpdateUserByIdServiceUrl() { return ConfigurationManager.AppSettings["GetFwUpdateUserByIdServiceUrl"] ?? DefaultGetFwUpdateUserByIdServiceUrl; } /// /// FW-Update get user information by user login name url /// /// public static String GetFwUpdateUserByLoginNameServiceUrl() { return ConfigurationManager.AppSettings["GetFwUpdateUserByLoginNameServiceUrl"] ?? DefaultGetFwUpdateUserByLoginNameServiceUrl; } /// /// Genesis check radio parameter url /// /// public static String GenesisRadioCheckServiceUrl() { return ConfigurationManager.AppSettings["GenesisRadioCheckServiceUrl"] ?? DefaultGenesisRadioCheckServiceUrl; } /// /// Genesis radio parameter get url /// /// public static String GenesisFinalCheckServiceUrl() { return ConfigurationManager.AppSettings["GenesisFinalCheckServiceUrl"] ?? DefaultGenesisFinalCheckServiceUrl; } /// /// Marriage service url /// /// public static String MarriageServiceUrl() { return ConfigurationManager.AppSettings["MarriageServiceUrl"] ?? DefaultMarriageServiceUrl; } /// /// Genesis process status url /// /// public static String MeterProcessStateUrl() { return ConfigurationManager.AppSettings["MeterProcessStateUrl"] ?? DefaultMeterProcessStateUrl; } /// /// Genesis get radio address url /// /// public static String GenesisGetRadioAddressServiceUrl() { return ConfigurationManager.AppSettings["GenesisGetRadioAddressServiceUrl"] ?? DefaultGenesisGetRadioAddressServiceUrl; } /// /// Genesis get key set id url /// /// public static String GenesisGetOrderNumberServiceUrl() { return ConfigurationManager.AppSettings["GenesisGetOrderNumberServiceUrl"] ?? DefaultGenesisGetOrderNumberServiceUrl; } /// /// Genesis get key set id url /// /// public static String GenesisGetKeySetIdServiceUrl() { return ConfigurationManager.AppSettings["GenesisGetKeySetIdServiceUrl"] ?? DefaultGenesisGetKeySetIdServiceUrl; } /// /// Genesis get password url /// /// public static String GenesisGetPasswordServiceUrl() { return ConfigurationManager.AppSettings["GenesisGetPasswordServiceUrl"] ?? DefaultGenesisGetPasswordServiceUrl; } /// /// Genesis get password url /// /// public static String GenesisGetPasswordContainerServiceUrl() { return ConfigurationManager.AppSettings["GenesisPasswordContainerServiceUrl"] ?? DefaultGenesisPasswordContainerServiceUrl; } /// /// Genesis set password url /// /// public static String GenesisSetPasswordServiceUrl() { return ConfigurationManager.AppSettings["GenesisSetPasswordServiceUrl"] ?? DefaultGenesisSetPasswordServiceUrl; } /// /// Set the SW license /// /// public static String SetSoftwareLicenseUrl() { return ConfigurationManager.AppSettings["SetSoftwareLicenseUrl"] ?? DefaultSetSoftwareLicenseUrl; } /// /// Set the SW license /// /// public static String GetSoftwareLicenseUrl() { return ConfigurationManager.AppSettings["GetSoftwareLicenseUrl"] ?? DefaultGetSoftwareLicenseUrl; } /// /// Check the SW license with a given name and version /// /// public static String GetSoftwareStartUpAccessUrl() { return ConfigurationManager.AppSettings["GetSoftwareStartUpAccessUrl"] ?? DefaultGetSoftwareStartUpAccessUrl; } /// /// Post Genesis calibration results /// /// public static String PostGenesisCalibrationResultUrl() { return ConfigurationManager.AppSettings["GenesisCalibrationResult"] ?? DefaultGenesisCalibrationResult; } /// /// Post Genesis calibration results /// /// public static String FileContentControllerUrl() { return ConfigurationManager.AppSettings["DefaultFileContentController"] ?? DefaultFileContentController; } /// /// Root for all function regarding the BSI Key generation service /// /// public static String KeyServerCustom() { return ConfigurationManager.AppSettings["DefaultKeyServerCustom"] ?? DefaultKeyServerCustom; } /// /// Root for all function regarding the meter itself /// /// public static String GenesisMeter() { return ConfigurationManager.AppSettings["GenesisMeter"] ?? DefaultGenesisMeter; } } }