import SoftwaresSearchBuilder from 'opengate-js/src/searching/builder/SoftwaresSearchBuilder.js'SoftwaresSearchBuilder
Extends:
Defined a search over Datastreams
Example:
ogapi.softwareSearchBuilder()
Constructor Summary
| Public Constructor | ||
| public |
constructor(parent: InternalOpenGateAPI) |
|
Member Summary
| Public Members | ||
| public |
fluentFilter: * |
|
| public |
tagsFilter: *[] |
|
Method Summary
| Public Methods | ||
| public |
withHardwareId(hardwareId: string): SoftwaresSearchBuilder Sets hardware id to search |
|
| public |
withId(softwareId: string): SoftwaresSearchBuilder Sets softwareId to search |
|
| public |
withManufacturer(manufacturerName: string): SoftwaresSearchBuilder Set feedName to search |
|
| public |
withModel(modelName: string): SoftwaresSearchBuilder Set modelName to search |
|
| public |
withModelVersion(modelVersion: string): SoftwaresSearchBuilder Set modelVersion to search |
|
| public |
withName(softwareName: string): SoftwaresSearchBuilder Set softwareName to search |
|
| public |
withType(softwareType: string): SoftwaresSearchBuilder Set softwareType to search |
|
| public |
withVersion(softwareVersion: string): SoftwaresSearchBuilder Set softwareVersion to search |
|
Inherited Summary
| From class SearchBuilder | ||
| public |
[route]: * |
|
| public |
addSortAscendingBy(filterField: string): SearchBuilder Add ascending param into the sort search object |
|
| public |
addSortBy(filterField: string, typeSort: string): SearchBuilder Add ascending/descending param into the sort search object |
|
| public |
addSortDescendingBy(filterField: string): SearchBuilder Add descending param into the sort search object |
|
| public |
Build a instance of Search |
|
| public |
filter(filter: FilterBuilder | object): SearchBuilder The search request will have this filter |
|
| public |
findAllFields(input: *): Promise Return a promise which it will contains an array with fields recommended with complete structure |
|
| public |
findFieldPath(field: *): Promise Return a promise which it will contains an string with the path of a field |
|
| public |
findFields(input: *): Promise Return a promise which it will contains an array with fields recommended with only identifier |
|
| public |
limit(size: number, start: number): SearchBuilder Set reponse pagination. |
|
| public |
removeSortBy(filterField: string): SearchBuilder Remove sort param from the search object |
|
| public |
withTimeout(ms: number): SearchBuilder The request will have a specific time out if it will be exceeded then the promise throw an exception |
|
| From class SearchWithSummaryBuilder | ||
| public |
The response will only have a summary information |
|
Public Constructors
public constructor(parent: InternalOpenGateAPI) source
Constructor
Override:
SearchWithSummaryBuilder#constructorParams:
| Name | Type | Attribute | Description |
| parent | InternalOpenGateAPI |
|
Instance of our InternalOpenGateAPI |
Public Methods
public withHardwareId(hardwareId: string): SoftwaresSearchBuilder source
Sets hardware id to search
Params:
| Name | Type | Attribute | Description |
| hardwareId | string |
|
hardware id |
Throw:
throw error when hardwareId is not typeof string |
Example:
ogapi.hardwareSearchBuilder().withHardwareId('myHardware').build()
public withId(softwareId: string): SoftwaresSearchBuilder source
Sets softwareId to search
Params:
| Name | Type | Attribute | Description |
| softwareId | string |
|
software id |
Throw:
throw error when softwareId is not typeof string |
Example:
ogapi.softwareSearchBuilder().withId('mySoftwareId').build()
public withManufacturer(manufacturerName: string): SoftwaresSearchBuilder source
Set feedName to search
Params:
| Name | Type | Attribute | Description |
| manufacturerName | string |
|
manufacturer name |
Throw:
throw error when modelName is not typeof string |
Example:
ogapi.softwareSearchBuilder().withManufacturer('myManufacturer').build()
public withModel(modelName: string): SoftwaresSearchBuilder source
Set modelName to search
Params:
| Name | Type | Attribute | Description |
| modelName | string |
|
model name |
Throw:
throw error when modelName is not typeof string |
Example:
ogapi.softwareSearchBuilder().withModel('myModel').build()
public withModelVersion(modelVersion: string): SoftwaresSearchBuilder source
Set modelVersion to search
Params:
| Name | Type | Attribute | Description |
| modelVersion | string |
|
model version |
Throw:
throw error when modelVersion is not typeof string |
Example:
ogapi.softwareSearchBuilder().withModelVersion('myModelVersion).build()
public withName(softwareName: string): SoftwaresSearchBuilder source
Set softwareName to search
Params:
| Name | Type | Attribute | Description |
| softwareName | string |
|
software name |
Throw:
throw error when softwareName is not typeof string |
Example:
ogapi.softwareSearchBuilder().withName('mySoftware').build()
public withType(softwareType: string): SoftwaresSearchBuilder source
Set softwareType to search
Params:
| Name | Type | Attribute | Description |
| softwareType | string |
|
software version |
Throw:
throw error when softwareType is not typeof string |
Example:
ogapi.softwareSearchBuilder().withType('mySoftwareType).build()
public withVersion(softwareVersion: string): SoftwaresSearchBuilder source
Set softwareVersion to search
Params:
| Name | Type | Attribute | Description |
| softwareVersion | string |
|
software version |
Throw:
throw error when softwareVersion is not typeof string |
Example:
ogapi.softwareSearchBuilder().withVersion('mySoftwareVersion).build()