- getBasePath() ⇒
string Get base URL i.e. everything till the port number, e.g. http://localhost:8080
- adjustHeight()
Adjusts the gadget height by calling the gadget api after adding a delay
- setVisibilityOf(divId, visible)
Sets the visibility of an element. Also adjusts the height of the gadget after changing the visibility
- getRepoNameFromDbUrl(dbUrl) ⇒
string Get name of the schema repository from user database URL
- getDbNameFromDbUrl(dbUrl) ⇒
string Get name of the user database from its URL
- getRecordPreviewHtml(recordUrl, callback)
Get the html preview of a record
- doGet(url, callback, isOSLCv2)
Send a proxied async GET request to the given URL using OAuth
- doGetXML(url, callback, isOSLCv2)
Send a proxied async GET request to the given URL using OAuth
- doPost(url, callback, postData)
Send a proxied async POST request to the given URL using OAuth
- getOAuthFriendsApiUrl() ⇒
Get the URL to fetch ClearQuest OAuthFriends
- checkIfFTSenabled(dbUrl, callback)
Checks if Full text search (FTS) is enabled
- getSchemaRepositories(cqWebUrl, callback)
Get all schema repositories of CQWeb
- getUserDatabases(repoUrl, callback)
Get all user databases of a schema repository
- getRecordTypes(dbUrl, callback)
Get all record types of a user database
- getRecord(dbUrl, recordType, name, callback)
Get a record by name.
- singleObjectCallback :
function A callback to process only a single object
- arrayCallback :
function A callback to process an array of objects
- htmlCallback :
function A callback to process html as a string
- requestCallback :
function A callback to process response of a AJAX request
Get base URL i.e. everything till the port number, e.g. http://localhost:8080
Kind: global function
Returns: string - base URL
Adjusts the gadget height by calling the gadget api after adding a delay
Sets the visibility of an element. Also adjusts the height of the gadget after changing the visibility
Kind: global function
| Param | Type |
|---|---|
| divId | string |
| visible | boolean |
Get name of the schema repository from user database URL
Kind: global function
Returns: string - schema repository name
| Param | Type | Description |
|---|---|---|
| dbUrl | string |
The url of the user database in which the record is stored e.g. http://localhost:9080/cqweb/oslc/repo/reponame/db/SAMPL |
Get name of the user database from its URL
Kind: global function
Returns: string - user database name
| Param | Type | Description |
|---|---|---|
| dbUrl | string |
The url of the user database in which the record is stored e.g. http://localhost:9080/cqweb/oslc/repo/reponame/db/SAMPL |
Get the html preview of a record
Kind: global function
| Param | Type | Description |
|---|---|---|
| recordUrl | string |
The record URL e.g. http://localhost:9080/cqweb/oslc/repo/reponame/db/SAMPL/record/16777224-33602104 |
| callback | htmlCallback |
callback to process the response. Response will contain the HTML representing the record |
Send a proxied async GET request to the given URL using OAuth
Kind: global function
| Param | Type | Description |
|---|---|---|
| url | string |
URL to send the request to. e.g. http://localhost:9080/cqweb/oslc/repo/reponame/db/SAMPL/record/16777224-33602104 |
| callback | requestCallback |
callback to process the response. Response will be in the form of json |
| isOSLCv2 | boolean |
flag to indicate which version of CQ OSLC API needs to be used. By default version 1 will be used if nothing is provided |
Send a proxied async GET request to the given URL using OAuth
Kind: global function
| Param | Type | Description |
|---|---|---|
| url | string |
URL to send the request to. e.g. http://localhost:9080/cqweb/oslc/repo/reponame/db/SAMPL/record/16777224-33602104 |
| callback | requestCallback |
callback to process the response. Response will be in the form of XML |
| isOSLCv2 | boolean |
flag to indicate which version of CQ OSLC API needs to be used. By default version 1 will be used if nothing is provided |
Send a proxied async POST request to the given URL using OAuth
Kind: global function
| Param | Type | Description |
|---|---|---|
| url | string |
URL to send the request to. e.g. http://localhost:9080/cqweb/oslc/repo/reponame/db/SAMPL/record/16777224-33602104 |
| callback | requestCallback |
callback to process the response. Response will be in the form of json |
| postData | boolean |
data for the POST body |
Get the URL to fetch ClearQuest OAuthFriends
Kind: global function Returns: URL to fetch ClearQuest OAuthFriends
Checks if Full text search (FTS) is enabled
Kind: global function
| Param | Type | Description |
|---|---|---|
| dbUrl | string |
The url of the user database in which the record is stored e.g. http://localhost:9080/cqweb/oslc/repo/reponame/db/SAMPL |
| callback | boolean |
callback to do handle the response |
Get all schema repositories of CQWeb
Kind: global function
| Param | Type | Description |
|---|---|---|
| cqWebUrl | string |
The url of CQWeb e.g. http://localhost:9080/cqweb |
| callback | arrayCallback |
callback to process the response. Response will contain an array of objects, each object representing a schema repository |
Get all user databases of a schema repository
Kind: global function
| Param | Type | Description |
|---|---|---|
| repoUrl | string |
The url of the schema repository e.g. http://localhost:9080/cqweb/oslc/repo/reponame |
| callback | arrayCallback |
callback to process the response. Response will contain an array of objects, each object representing a user database |
Get all record types of a user database
Kind: global function
| Param | Type | Description |
|---|---|---|
| dbUrl | string |
The url of the user database in which the record is stored e.g. http://localhost:9080/cqweb/oslc/repo/reponame/db/SAMPL |
| callback | arrayCallback |
callback to process the response. Response will contain an array of objects, each object representing a record type |
Get a record by name.
Kind: global function
| Param | Type | Description |
|---|---|---|
| dbUrl | string |
The url of the user database in which the record is stored e.g. http://localhost:9080/cqweb/oslc/repo/reponame/db/SAMPL |
| recordType | string |
type of record e.g. defect, customer etc. |
| name | string |
name of the record |
| callback | singleObjectCallback |
callback to process the response. Response will contain a single object representing the record |
A callback to process only a single object
Kind: global typedef
| Param | Type |
|---|---|
| object | Object |
A callback to process an array of objects
Kind: global typedef
| Param | Type |
|---|---|
| arr | Array.<Object> |
A callback to process html as a string
Kind: global typedef
| Param | Type |
|---|---|
| html | string |
A callback to process response of a AJAX request
Kind: global typedef
| Param | Type |
|---|---|
| response | object |