mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-12 12:33:07 +00:00
87382: fixing circular dependencies
This commit is contained in:
36
src/app/core/cache/object-cache.reducer.ts
vendored
36
src/app/core/cache/object-cache.reducer.ts
vendored
@@ -1,18 +1,16 @@
|
||||
import { HALLink } from '../shared/hal-link.model';
|
||||
import { HALResource } from '../shared/hal-resource.model';
|
||||
import {
|
||||
AddPatchObjectCacheAction,
|
||||
AddToObjectCacheAction,
|
||||
ApplyPatchObjectCacheAction,
|
||||
ObjectCacheAction,
|
||||
ObjectCacheActionTypes,
|
||||
AddToObjectCacheAction,
|
||||
RemoveFromObjectCacheAction,
|
||||
ResetObjectCacheTimestampsAction,
|
||||
AddPatchObjectCacheAction,
|
||||
ApplyPatchObjectCacheAction
|
||||
ResetObjectCacheTimestampsAction
|
||||
} from './object-cache.actions';
|
||||
import { hasValue, isNotEmpty } from '../../shared/empty.util';
|
||||
import { CacheEntry } from './cache-entry';
|
||||
import { ResourceType } from '../shared/resource-type';
|
||||
import { applyPatch, Operation } from 'fast-json-patch';
|
||||
import { CacheableObject } from './cacheable-object.model';
|
||||
|
||||
/**
|
||||
* An interface to represent a JsonPatch
|
||||
@@ -29,11 +27,6 @@ export interface Patch {
|
||||
operations: Operation[];
|
||||
}
|
||||
|
||||
export abstract class TypedObject {
|
||||
static type: ResourceType;
|
||||
type: ResourceType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the string value for an object that may be a string or a ResourceType
|
||||
*
|
||||
@@ -49,25 +42,6 @@ export const getResourceTypeValueFor = (type: any): string => {
|
||||
}
|
||||
};
|
||||
|
||||
/* tslint:disable:max-classes-per-file */
|
||||
/**
|
||||
* An interface to represent objects that can be cached
|
||||
*
|
||||
* A cacheable object should have a self link
|
||||
*/
|
||||
export class CacheableObject extends TypedObject implements HALResource {
|
||||
uuid?: string;
|
||||
handle?: string;
|
||||
_links: {
|
||||
self: HALLink;
|
||||
};
|
||||
// isNew: boolean;
|
||||
// dirtyType: DirtyType;
|
||||
// hasDirtyAttributes: boolean;
|
||||
// changedAttributes: AttributeDiffh;
|
||||
// save(): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* An entry in the ObjectCache
|
||||
*/
|
||||
|
Reference in New Issue
Block a user