module Sfx { export class IdUtils { public static getAppId ( routeParams ) { return decodeURIComponent ( routeParams . appId ) ; } public static getPartitionId ( routeParams ) { return decodeURIComponent ( routeParams . partitionId ) ; } public static getReplicaId ( routeParams ) { return decodeURIComponent ( routeParams . replicaId ) ; } public static getServiceId ( routeParams ) { return decodeURIComponent ( routeParams . serviceId ) ; } public static getServicePackageActivationId ( routeParams ) { return routeParams . activationId ? decodeURIComponent ( routeParams . activationId ) : "" ; } public static getAppTypeName ( routeParams ) { return decodeURIComponent ( routeParams . appTypeName ) ; } public static getCodePackageName ( routeParams ) { return decodeURIComponent ( routeParams . codePackageName ) ; } public static getContainerLogs ( routeParams ) { return decodeURIComponent ( routeParams . codePackageName ) ; } public static getNodeName ( routeParams ) { return decodeURIComponent ( routeParams . nodeName ) ; } public static getBackupPolicyName ( routeParams ) { return decodeURIComponent ( routeParams . backupPolicyName ) ; } public static getNetworkName ( routeParams ) { return decodeURIComponent ( routeParams . networkName ) ; } public static idToName ( id ) { return Constants . FabricPrefix + id ; } public static nameToId ( name ) { if ( _ . startsWith ( name , Constants . FabricPrefix ) ) { return name . substr ( Constants . FabricPrefix . length ) ; } return name ; } } }