return this.httpClient.get<PolicyType[]>(url);
}
- getPolicyInstances(policyTypeId: number): Observable<PolicyInstance[]> {
+ getPolicyInstances(policyTypeId: string): Observable<PolicyInstance[]> {
const url = this.buildPath(this.policyTypePath, policyTypeId, this.policyPath);
return this.httpClient.get<PolicyInstance[]>(url);
}
* Gets policy parameters.
* @returns Observable that should yield a policy instance
*/
- getPolicy(policyTypeId: number, policyInstanceId: string): Observable<any> {
+ getPolicy(policyTypeId: string, policyInstanceId: string): Observable<any> {
const url = this.buildPath(this.policyTypePath, policyTypeId, this.policyPath, policyInstanceId);
return this.httpClient.get<any>(url);
}
* @param policyJson Json with the policy content
* @returns Observable that should yield a response code, no data
*/
- putPolicy(policyTypeId: number, policyInstanceId: string, policyJson: string): Observable<any> {
- const url = this.buildPath(this.policyTypePath, policyTypeId, this.policyPath, policyInstanceId);
+ putPolicy(policyTypeId: string, policyInstanceId: string, policyJson: string, ric: string): Observable<any> {
+ const url = this.buildPath(this.policyTypePath, policyTypeId, this.policyPath, policyInstanceId) + "?ric=" + ric;
return this.httpClient.put<PolicyInstanceAck>(url, policyJson, { observe: 'response' });
}
* @param policyTypeId
* @returns Observable that should yield a response code, no data
*/
- deletePolicy(policyTypeId: number, policyInstanceId: string): Observable<any> {
+ deletePolicy(policyTypeId: string, policyInstanceId: string): Observable<any> {
const url = this.buildPath(this.policyTypePath, policyTypeId, this.policyPath, policyInstanceId);
return this.httpClient.delete(url, { observe: 'response' });
}
+
+
+ getRics(policyTypeId: string): Observable<string[]> {
+ const url = this.buildPath('rics') + '?policyType=' + policyTypeId;
+ return this.httpClient.get<any>(url);
+ }
}