Home Reference Source Test
public class | source

RuntimeCatalogue

Constructor Summary

Public Constructor
public

constructor(runtimeFactory: *)

Member Summary

Public Members
public

atob: *

public
public set
public get
public

Method Summary

Public Methods
public

Uses the sourcePackageURL from the descriptor, requests the sourcePackage and attaches it to the descriptor.

public

Create DataObjectSchema based on raw object that contains its attributes

public

Create HypertyDescriptor based on raw object that contains its attributes

public

Create ProtocolStubDescriptor based on raw object that contains its attributes

public

Create HypertyRuntimeDescriptor based on raw object that contains its attributes

public
public

Create ProtocolStubDescriptor based on raw object that contains its attributes

public

deleteFromPM(url: *): *

public

getDataSchemaDescriptor(dataSchemaURL: *, getFull: boolean, constraints: JSON): Promise

Get DataSchemaDescriptor

public

getDescriptor(descriptorURL: String, createFunc: function, getFull: boolean, constraints: JSON): Promise

Get a Catalogue Data Object (Descriptor) from a URL, and construct it using the provided function

public

getHypertyDescriptor(hypertyURL: *, getFull: boolean, constraints: JSON): Promise

Get HypertyDescriptor

public

getIdpProxyDescriptor(idpProxyURL: *, getFull: boolean, constraints: JSON): Promise

Get IDPProxyDescriptor

public

getRuntimeDescriptor(runtimeURL: *, getFull: boolean, constraints: JSON): Promise

Get RuntimeDescriptor

public

Returns the sourceCode of a given descriptor

public

getSourcePackageFromURL(sourcePackageURL: *): Promise

Get source Package from a URL

public

getStubDescriptor(stubURL: *, getFull: boolean, constraints: JSON): Promise

Get StubDescriptor

public

getTypeList(typeURL: *, constraints: JSON): Promise

Returns the list of available catalogue objects for the given "type URL", i.e.

Public Constructors

public constructor(runtimeFactory: *) source

Params:

NameTypeAttributeDescription
runtimeFactory *

Public Members

public atob: * source

public httpRequest: * source

public set runtimeURL: * source

public get runtimeURL: * source

public storageManager: * source

Public Methods

public attachRawSourcePackage(descriptor: CatalogueDataObject, constraints: JSON): Promise source

Uses the sourcePackageURL from the descriptor, requests the sourcePackage and attaches it to the descriptor.

Params:

NameTypeAttributeDescription
descriptor CatalogueDataObject
constraints JSON

constraints object

Return:

Promise

fulfills with complete descriptor

public createDataSchema(rawSchema: *): DataObjectSchema source

Create DataObjectSchema based on raw object that contains its attributes

Params:

NameTypeAttributeDescription
rawSchema *

public createHyperty(rawHyperty: JSON): HypertyDescriptor source

Create HypertyDescriptor based on raw object that contains its attributes

Params:

NameTypeAttributeDescription
rawHyperty JSON

public createIdpProxy(rawProxy: *): ProtocolStubDescriptor source

Create ProtocolStubDescriptor based on raw object that contains its attributes

Params:

NameTypeAttributeDescription
rawProxy *

public createRuntimeDescriptor(rawRuntime: *): HypertyRuntimeDescriptor source

Create HypertyRuntimeDescriptor based on raw object that contains its attributes

Params:

NameTypeAttributeDescription
rawRuntime *

public createSourcePackage(sp: *): * source

Params:

NameTypeAttributeDescription
sp *

Return:

*

public createStub(rawStub: *): ProtocolStubDescriptor source

Create ProtocolStubDescriptor based on raw object that contains its attributes

Params:

NameTypeAttributeDescription
rawStub *

public deleteFromPM(url: *): * source

Params:

NameTypeAttributeDescription
url *

Return:

*

public getDataSchemaDescriptor(dataSchemaURL: *, getFull: boolean, constraints: JSON): Promise source

