mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 06:53:03 +00:00
removed remaining normalized models and related services
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import { inheritSerialization } from 'cerialize';
|
||||
import { resourceType } from '../../cache/builders/build-decorators';
|
||||
import { DSpaceObject } from '../../shared/dspace-object.model';
|
||||
import { CLAIMED_TASK } from './claimed-task-object.resource-type';
|
||||
import { TaskObject } from './task-object.model';
|
||||
|
||||
@@ -6,6 +8,7 @@ import { TaskObject } from './task-object.model';
|
||||
* A model class for a ClaimedTask.
|
||||
*/
|
||||
@resourceType(ClaimedTask.type)
|
||||
@inheritSerialization(DSpaceObject)
|
||||
export class ClaimedTask extends TaskObject {
|
||||
static type = CLAIMED_TASK;
|
||||
}
|
||||
|
@@ -1,53 +0,0 @@
|
||||
import { NormalizedTaskObject } from './normalized-task-object.model';
|
||||
import { relationship } from '../../cache/builders/build-decorators';
|
||||
import { autoserialize, inheritSerialization } from 'cerialize';
|
||||
import { ClaimedTask } from './claimed-task-object.model';
|
||||
import { EPerson } from '../../eperson/models/eperson.model';
|
||||
import { Group } from '../../eperson/models/group.model';
|
||||
import { WorkflowItem } from '../../submission/models/workflowitem.model';
|
||||
|
||||
/**
|
||||
* A normalized model class for a ClaimedTask.
|
||||
*/
|
||||
@inheritSerialization(NormalizedTaskObject)
|
||||
export class NormalizedClaimedTask extends NormalizedTaskObject<ClaimedTask> {
|
||||
/**
|
||||
* The task identifier
|
||||
*/
|
||||
@autoserialize
|
||||
id: string;
|
||||
|
||||
/**
|
||||
* The workflow step
|
||||
*/
|
||||
@autoserialize
|
||||
step: string;
|
||||
|
||||
/**
|
||||
* The task action type
|
||||
*/
|
||||
@autoserialize
|
||||
action: string;
|
||||
|
||||
/**
|
||||
* The eperson object for this task
|
||||
*/
|
||||
@autoserialize
|
||||
@relationship(EPerson, false)
|
||||
eperson: string;
|
||||
|
||||
/**
|
||||
* The group object for this task
|
||||
*/
|
||||
@autoserialize
|
||||
@relationship(Group, false)
|
||||
group: string;
|
||||
|
||||
/**
|
||||
* The workflowitem object whom this task is related
|
||||
*/
|
||||
@autoserialize
|
||||
@relationship(WorkflowItem, false)
|
||||
workflowitem: string;
|
||||
|
||||
}
|
@@ -1,44 +0,0 @@
|
||||
import { NormalizedTaskObject } from './normalized-task-object.model';
|
||||
import { PoolTask } from './pool-task-object.model';
|
||||
import { autoserialize, inheritSerialization } from 'cerialize';
|
||||
import { relationship } from '../../cache/builders/build-decorators';
|
||||
import { Group } from '../../eperson/models/group.model';
|
||||
import { WorkflowItem } from '../../submission/models/workflowitem.model';
|
||||
|
||||
/**
|
||||
* A normalized model class for a PoolTask.
|
||||
*/
|
||||
@inheritSerialization(NormalizedTaskObject)
|
||||
export class NormalizedPoolTask extends NormalizedTaskObject<PoolTask> {
|
||||
/**
|
||||
* The task identifier
|
||||
*/
|
||||
@autoserialize
|
||||
id: string;
|
||||
|
||||
/**
|
||||
* The workflow step
|
||||
*/
|
||||
@autoserialize
|
||||
step: string;
|
||||
|
||||
/**
|
||||
* The task action type
|
||||
*/
|
||||
@autoserialize
|
||||
action: string;
|
||||
|
||||
/**
|
||||
* The group object for this task
|
||||
*/
|
||||
@autoserialize
|
||||
@relationship(Group, false)
|
||||
group: string;
|
||||
|
||||
/**
|
||||
* The workflowitem object whom this task is related
|
||||
*/
|
||||
@autoserialize
|
||||
@relationship(WorkflowItem, false)
|
||||
workflowitem: string;
|
||||
}
|
@@ -1,54 +0,0 @@
|
||||
import { autoserialize, inheritSerialization } from 'cerialize';
|
||||
import { relationship } from '../../cache/builders/build-decorators';
|
||||
import { NormalizedDSpaceObject } from '../../cache/models/normalized-dspace-object.model';
|
||||
import { TaskObject } from './task-object.model';
|
||||
import { DSpaceObject } from '../../shared/dspace-object.model';
|
||||
import { Group } from '../../eperson/models/group.model';
|
||||
import { EPerson } from '../../eperson/models/eperson.model';
|
||||
import { WorkflowItem } from '../../submission/models/workflowitem.model';
|
||||
|
||||
/**
|
||||
* An abstract normalized model class for a TaskObject.
|
||||
*/
|
||||
@inheritSerialization(NormalizedDSpaceObject)
|
||||
export class NormalizedTaskObject<T extends DSpaceObject> extends NormalizedDSpaceObject<T> {
|
||||
|
||||
/**
|
||||
* The task identifier
|
||||
*/
|
||||
@autoserialize
|
||||
id: string;
|
||||
|
||||
/**
|
||||
* The workflow step
|
||||
*/
|
||||
@autoserialize
|
||||
step: string;
|
||||
|
||||
/**
|
||||
* The task action type
|
||||
*/
|
||||
@autoserialize
|
||||
action: string;
|
||||
|
||||
/**
|
||||
* The eperson object for this task
|
||||
*/
|
||||
@autoserialize
|
||||
@relationship(EPerson, false)
|
||||
eperson: string;
|
||||
|
||||
/**
|
||||
* The group object for this task
|
||||
*/
|
||||
@autoserialize
|
||||
@relationship(Group, false)
|
||||
group: string;
|
||||
|
||||
/**
|
||||
* The workflowitem object whom this task is related
|
||||
*/
|
||||
@autoserialize
|
||||
@relationship(WorkflowItem, false)
|
||||
workflowitem: string;
|
||||
}
|
@@ -1,3 +1,4 @@
|
||||
import { inheritSerialization } from 'cerialize';
|
||||
import { resourceType } from '../../cache/builders/build-decorators';
|
||||
import { POOL_TASK } from './pool-task-object.resource-type';
|
||||
import { TaskObject } from './task-object.model';
|
||||
@@ -6,6 +7,7 @@ import { TaskObject } from './task-object.model';
|
||||
* A model class for a PoolTask.
|
||||
*/
|
||||
@resourceType(PoolTask.type)
|
||||
@inheritSerialization(TaskObject)
|
||||
export class PoolTask extends TaskObject {
|
||||
static type = POOL_TASK;
|
||||
}
|
||||
|
@@ -1,3 +1,4 @@
|
||||
import { autoserialize, deserialize, inheritSerialization } from 'cerialize';
|
||||
import { Observable } from 'rxjs';
|
||||
import { link, resourceType } from '../../cache/builders/build-decorators';
|
||||
|
||||
@@ -16,24 +17,39 @@ import { TASK_OBJECT } from './task-object.resource-type';
|
||||
* An abstract model class for a TaskObject.
|
||||
*/
|
||||
@resourceType(TaskObject.type)
|
||||
@inheritSerialization(DSpaceObject)
|
||||
export class TaskObject extends DSpaceObject implements CacheableObject {
|
||||
static type = TASK_OBJECT;
|
||||
|
||||
/**
|
||||
* The task identifier
|
||||
*/
|
||||
@autoserialize
|
||||
id: string;
|
||||
|
||||
/**
|
||||
* The workflow step
|
||||
*/
|
||||
@autoserialize
|
||||
step: string;
|
||||
|
||||
/**
|
||||
* The task action type
|
||||
*/
|
||||
@autoserialize
|
||||
action: string;
|
||||
|
||||
/**
|
||||
* The HALLinks for this TaskObject
|
||||
*/
|
||||
@deserialize
|
||||
_links: {
|
||||
self: HALLink;
|
||||
eperson: HALLink;
|
||||
group: HALLink;
|
||||
workflowitem: HALLink;
|
||||
};
|
||||
|
||||
/**
|
||||
* The EPerson for this task
|
||||
* Will be undefined unless the eperson HALLink has been resolved.
|
||||
@@ -55,11 +71,4 @@ export class TaskObject extends DSpaceObject implements CacheableObject {
|
||||
@link(WorkflowItem.type)
|
||||
workflowitem?: Observable<RemoteData<WorkflowItem>> | WorkflowItem;
|
||||
|
||||
_links: {
|
||||
self: HALLink,
|
||||
eperson: HALLink,
|
||||
group: HALLink,
|
||||
workflowitem: HALLink,
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user