File

ecosystem/shared/ecosystem.service.ts

Index

Properties
Methods

Constructor

constructor(modal: ModalService, alertService: AlertService, humanizeAppName: HumanizeAppNamePipe, translateService: TranslateService, applicationService: ApplicationService, appStateService: AppStateService, zipService: ZipService, tenantService: TenantService, inventoryService: InventoryService, wizardModalService: WizardModalService, pluginService: PluginsService)
Parameters :
Name Type Optional
modal ModalService No
alertService AlertService No
humanizeAppName HumanizeAppNamePipe No
translateService TranslateService No
applicationService ApplicationService No
appStateService AppStateService No
zipService ZipService No
tenantService TenantService No
inventoryService InventoryService No
wizardModalService WizardModalService No
pluginService PluginsService No

Methods

alertError
alertError(error: Error | EcosystemError)

Shows an error dialog.

Parameters :
Name Type Optional Description
error Error | EcosystemError No

Either a server error or an internal [[EcosystemError]].

Returns : void
cancelAppCreation
cancelAppCreation(app: IApplication)
Parameters :
Name Type Optional
app IApplication No
Returns : void
Async canDeleteApp
canDeleteApp(app: IApplication)
Parameters :
Name Type Optional
app IApplication No
Returns : Promise<boolean>
canOpenAppInBrowser
canOpenAppInBrowser(app: IApplication)
Parameters :
Name Type Optional
app IApplication No
Returns : boolean
Async checkIfSubscribed
checkIfSubscribed(app: IApplication)
Parameters :
Name Type Optional
app IApplication No
Returns : Promise<boolean>
Async createAppForArchive
createAppForArchive(archive, isPackageTypeArchive)
Parameters :
Name Optional Default value
archive No
isPackageTypeArchive No false
createConfig
createConfig(app: IApplication, formGroupValue: FormGroup)
Parameters :
Name Type Optional
app IApplication No
formGroupValue FormGroup No
Async deleteApp
deleteApp(app: IApplication, silent)
Parameters :
Name Type Optional Default value
app IApplication No
silent No false
Returns : Promise<void>
Async deleteArchive
deleteArchive(archive: IApplicationBinary, app: IApplication)
Parameters :
Name Type Optional
archive IApplicationBinary No
app IApplication No
Returns : Promise<void>
deletePackageVersion
deletePackageVersion(app: IApplication, params: IApplicationVersionDeleteParams)
Parameters :
Name Type Optional
app IApplication No
params IApplicationVersionDeleteParams No
Returns : any
Async deployApp
deployApp(selectedPackage: IApplication, formGroupValue, model)
Parameters :
Name Type Optional
selectedPackage IApplication No
formGroupValue No
model No
Async downloadArchive
downloadArchive(app: IApplication, archive: Pick<IApplicationBinary | "name" | "id">)
Parameters :
Name Type Optional
app IApplication No
archive Pick<IApplicationBinary | "name" | "id"> No
Returns : Promise<void>
Async fallbackToClone
fallbackToClone(application: IApplication, selectedPackage: IApplication, requestedVersion?: string)
Parameters :
Name Type Optional
application IApplication No
selectedPackage IApplication No
requestedVersion string Yes
Returns : unknown
filterContainString
filterContainString(name: string, filterTerm: string)
Parameters :
Name Type Optional
name string No
filterTerm string No
Returns : boolean
getAppFilterProps
getAppFilterProps(app: IApplication)

Creates object containing properties for filtering applications on lists.

Parameters :
Name Type Optional Description
app IApplication No

Application to create filter properties from.

Returns : AppFilterProps

Properties to filter by applications list.

Async getApplication
getApplication(appId: IdReference)
Parameters :
Name Type Optional
appId IdReference No
getApplications
getApplications(customFilter: any)
Parameters :
Name Type Optional Default value
customFilter any No {}
Async getApplicationsFiltered
getApplicationsFiltered(customFilter: any, filterCallback)
Parameters :
Name Type Optional Default value
customFilter any No {}
filterCallback No (app: IApplication) => !!app
getApplicationVersionObjectByTag
getApplicationVersionObjectByTag(applicationVersions: IApplicationVersion[], tagName: string)

Gets an object that contains searched tag

Parameters :
Name Type Optional Description
applicationVersions IApplicationVersion[] No

Array with all available versions

tagName string No

Searched tag

Returns : IApplicationVersion

Returns an object with searched tag

