File

src/core/smart-service-adapter.service.ts

Description

A service used to initialize and manage the JSDO Session and to manage JSDO catalogs.

Extends

ReplaySubject

Example

Index

Properties
Methods
Accessors

Constructor

constructor(smartConfig: SmartConfig, smartHttp: SmartHttpService, keycloakService: SmartKeycloakService, secureableService: SmartSecureableService, injector: Injector)
Parameters :
Name Type Optional
smartConfig SmartConfig No
smartHttp SmartHttpService No
keycloakService SmartKeycloakService No
secureableService SmartSecureableService No
injector Injector No

Methods

Public addCatalog
addCatalog(catalog: string)

Attempts to load the given JSDO catalog.

Parameters :
Name Type Optional
catalog string No
Returns : Promise<any>
Public catalogLoaded
catalogLoaded(catalog: string)

Indicates whether a JSDO catalog with the given name has been loaded.

Parameters :
Name Type Optional
catalog string No
Returns : boolean
Public getCatalog
getCatalog(catalog: string)

Returns the JSDO catalog with the given catalog name, if it has been loaded.

Parameters :
Name Type Optional
catalog string No
Returns : any
Public isAuthorized
isAuthorized()
Returns : Promise<boolean>

Promise

Public login
login(credentials?: ISmartServiceCredentials)

Logs the user in using the given credentials, or the credentials specified in the app configuration if none are provided.

Parameters :
Name Type Optional
credentials ISmartServiceCredentials Yes
Returns : Promise<any>
Public logout
logout(afterLogoutPage: string, secureableLogout)

Logs the user out.

Parameters :
Name Type Optional Default value
afterLogoutPage string No 'login'
secureableLogout No true
Returns : Promise<void>
Public oidcLogin
oidcLogin(serviceId: string)
Parameters :
Name Type Optional
serviceId string No
Returns : Promise<any>

Promise

Public setAppRoutes
setAppRoutes()

Fetches the SmartAppRoutes, decorates and stores them.

Returns : Promise<boolean>

Properties

Public afterLogoutPage
Type : string
Public appRoutes
Type : Route[]

The application's routes

Public oidcToken
Type : ReplaySubject<string>
Default value : new ReplaySubject()
Public oidcTokenValue
Type : string
Public state
Type : SmartServiceAdapterState
Default value : { authenticated: false, jsdoSession: null, routesSet: true, catalogs: [], initFinished: false, }

The current state of the Smart Service Adapter.

Accessors

isKeycloakEnabled
getisKeycloakEnabled()

Indicates whether Keycloak authentication is enabled

Returns : boolean
isSecureableEnabled
getisSecureableEnabled()

Indicates whether Secureable authentication is enabled

Returns : boolean
serviceURI
getserviceURI()

The serviceURI provided in the application's configuration

Returns : string
catalogURI
getcatalogURI()

The catalogURI or /web/Catalog if none was provided.

Returns : string
templateURI
gettemplateURI()

The templateURI or /web if none was provided.

Returns : string
imageURI
getimageURI()

the imageURI or /web/Image if none was provided.

Returns : string
smartRestURI
getsmartRestURI()

The smartRestURI or /web if none was provided.

Returns : string

result-matching ""

    No results matching ""