mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
69115: post master merge changes to workflow-action
This commit is contained in:
@@ -2,7 +2,6 @@ import { DataService } from './data.service';
|
|||||||
import { WorkflowAction } from '../tasks/models/workflow-action-object.model';
|
import { WorkflowAction } from '../tasks/models/workflow-action-object.model';
|
||||||
import { RequestService } from './request.service';
|
import { RequestService } from './request.service';
|
||||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||||
import { NormalizedObjectBuildService } from '../cache/builders/normalized-object-build.service';
|
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { CoreState } from '../core.reducers';
|
import { CoreState } from '../core.reducers';
|
||||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||||
@@ -13,18 +12,20 @@ import { DefaultChangeAnalyzer } from './default-change-analyzer.service';
|
|||||||
import { FindListOptions } from './request.models';
|
import { FindListOptions } from './request.models';
|
||||||
import { Observable } from 'rxjs/internal/Observable';
|
import { Observable } from 'rxjs/internal/Observable';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
|
import { dataService } from '../cache/builders/build-decorators';
|
||||||
|
import { WORKFLOW_ACTION } from '../tasks/models/workflow-action-object.resource-type';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A service responsible for fetching/sending data from/to the REST API on the workflowactions endpoint
|
* A service responsible for fetching/sending data from/to the REST API on the workflowactions endpoint
|
||||||
*/
|
*/
|
||||||
@Injectable()
|
@Injectable()
|
||||||
|
@dataService(WORKFLOW_ACTION)
|
||||||
export class WorkflowActionDataService extends DataService<WorkflowAction> {
|
export class WorkflowActionDataService extends DataService<WorkflowAction> {
|
||||||
protected linkPath = 'workflowactions';
|
protected linkPath = 'workflowactions';
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
protected requestService: RequestService,
|
protected requestService: RequestService,
|
||||||
protected rdbService: RemoteDataBuildService,
|
protected rdbService: RemoteDataBuildService,
|
||||||
protected dataBuildService: NormalizedObjectBuildService,
|
|
||||||
protected store: Store<CoreState>,
|
protected store: Store<CoreState>,
|
||||||
protected objectCache: ObjectCacheService,
|
protected objectCache: ObjectCacheService,
|
||||||
protected halService: HALEndpointService,
|
protected halService: HALEndpointService,
|
||||||
|
@@ -1,23 +0,0 @@
|
|||||||
import { autoserialize, inheritSerialization } from 'cerialize';
|
|
||||||
import { mapsTo } from '../../cache/builders/build-decorators';
|
|
||||||
import { WorkflowAction } from './workflow-action-object.model';
|
|
||||||
import { NormalizedDSpaceObject } from '../../cache/models/normalized-dspace-object.model';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A normalized model class for a WorkflowAction
|
|
||||||
*/
|
|
||||||
@mapsTo(WorkflowAction)
|
|
||||||
@inheritSerialization(NormalizedDSpaceObject)
|
|
||||||
export class NormalizedWorkflowAction extends NormalizedDSpaceObject<WorkflowAction> {
|
|
||||||
/**
|
|
||||||
* The workflow action's identifier
|
|
||||||
*/
|
|
||||||
@autoserialize
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The options available for this workflow action
|
|
||||||
*/
|
|
||||||
@autoserialize
|
|
||||||
options: string[];
|
|
||||||
}
|
|
@@ -1,19 +1,25 @@
|
|||||||
import { ResourceType } from '../../shared/resource-type';
|
import { inheritSerialization, autoserialize } from 'cerialize';
|
||||||
|
import { typedObject } from '../../cache/builders/build-decorators';
|
||||||
import { DSpaceObject } from '../../shared/dspace-object.model';
|
import { DSpaceObject } from '../../shared/dspace-object.model';
|
||||||
|
import { WORKFLOW_ACTION } from './workflow-action-object.resource-type';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A model class for a WorkflowAction
|
* A model class for a WorkflowAction
|
||||||
*/
|
*/
|
||||||
|
@typedObject
|
||||||
|
@inheritSerialization(DSpaceObject)
|
||||||
export class WorkflowAction extends DSpaceObject {
|
export class WorkflowAction extends DSpaceObject {
|
||||||
static type = new ResourceType('workflowaction');
|
static type = WORKFLOW_ACTION;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The workflow action's identifier
|
* The workflow action's identifier
|
||||||
*/
|
*/
|
||||||
|
@autoserialize
|
||||||
id: string;
|
id: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The options available for this workflow action
|
* The options available for this workflow action
|
||||||
*/
|
*/
|
||||||
|
@autoserialize
|
||||||
options: string[];
|
options: string[];
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,9 @@
|
|||||||
|
import { ResourceType } from '../../shared/resource-type';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The resource type for WorkflowAction
|
||||||
|
*
|
||||||
|
* Needs to be in a separate file to prevent circular
|
||||||
|
* dependencies in webpack.
|
||||||
|
*/
|
||||||
|
export const WORKFLOW_ACTION = new ResourceType('workflowaction');
|
Reference in New Issue
Block a user