getAppState
getAppState(app: IApplication)
Parameters :
Name Type Optional
app IApplication No
Returns : ApplicationState
Async getArchiveManagedObject
getArchiveManagedObject(binaryId: string)
Parameters :
Name Type Optional
binaryId string No
Returns : Promise<IManagedObject>
Async getBinary
getBinary(app: IApplication, archive: IApplicationBinary | IIdentified)
Parameters :
Name Type Optional
app IApplication No
archive IApplicationBinary | IIdentified No
Returns : Promise<ArrayBuffer>
Async getCumulocityJson
getCumulocityJson(archive: File)
Parameters :
Name Type Optional
archive File No
Returns : Promise<IManifest | null>
Async getFeatureApplications
getFeatureApplications(customFilter: any)
Parameters :
Name Type Optional Default value
customFilter any No {}
Async getHostedAndPackageApplications
getHostedAndPackageApplications(customFilter: any)
Parameters :
Name Type Optional Default value
customFilter any No {}
getHumanizedAppName
getHumanizedAppName(app: IApplication)
Parameters :
Name Type Optional
app IApplication No
Returns : Promise<string>
Async getMicroservices
getMicroservices()
Async getPackageApplications
getPackageApplications(customFilter: any)
Parameters :
Name Type Optional Default value
customFilter any No {}
getPackageContentState
getPackageContentState(app: IApplication)
Parameters :
Name Type Optional
app IApplication No
Returns : ApplicationState
getUniqueAppConfig
getUniqueAppConfig(srcApp: IApplication, existingApps: IApplication[])
Parameters :
Name Type Optional
srcApp IApplication No
existingApps IApplication[] No
Returns : IApplication
Async getWebApplications
getWebApplications(customFilter: any)
Parameters :
Name Type Optional Default value
customFilter any No {}
hasExports
hasExports(app: IApplication)
Parameters :
Name Type Optional
app IApplication No
Returns : boolean
Async hasSubscribedAppParent
hasSubscribedAppParent(app: IApplication)
Parameters :
Name Type Optional
app IApplication No
Returns : Promise<boolean>
isApplication
isApplication(app: IApplication)
Parameters :
Name Type Optional
app IApplication No
Returns : boolean
isCustomMicroservice
isCustomMicroservice(app: IApplication)
Parameters :
Name Type Optional
app IApplication No
Returns : boolean
isExternal
isExternal(app: IApplication)
Parameters :
Name Type Optional
app IApplication No
Returns : boolean
isFeature
isFeature(app: IApplication)
Parameters :
Name Type Optional
app IApplication No
Returns : boolean
isMicroservice
isMicroservice(app: IApplication)
Parameters :
Name Type Optional
app IApplication No
Returns : boolean
Async isMicroserviceHostingAllowed
isMicroserviceHostingAllowed()
Returns : Promise<boolean>
Async isOverwrittenByCustomApp
isOverwrittenByCustomApp(app: IApplication)
Parameters :
Name Type Optional
app IApplication No
Returns : Promise<boolean>
isOwner
isOwner(app: IApplication)
Parameters :
Name Type Optional
app IApplication No
Returns : boolean
isPackage
isPackage(app: IApplication)
Parameters :
Name Type Optional
app IApplication No
Returns : boolean
isPackageBlueprint
isPackageBlueprint(app: IApplication)
Parameters :
Name Type Optional
app IApplication No
Returns : boolean
isPlugin
isPlugin(app: IApplication)
Parameters :
Name Type Optional
app IApplication No
Returns : boolean
isPluginsPackage
isPluginsPackage(app: IApplication)
Parameters :
Name Type Optional
app IApplication No
Returns : boolean
isUnpacked
isUnpacked(app: IApplication)
Parameters :
Name Type Optional
app IApplication No
Returns : boolean
Async isValidAppType
isValidAppType(archive: File, appType: ApplicationType)
Parameters :
Name Type Optional
archive File No
appType ApplicationType No
Returns : Promise<boolean>
Async listArchives
listArchives(appId: string | number | IApplication)
Parameters :
Name Type Optional
appId string | number | IApplication No
openApp
openApp(app)
Parameters :
Name Optional
app No
Returns : void
Async reactivateArchive
reactivateArchive(app: IApplication)
Parameters :
Name Type Optional
app IApplication No
Returns : Promise<void>
Async removeOldestArchive
removeOldestArchive(app: IApplication, archives: IApplicationBinary[])
Parameters :
Name Type Optional
app IApplication No
archives IApplicationBinary[] No
Returns : Promise<void>
setAppActiveVersion
setAppActiveVersion(app: IApplication, activeVersionId: string)
Parameters :
Name Type Optional
app IApplication No
activeVersionId string No
setAvailabilityToPrivateIfNotSetAlready
setAvailabilityToPrivateIfNotSetAlready(app: IApplication)
Parameters :
Name Type Optional
app IApplication No
Returns : IApplication
setPackageVersionTag
setPackageVersionTag(app: IApplication, version: string, tags: string[])
Parameters :
Name Type Optional
app IApplication No
version string No
tags string[] No
Returns : any
shouldUpgradePackage
shouldUpgradePackage(currentApplicationVersion: string, latestApp: IApplicationVersion)

