mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
ACS-8466: Remove unused AuditService (#9982)
This commit is contained in:
parent
d86a67558c
commit
10cb71291c
@ -380,7 +380,6 @@ for more information about installing and using the source code.
|
|||||||
|
|
||||||
| Name | Description | Source link |
|
| Name | Description | Source link |
|
||||||
| ---- | ----------- | ----------- |
|
| ---- | ----------- | ----------- |
|
||||||
| [Audit Service](content-services/services/audit.service.md) | Manages Audit apps and entries. | [Source](../lib/content-services/src/lib/audit/audit.service.ts) |
|
|
||||||
| [Card View Content Update Service](content-services/services/card-view-content-update.service.md) | Manages Card View properties in the content services environment. | |
|
| [Card View Content Update Service](content-services/services/card-view-content-update.service.md) | Manages Card View properties in the content services environment. | |
|
||||||
| Implements BaseCardViewContentUpdate. | [Source](../lib/content-services/src/lib/common/services/card-view-content-update.service.ts) | |
|
| Implements BaseCardViewContentUpdate. | [Source](../lib/content-services/src/lib/common/services/card-view-content-update.service.ts) | |
|
||||||
| [Category tree datasource service](content-services/services/category-tree-datasource.service.md) | Datasource service for category tree. | [Source](../lib/content-services/src/lib/category/services/category-tree-datasource.service.ts) |
|
| [Category tree datasource service](content-services/services/category-tree-datasource.service.md) | Datasource service for category tree. | [Source](../lib/content-services/src/lib/category/services/category-tree-datasource.service.ts) |
|
||||||
|
@ -1,56 +0,0 @@
|
|||||||
---
|
|
||||||
Title: Audit Service
|
|
||||||
Added: v3.9.0
|
|
||||||
Status: Active
|
|
||||||
Last reviewed: 2020-08-12
|
|
||||||
---
|
|
||||||
|
|
||||||
# [Audit Service](../../../lib/content-services/src/lib/audit/audit.service.ts "Defined in audit.service.ts")
|
|
||||||
|
|
||||||
Manages Audit apps and entries.
|
|
||||||
|
|
||||||
## Class members
|
|
||||||
|
|
||||||
### Methods
|
|
||||||
|
|
||||||
- **deleteAuditEntries**(auditApplicationId: `string`, where: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
|
|
||||||
Permanently delete audit entries for an audit application.
|
|
||||||
- _auditApplicationId:_ `string` - The identifier of an audit application.
|
|
||||||
- _where:_ `string` - Audit entries to permanently delete for an audit application, given an inclusive time period or range of ids.
|
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` -
|
|
||||||
- **deleteAuditEntry**(auditApplicationId: `string`, auditEntryId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
|
|
||||||
Permanently delete an audit entry.
|
|
||||||
- _auditApplicationId:_ `string` - The identifier of an audit application.
|
|
||||||
- _auditEntryId:_ `string` - The identifier of an audit entry.
|
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` -
|
|
||||||
- **getAuditApp**(auditApplicationId: `string`, opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditAppEntry>`<br/>
|
|
||||||
Get audit application info.
|
|
||||||
- _auditApplicationId:_ `string` - The identifier of an audit application.
|
|
||||||
- _opts:_ `any` - (Optional) Options.
|
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditAppEntry>` - status of an audit application.
|
|
||||||
- **getAuditApps**(opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditAppPaging>`<br/>
|
|
||||||
Gets a list of audit applications.
|
|
||||||
- _opts:_ `any` - (Optional) Options.
|
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditAppPaging>` - a list of the audit applications.
|
|
||||||
- **getAuditEntries**(auditApplicationId: `string`, opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditEntryPaging>`<br/>
|
|
||||||
List audit entries for an audit application.
|
|
||||||
- _auditApplicationId:_ `string` - The identifier of an audit application.
|
|
||||||
- _opts:_ `any` - (Optional) Options.
|
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditEntryPaging>` - a list of audit entries.
|
|
||||||
- **getAuditEntriesForNode**(nodeId: `string`, opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditEntryPaging>`<br/>
|
|
||||||
List audit entries for a node.
|
|
||||||
- _nodeId:_ `string` - The identifier of a node.
|
|
||||||
- _opts:_ `any` - (Optional) Options.
|
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditEntryPaging>` -
|
|
||||||
- **getAuditEntry**(auditApplicationId: `string`, auditEntryId: `string`, opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditEntryEntry>`<br/>
|
|
||||||
Get audit entry.
|
|
||||||
- _auditApplicationId:_ `string` - The identifier of an audit application.
|
|
||||||
- _auditEntryId:_ `string` - The identifier of an audit entry.
|
|
||||||
- _opts:_ `any` - (Optional) Options.
|
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditEntryEntry>` - audit entry.
|
|
||||||
- **updateAuditApp**(auditApplicationId: `string`, auditAppBodyUpdate: `boolean`, opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditApp|any>`<br/>
|
|
||||||
Update audit application info.
|
|
||||||
- _auditApplicationId:_ `string` - The identifier of an audit application.
|
|
||||||
- _auditAppBodyUpdate:_ `boolean` - The audit application to update.
|
|
||||||
- _opts:_ `any` - (Optional) Options.
|
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditApp|any>` -
|
|
@ -1,144 +0,0 @@
|
|||||||
/*!
|
|
||||||
* @license
|
|
||||||
* Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { Injectable } from '@angular/core';
|
|
||||||
import { Observable, from } from 'rxjs';
|
|
||||||
import { AlfrescoApiService } from '@alfresco/adf-core';
|
|
||||||
import { AuditApi, AuditAppPaging, AuditApp, AuditEntryPaging, AuditEntryEntry } from '@alfresco/js-api';
|
|
||||||
|
|
||||||
@Injectable({
|
|
||||||
providedIn: 'root'
|
|
||||||
})
|
|
||||||
export class AuditService {
|
|
||||||
private _auditApi: AuditApi;
|
|
||||||
get auditApi(): AuditApi {
|
|
||||||
this._auditApi = this._auditApi ?? new AuditApi(this.apiService.getInstance());
|
|
||||||
return this._auditApi;
|
|
||||||
}
|
|
||||||
|
|
||||||
constructor(private apiService: AlfrescoApiService) {}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets a list of audit applications.
|
|
||||||
*
|
|
||||||
* @param opts Options.
|
|
||||||
* @returns a list of the audit applications.
|
|
||||||
*/
|
|
||||||
getAuditApps(opts?: any): Observable<AuditAppPaging> {
|
|
||||||
const defaultOptions = {
|
|
||||||
skipCount: 0
|
|
||||||
};
|
|
||||||
const queryOptions = Object.assign({}, defaultOptions, opts);
|
|
||||||
return from(this.auditApi.listAuditApps(queryOptions));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get audit application info.
|
|
||||||
*
|
|
||||||
* @param auditApplicationId The identifier of an audit application.
|
|
||||||
* @param opts Options.
|
|
||||||
* @returns status of an audit application.
|
|
||||||
*/
|
|
||||||
getAuditApp(auditApplicationId: string, opts?: any): Observable<AuditApp> {
|
|
||||||
const defaultOptions = {
|
|
||||||
auditApplicationId
|
|
||||||
};
|
|
||||||
const queryOptions = Object.assign({}, defaultOptions, opts);
|
|
||||||
return from(this.auditApi.getAuditApp(queryOptions));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update audit application info.
|
|
||||||
*
|
|
||||||
* @param auditApplicationId The identifier of an audit application.
|
|
||||||
* @param auditAppBodyUpdate The audit application to update.
|
|
||||||
* @param opts Options.
|
|
||||||
* @returns audit application model
|
|
||||||
*/
|
|
||||||
updateAuditApp(auditApplicationId: string, auditAppBodyUpdate: boolean, opts?: any): Observable<AuditApp | any> {
|
|
||||||
const defaultOptions = {};
|
|
||||||
const queryOptions = Object.assign({}, defaultOptions, opts);
|
|
||||||
return from(this.auditApi.updateAuditApp(auditApplicationId, { isEnabled: auditAppBodyUpdate }, queryOptions));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* List audit entries for an audit application.
|
|
||||||
*
|
|
||||||
* @param auditApplicationId The identifier of an audit application.
|
|
||||||
* @param opts Options.
|
|
||||||
* @returns a list of audit entries.
|
|
||||||
*/
|
|
||||||
getAuditEntries(auditApplicationId: string, opts?: any): Observable<AuditEntryPaging> {
|
|
||||||
const defaultOptions = {
|
|
||||||
skipCount: 0,
|
|
||||||
maxItems: 100
|
|
||||||
};
|
|
||||||
const queryOptions = Object.assign({}, defaultOptions, opts);
|
|
||||||
return from(this.auditApi.listAuditEntriesForAuditApp(auditApplicationId, queryOptions));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get audit entry.
|
|
||||||
*
|
|
||||||
* @param auditApplicationId The identifier of an audit application.
|
|
||||||
* @param auditEntryId The identifier of an audit entry.
|
|
||||||
* @param opts Options.
|
|
||||||
* @returns audit entry.
|
|
||||||
*/
|
|
||||||
getAuditEntry(auditApplicationId: string, auditEntryId: string, opts?: any): Observable<AuditEntryEntry> {
|
|
||||||
const defaultOptions = {};
|
|
||||||
const queryOptions = Object.assign({}, defaultOptions, opts);
|
|
||||||
return from(this.auditApi.getAuditEntry(auditApplicationId, auditEntryId, queryOptions));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* List audit entries for a node.
|
|
||||||
*
|
|
||||||
* @param nodeId The identifier of a node.
|
|
||||||
* @param opts Options.
|
|
||||||
* @returns audit entry list
|
|
||||||
*/
|
|
||||||
getAuditEntriesForNode(nodeId: string, opts?: any): Observable<AuditEntryPaging> {
|
|
||||||
const defaultOptions = {
|
|
||||||
nodeId
|
|
||||||
};
|
|
||||||
const queryOptions = Object.assign({}, defaultOptions, opts);
|
|
||||||
return from(this.auditApi.listAuditEntriesForNode(queryOptions));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Permanently delete audit entries for an audit application.
|
|
||||||
*
|
|
||||||
* @param auditApplicationId The identifier of an audit application.
|
|
||||||
* @param where Audit entries to permanently delete for an audit application, given an inclusive time period or range of ids.
|
|
||||||
* @returns void operation
|
|
||||||
*/
|
|
||||||
deleteAuditEntries(auditApplicationId: string, where: string): Observable<any> {
|
|
||||||
return from(this.auditApi.deleteAuditEntriesForAuditApp(auditApplicationId, where));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Permanently delete an audit entry.
|
|
||||||
*
|
|
||||||
* @param auditApplicationId The identifier of an audit application.
|
|
||||||
* @param auditEntryId The identifier of an audit entry.
|
|
||||||
* @returns void operation
|
|
||||||
*/
|
|
||||||
deleteAuditEntry(auditApplicationId: string, auditEntryId: string): Observable<any> {
|
|
||||||
return from(this.auditApi.deleteAuditEntry(auditApplicationId, auditEntryId));
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user