Get DataSchemaDescriptor

Params:

NameTypeAttributeDescription
dataSchemaURL *

e.g. mydomain.com/.well-known/dataschema/MyDataSchema

getFull boolean
  • optional

boolean to decide to get the descriptor with the sourcePackage or (potentially) without

constraints JSON

constraints object

Return:

Promise

public getDescriptor(descriptorURL: String, createFunc: function, getFull: boolean, constraints: JSON): Promise source

Get a Catalogue Data Object (Descriptor) from a URL, and construct it using the provided function

Params:

NameTypeAttributeDescription
descriptorURL String

e.g. mydomain.com/.well-known/hyperty/MyHyperty

createFunc function

e.g. createHyperty

getFull boolean
  • optional

whether or not to get descriptor with sourcePackage, or only the descriptor part

constraints JSON

constraints object

Return:

Promise

Promise that fulfills with the requested descriptor in the appropriate type. If constraints were provided, a descriptor is only returned if it meets the constraints, otherwise the promise will be rejected.

public getHypertyDescriptor(hypertyURL: *, getFull: boolean, constraints: JSON): Promise source

Get HypertyDescriptor

Params:

NameTypeAttributeDescription
hypertyURL *

e.g. mydomain.com/.well-known/hyperty/MyHyperty

getFull boolean
  • optional

boolean to decide to get the descriptor with the sourcePackage or (potentially) without

constraints JSON

constraints object

Return:

Promise

public getIdpProxyDescriptor(idpProxyURL: *, getFull: boolean, constraints: JSON): Promise source

Get IDPProxyDescriptor

Params:

NameTypeAttributeDescription
idpProxyURL *

e.g. mydomain.com/.well-known/idp-proxy/MyProxy

getFull boolean
  • optional

boolean to decide to get the descriptor with the sourcePackage or (potentially) without

constraints JSON

constraints object

Return:

Promise

public getRuntimeDescriptor(runtimeURL: *, getFull: boolean, constraints: JSON): Promise source

Get RuntimeDescriptor

Params:

NameTypeAttributeDescription
runtimeURL *

e.g. mydomain.com/.well-known/runtime/MyRuntime

getFull boolean
  • optional

boolean to decide to get the descriptor with the sourcePackage or (potentially) without

constraints JSON

constraints object

Return:

Promise

public getSourceCodeFromDescriptor(descriptor: CatalogueDataObject): Promise source

Returns the sourceCode of a given descriptor

Params:

NameTypeAttributeDescription
descriptor CatalogueDataObject

Catalogue Object that was retrieved using e.g. getHypertyDescriptor()

Return:

Promise

public getSourcePackageFromURL(sourcePackageURL: *): Promise source

Get source Package from a URL

Params:

NameTypeAttributeDescription
sourcePackageURL *

e.g. mydomain.com/.well-known/hyperty/MyHyperty/sourcePackage

Return:

Promise

public getStubDescriptor(stubURL: *, getFull: boolean, constraints: JSON): Promise source

Get StubDescriptor

Params:

NameTypeAttributeDescription
stubURL *

e.g. mydomain.com/.well-known/protostub/MyProtostub

getFull boolean
  • optional

boolean to decide to get the descriptor with the sourcePackage or (potentially) without

constraints JSON

constraints object

Return:

Promise

public getTypeList(typeURL: *, constraints: JSON): Promise source

Returns the list of available catalogue objects for the given "type URL", i.e. a catalogue URL that specifies a type, but no catalogue object name.

Params:

NameTypeAttributeDescription
typeURL *

URL pointing to the catalogue object type you want a list of available objects for, e.g. hyperty-catalogue://catalogue.fokus.fraunhofer.de/.well-known/idp-proxy

constraints JSON

constraints object

Return:

Promise

typeListPromise - Promise that fulfills with the list of available catalogue object names for the requested type, rejects on HTTP error or if the HTTP response is not in JSON. If constraints were provided, then the list only contains those objects that meet the constraints