Compares currently deployed application version with application version tagged as "latest"

Parameters :
Name Type Optional Description
currentApplicationVersion string No

Deployed application version

latestApp IApplicationVersion No

Latest application version object

Returns : boolean

Returns true if latest version is greater than current, otherwise false

Async subscribeApp
subscribeApp(app: IApplication)
Parameters :
Name Type Optional
app IApplication No
Returns : Promise<void>
Async unsubscribeApp
unsubscribeApp(app: IApplication)
Parameters :
Name Type Optional
app IApplication No
Returns : Promise<void>
Async updateApp
updateApp(app: IApplication, deleteOnFailure)
Parameters :
Name Type Optional Default value
app IApplication No
deleteOnFailure No false
Async updateAppManifest
updateAppManifest(application: IApplication, selectedPackage: IApplication, requestedVersion?: string)
Parameters :
Name Type Optional
application IApplication No
selectedPackage IApplication No
requestedVersion string Yes
Returns : Promise<literal type>
updateUploadProgress
updateUploadProgress(event)
Parameters :
Name Optional
event No
Returns : void
Async uploadArchiveToApp
uploadArchiveToApp(archive: File, app: IApplication, isNewVersion)
Parameters :
Name Type Optional Default value
archive File No
app IApplication No
isNewVersion No false
Async uploadBinaryFromOtherPackage
uploadBinaryFromOtherPackage(selectedPackage: IApplication, applicationToUploadBinaryTo: IApplication, binaryId: string, requestedVersion?: string, useBinariesFrom?: IApplication)
Parameters :
Name Type Optional
selectedPackage IApplication No
applicationToUploadBinaryTo IApplication No
binaryId string No
requestedVersion string Yes
useBinariesFrom IApplication Yes
Returns : any
Async validateArchiveToAppCompatibility
validateArchiveToAppCompatibility(archive: File, app: IApplication)
Parameters :
Name Type Optional
archive File No
app IApplication No
Returns : Promise<void>
Async validatePackageKeyAndContextPath
validatePackageKeyAndContextPath(manifest: IManifest, app: IApplication)
Parameters :
Name Type Optional
manifest IManifest No
app IApplication No
Returns : any
Async verifyBlueprintVersionsCompatibility
verifyBlueprintVersionsCompatibility(blueprint: Partial)

Verify versions compatibility for blueprints. If a blueprint version is not compatible, a warning is shown.

Parameters :
Name Type Optional Description
blueprint Partial<IManifest> No

The blueprint to install.

Returns : Promise<boolean>

true if the installation can continue or false if it should be aborted.

Async verifyLicenses
verifyLicenses(pluginsToInstall: Array<LicensedApplicationPlugin>)

Community plugins need to verify the license agreement. If a package is a community package, the license is shown.

Parameters :
Name Type Optional Description
pluginsToInstall Array<LicensedApplicationPlugin> No

The list of plugins to install.

Returns : unknown

true if the installation can continue.

Async verifyPluginVersionsCompatibility
verifyPluginVersionsCompatibility(pluginsToInstall: ApplicationPlugin[], app: IApplication)

Verify versions compatibility for plugins. In case a version does not exist in the versioningMatrix we don't do anything due to backward compatibility. If a plugin version is not compatible, a warning is shown.

Parameters :
Name Type Optional Description
pluginsToInstall ApplicationPlugin[] No

The list of plugins to install.

app IApplication No
Returns : Promise<boolean>

true if the installation can continue or false if it should be aborted.

Properties

appDeleted
Default value : new EventEmitter<IApplication>()
progress
Type : BehaviorSubject<number>
Default value : new BehaviorSubject<number>(null)

results matching ""

    No results matching ""