mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-10 03:23:07 +00:00
93803: Resolve circular dependency
src/app/core/cache/builders/build-decorators.ts > src/app/core/data/base/hal-data-service.interface.ts > src/app/core/data/paginated-list.model.ts
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { BROWSE_DEFINITION } from '../shared/browse-definition.resource-type';
|
||||
import { BrowseDefinition } from '../shared/browse-definition.model';
|
||||
import { RequestService } from '../data/request.service';
|
||||
@@ -13,6 +12,7 @@ import { PaginatedList } from '../data/paginated-list.model';
|
||||
import { FindListOptions } from '../data/find-list-options.model';
|
||||
import { IdentifiableDataService } from '../data/base/identifiable-data.service';
|
||||
import { FindAllData, FindAllDataImpl } from '../data/base/find-all-data';
|
||||
import { dataService } from '../data/base/data-service.decorator';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
|
@@ -1,23 +1,7 @@
|
||||
/* eslint-disable max-classes-per-file */
|
||||
import { HALLink } from '../../shared/hal-link.model';
|
||||
import { HALResource } from '../../shared/hal-resource.model';
|
||||
import { ResourceType } from '../../shared/resource-type';
|
||||
import { dataService, getDataServiceFor, getLinkDefinition, link } from './build-decorators';
|
||||
import { HALDataService } from '../../data/base/hal-data-service.interface';
|
||||
import { BaseDataService } from '../../data/base/base-data.service';
|
||||
|
||||
class TestService extends BaseDataService<any> {
|
||||
}
|
||||
|
||||
class AnotherTestService implements HALDataService<any> {
|
||||
public findAllByHref(href$, findListOptions, useCachedVersionIfAvailable, reRequestOnStale, ...linksToFollow): any {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
public findByHref(href$, useCachedVersionIfAvailable, reRequestOnStale, ...linksToFollow): any {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
import { getLinkDefinition, link } from './build-decorators';
|
||||
|
||||
class TestHALResource implements HALResource {
|
||||
_links: {
|
||||
@@ -34,31 +18,6 @@ describe('build decorators', () => {
|
||||
beforeEach(() => {
|
||||
testType = new ResourceType('testType-' + new Date().getTime());
|
||||
});
|
||||
describe('@dataService/getDataServiceFor', () => {
|
||||
|
||||
it('should register a resourcetype for a dataservice', () => {
|
||||
dataService(testType)(TestService);
|
||||
expect(getDataServiceFor(testType)).toBe(TestService);
|
||||
});
|
||||
|
||||
describe(`when the resource type isn't specified`, () => {
|
||||
it(`should throw an error`, () => {
|
||||
expect(() => {
|
||||
dataService(undefined)(TestService);
|
||||
}).toThrow();
|
||||
});
|
||||
});
|
||||
|
||||
describe(`when there already is a registered dataservice for a resourcetype`, () => {
|
||||
it(`should throw an error`, () => {
|
||||
dataService(testType)(TestService);
|
||||
expect(() => {
|
||||
dataService(testType)(AnotherTestService);
|
||||
}).toThrow();
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe(`@link/getLinkDefinitions`, () => {
|
||||
it(`should register a link`, () => {
|
||||
|
39
src/app/core/cache/builders/build-decorators.ts
vendored
39
src/app/core/cache/builders/build-decorators.ts
vendored
@@ -5,14 +5,8 @@ import { HALResource } from '../../shared/hal-resource.model';
|
||||
import { ResourceType } from '../../shared/resource-type';
|
||||
import { getResourceTypeValueFor } from '../object-cache.reducer';
|
||||
import { InjectionToken } from '@angular/core';
|
||||
import { CacheableObject } from '../cacheable-object.model';
|
||||
import { TypedObject } from '../typed-object.model';
|
||||
import { HALDataService } from '../../data/base/hal-data-service.interface';
|
||||
|
||||
export const DATA_SERVICE_FACTORY = new InjectionToken<(resourceType: ResourceType) => GenericConstructor<HALDataService<any>>>('getDataServiceFor', {
|
||||
providedIn: 'root',
|
||||
factory: () => getDataServiceFor,
|
||||
});
|
||||
export const LINK_DEFINITION_FACTORY = new InjectionToken<<T extends HALResource>(source: GenericConstructor<T>, linkName: keyof T['_links']) => LinkDefinition<T>>('getLinkDefinition', {
|
||||
providedIn: 'root',
|
||||
factory: () => getLinkDefinition,
|
||||
@@ -26,7 +20,6 @@ const resolvedLinkKey = Symbol('resolvedLink');
|
||||
|
||||
const resolvedLinkMap = new Map();
|
||||
const typeMap = new Map();
|
||||
const dataServiceMap = new Map();
|
||||
const linkMap = new Map();
|
||||
|
||||
/**
|
||||
@@ -45,38 +38,6 @@ export function getClassForType(type: string | ResourceType) {
|
||||
return typeMap.get(getResourceTypeValueFor(type));
|
||||
}
|
||||
|
||||
/**
|
||||
* A class decorator to indicate that this class is a data service for a given HAL resource type.
|
||||
*
|
||||
* In most cases, a data service should extend {@link BaseDataService}.
|
||||
* At the very least it must implement {@link HALDataService} in order for it to work with {@link LinkService}.
|
||||
*
|
||||
* @param resourceType the resource type the class is a dataservice for
|
||||
*/
|
||||
export function dataService(resourceType: ResourceType) {
|
||||
return (target: GenericConstructor<HALDataService<any>>): void => {
|
||||
if (hasNoValue(resourceType)) {
|
||||
throw new Error(`Invalid @dataService annotation on ${target}, resourceType needs to be defined`);
|
||||
}
|
||||
const existingDataservice = dataServiceMap.get(resourceType.value);
|
||||
|
||||
if (hasValue(existingDataservice)) {
|
||||
throw new Error(`Multiple dataservices for ${resourceType.value}: ${existingDataservice} and ${target}`);
|
||||
}
|
||||
|
||||
dataServiceMap.set(resourceType.value, target);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the dataservice matching the given resource type
|
||||
*
|
||||
* @param resourceType the resource type you want the matching dataservice for
|
||||
*/
|
||||
export function getDataServiceFor<T extends CacheableObject>(resourceType: ResourceType): GenericConstructor<HALDataService<any>> {
|
||||
return dataServiceMap.get(resourceType.value);
|
||||
}
|
||||
|
||||
/**
|
||||
* A class to represent the data that can be set by the @link decorator
|
||||
*/
|
||||
|
@@ -6,9 +6,10 @@ import { HALLink } from '../../shared/hal-link.model';
|
||||
import { HALResource } from '../../shared/hal-resource.model';
|
||||
import { ResourceType } from '../../shared/resource-type';
|
||||
import { LinkService } from './link.service';
|
||||
import { DATA_SERVICE_FACTORY, LINK_DEFINITION_FACTORY, LINK_DEFINITION_MAP_FACTORY } from './build-decorators';
|
||||
import { LINK_DEFINITION_FACTORY, LINK_DEFINITION_MAP_FACTORY } from './build-decorators';
|
||||
import { isEmpty } from 'rxjs/operators';
|
||||
import { FindListOptions } from '../../data/find-list-options.model';
|
||||
import { DATA_SERVICE_FACTORY } from '../../data/base/data-service.decorator';
|
||||
|
||||
const TEST_MODEL = new ResourceType('testmodel');
|
||||
let result: any;
|
||||
|
2
src/app/core/cache/builders/link.service.ts
vendored
2
src/app/core/cache/builders/link.service.ts
vendored
@@ -3,8 +3,8 @@ import { hasNoValue, hasValue, isNotEmpty } from '../../../shared/empty.util';
|
||||
import { FollowLinkConfig } from '../../../shared/utils/follow-link-config.model';
|
||||
import { GenericConstructor } from '../../shared/generic-constructor';
|
||||
import { HALResource } from '../../shared/hal-resource.model';
|
||||
import { DATA_SERVICE_FACTORY } from '../../data/base/data-service.decorator';
|
||||
import {
|
||||
DATA_SERVICE_FACTORY,
|
||||
LINK_DEFINITION_FACTORY,
|
||||
LINK_DEFINITION_MAP_FACTORY,
|
||||
LinkDefinition,
|
||||
|
@@ -3,7 +3,6 @@ import { ConfigService } from './config.service';
|
||||
import { RequestService } from '../data/request.service';
|
||||
import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { SUBMISSION_ACCESSES_TYPE } from './models/config-type';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { Store } from '@ngrx/store';
|
||||
@@ -16,6 +15,7 @@ import { RemoteData } from '../data/remote-data';
|
||||
import { Observable } from 'rxjs';
|
||||
import { FollowLinkConfig } from '../../shared/utils/follow-link-config.model';
|
||||
import { CoreState } from '../core-state.model';
|
||||
import { dataService } from '../data/base/data-service.decorator';
|
||||
|
||||
/**
|
||||
* Provides methods to retrieve, from REST server, bitstream access conditions configurations applicable during the submission process.
|
||||
|
@@ -6,12 +6,12 @@ import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { ConfigObject } from './models/config.model';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { SUBMISSION_FORMS_TYPE } from './models/config-type';
|
||||
import { SubmissionFormsModel } from './models/config-submission-forms.model';
|
||||
import { RemoteData } from '../data/remote-data';
|
||||
import { Observable } from 'rxjs';
|
||||
import { FollowLinkConfig } from '../../shared/utils/follow-link-config.model';
|
||||
import { dataService } from '../data/base/data-service.decorator';
|
||||
|
||||
@Injectable()
|
||||
@dataService(SUBMISSION_FORMS_TYPE)
|
||||
|
@@ -3,7 +3,6 @@ import { ConfigService } from './config.service';
|
||||
import { RequestService } from '../data/request.service';
|
||||
import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { SUBMISSION_UPLOADS_TYPE } from './models/config-type';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { ConfigObject } from './models/config.model';
|
||||
@@ -11,6 +10,7 @@ import { SubmissionUploadsModel } from './models/config-submission-uploads.model
|
||||
import { RemoteData } from '../data/remote-data';
|
||||
import { Observable } from 'rxjs';
|
||||
import { FollowLinkConfig } from '../../shared/utils/follow-link-config.model';
|
||||
import { dataService } from '../data/base/data-service.decorator';
|
||||
|
||||
/**
|
||||
* Provides methods to retrieve, from REST server, bitstream access conditions configurations applicable during the submission process.
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
@@ -10,6 +9,7 @@ import { Observable } from 'rxjs';
|
||||
import { RemoteData } from './remote-data';
|
||||
import { Item } from '../shared/item.model';
|
||||
import { BaseDataService } from './base/base-data.service';
|
||||
import { dataService } from './base/data-service.decorator';
|
||||
|
||||
@Injectable()
|
||||
@dataService(ACCESS_STATUS)
|
||||
|
55
src/app/core/data/base/data-service.decorator.spec.ts
Normal file
55
src/app/core/data/base/data-service.decorator.spec.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
/* eslint-disable max-classes-per-file */
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
import { ResourceType } from '../../shared/resource-type';
|
||||
import { BaseDataService } from './base-data.service';
|
||||
import { HALDataService } from './hal-data-service.interface';
|
||||
import { dataService, getDataServiceFor } from './data-service.decorator';
|
||||
|
||||
class TestService extends BaseDataService<any> {
|
||||
}
|
||||
|
||||
class AnotherTestService implements HALDataService<any> {
|
||||
public findListByHref(href$, findListOptions, useCachedVersionIfAvailable, reRequestOnStale, ...linksToFollow): any {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
public findByHref(href$, useCachedVersionIfAvailable, reRequestOnStale, ...linksToFollow): any {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
let testType;
|
||||
|
||||
describe('@dataService/getDataServiceFor', () => {
|
||||
beforeEach(() => {
|
||||
testType = new ResourceType('testType-' + new Date().getTime());
|
||||
});
|
||||
|
||||
it('should register a resourcetype for a dataservice', () => {
|
||||
dataService(testType)(TestService);
|
||||
expect(getDataServiceFor(testType)).toBe(TestService);
|
||||
});
|
||||
|
||||
describe(`when the resource type isn't specified`, () => {
|
||||
it(`should throw an error`, () => {
|
||||
expect(() => {
|
||||
dataService(undefined)(TestService);
|
||||
}).toThrow();
|
||||
});
|
||||
});
|
||||
|
||||
describe(`when there already is a registered dataservice for a resourcetype`, () => {
|
||||
it(`should throw an error`, () => {
|
||||
dataService(testType)(TestService);
|
||||
expect(() => {
|
||||
dataService(testType)(AnotherTestService);
|
||||
}).toThrow();
|
||||
});
|
||||
});
|
||||
});
|
51
src/app/core/data/base/data-service.decorator.ts
Normal file
51
src/app/core/data/base/data-service.decorator.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
import { InjectionToken } from '@angular/core';
|
||||
import { CacheableObject } from '../../cache/cacheable-object.model';
|
||||
import { ResourceType } from '../../shared/resource-type';
|
||||
import { GenericConstructor } from '../../shared/generic-constructor';
|
||||
import { hasNoValue, hasValue } from '../../../shared/empty.util';
|
||||
import { HALDataService } from './hal-data-service.interface';
|
||||
|
||||
export const DATA_SERVICE_FACTORY = new InjectionToken<(resourceType: ResourceType) => GenericConstructor<HALDataService<any>>>('getDataServiceFor', {
|
||||
providedIn: 'root',
|
||||
factory: () => getDataServiceFor,
|
||||
});
|
||||
const dataServiceMap = new Map();
|
||||
|
||||
/**
|
||||
* A class decorator to indicate that this class is a data service for a given HAL resource type.
|
||||
*
|
||||
* In most cases, a data service should extend {@link BaseDataService}.
|
||||
* At the very least it must implement {@link HALDataService} in order for it to work with {@link LinkService}.
|
||||
*
|
||||
* @param resourceType the resource type the class is a dataservice for
|
||||
*/
|
||||
export function dataService(resourceType: ResourceType) {
|
||||
return (target: GenericConstructor<HALDataService<any>>): void => {
|
||||
if (hasNoValue(resourceType)) {
|
||||
throw new Error(`Invalid @dataService annotation on ${target}, resourceType needs to be defined`);
|
||||
}
|
||||
const existingDataservice = dataServiceMap.get(resourceType.value);
|
||||
|
||||
if (hasValue(existingDataservice)) {
|
||||
throw new Error(`Multiple dataservices for ${resourceType.value}: ${existingDataservice} and ${target}`);
|
||||
}
|
||||
|
||||
dataServiceMap.set(resourceType.value, target);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the dataservice matching the given resource type
|
||||
*
|
||||
* @param resourceType the resource type you want the matching dataservice for
|
||||
*/
|
||||
export function getDataServiceFor<T extends CacheableObject>(resourceType: ResourceType): GenericConstructor<HALDataService<any>> {
|
||||
return dataServiceMap.get(resourceType.value);
|
||||
}
|
@@ -4,7 +4,6 @@ import { combineLatest as observableCombineLatest, Observable } from 'rxjs';
|
||||
import { map, switchMap, take } from 'rxjs/operators';
|
||||
import { hasValue } from '../../shared/empty.util';
|
||||
import { FollowLinkConfig } from '../../shared/utils/follow-link-config.model';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { Bitstream } from '../shared/bitstream.model';
|
||||
@@ -33,6 +32,7 @@ import { DeleteData, DeleteDataImpl } from './base/delete-data';
|
||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||
import { NoContent } from '../shared/NoContent.model';
|
||||
import { IdentifiableDataService } from './base/identifiable-data.service';
|
||||
import { dataService } from './base/data-service.decorator';
|
||||
|
||||
/**
|
||||
* A service to retrieve {@link Bitstream}s from the REST API
|
||||
|
@@ -5,7 +5,6 @@ import { distinctUntilChanged, map, tap } from 'rxjs/operators';
|
||||
import { BitstreamFormatsRegistryDeselectAction, BitstreamFormatsRegistryDeselectAllAction, BitstreamFormatsRegistrySelectAction } from '../../admin/admin-registries/bitstream-formats/bitstream-format.actions';
|
||||
import { BitstreamFormatRegistryState } from '../../admin/admin-registries/bitstream-formats/bitstream-format.reducers';
|
||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { coreSelector } from '../core.selectors';
|
||||
@@ -25,6 +24,7 @@ import { FollowLinkConfig } from 'src/app/shared/utils/follow-link-config.model'
|
||||
import { FindListOptions } from './find-list-options.model';
|
||||
import { PaginatedList } from './paginated-list.model';
|
||||
import { NoContent } from '../shared/NoContent.model';
|
||||
import { dataService } from './base/data-service.decorator';
|
||||
|
||||
const bitstreamFormatsStateSelector = createSelector(
|
||||
coreSelector,
|
||||
|
@@ -3,7 +3,6 @@ import { Observable } from 'rxjs';
|
||||
import { map, switchMap, take } from 'rxjs/operators';
|
||||
import { hasValue } from '../../shared/empty.util';
|
||||
import { FollowLinkConfig } from '../../shared/utils/follow-link-config.model';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { Bundle } from '../shared/bundle.model';
|
||||
@@ -23,6 +22,7 @@ import { PatchData, PatchDataImpl } from './base/patch-data';
|
||||
import { DSOChangeAnalyzer } from './dso-change-analyzer.service';
|
||||
import { RestRequestMethod } from './rest-request-method';
|
||||
import { Operation } from 'fast-json-patch';
|
||||
import { dataService } from './base/data-service.decorator';
|
||||
|
||||
/**
|
||||
* A service to retrieve {@link Bundle}s from the REST API
|
||||
|
@@ -8,7 +8,6 @@ import { NotificationOptions } from '../../shared/notifications/models/notificat
|
||||
import { INotification } from '../../shared/notifications/models/notification.model';
|
||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||
import { FollowLinkConfig } from '../../shared/utils/follow-link-config.model';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { RequestParam } from '../cache/models/request-param.model';
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
@@ -34,6 +33,7 @@ import { BitstreamDataService } from './bitstream-data.service';
|
||||
import { RestRequest } from './rest-request.model';
|
||||
import { FindListOptions } from './find-list-options.model';
|
||||
import { Community } from '../shared/community.model';
|
||||
import { dataService } from './base/data-service.decorator';
|
||||
|
||||
@Injectable()
|
||||
@dataService(COLLECTION)
|
||||
|
@@ -3,7 +3,6 @@ import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { filter, map, switchMap, take } from 'rxjs/operators';
|
||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { Community } from '../shared/community.model';
|
||||
@@ -18,6 +17,7 @@ import { BitstreamDataService } from './bitstream-data.service';
|
||||
import { FollowLinkConfig } from '../../shared/utils/follow-link-config.model';
|
||||
import { isNotEmpty } from '../../shared/empty.util';
|
||||
import { FindListOptions } from './find-list-options.model';
|
||||
import { dataService } from './base/data-service.decorator';
|
||||
|
||||
@Injectable()
|
||||
@dataService(COMMUNITY)
|
||||
|
@@ -1,7 +1,6 @@
|
||||
/* eslint-disable max-classes-per-file */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
@@ -10,6 +9,7 @@ import { RequestService } from './request.service';
|
||||
import { ConfigurationProperty } from '../shared/configuration-property.model';
|
||||
import { CONFIG_PROPERTY } from '../shared/config-property.resource-type';
|
||||
import { IdentifiableDataService } from './base/identifiable-data.service';
|
||||
import { dataService } from './base/data-service.decorator';
|
||||
|
||||
@Injectable()
|
||||
@dataService(CONFIG_PROPERTY)
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { DSpaceObject } from '../shared/dspace-object.model';
|
||||
@@ -7,6 +6,7 @@ import { DSPACE_OBJECT } from '../shared/dspace-object.resource-type';
|
||||
import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
import { RequestService } from './request.service';
|
||||
import { IdentifiableDataService } from './base/identifiable-data.service';
|
||||
import { dataService } from './base/data-service.decorator';
|
||||
|
||||
@Injectable()
|
||||
@dataService(DSPACE_OBJECT)
|
||||
|
@@ -1,7 +1,6 @@
|
||||
import { Observable, of as observableOf } from 'rxjs';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { AUTHORIZATION } from '../../shared/authorization.resource-type';
|
||||
import { dataService } from '../../cache/builders/build-decorators';
|
||||
import { Authorization } from '../../shared/authorization.model';
|
||||
import { RequestService } from '../request.service';
|
||||
import { RemoteDataBuildService } from '../../cache/builders/remote-data-build.service';
|
||||
@@ -21,6 +20,7 @@ import { getFirstCompletedRemoteData } from '../../shared/operators';
|
||||
import { FindListOptions } from '../find-list-options.model';
|
||||
import { BaseDataService } from '../base/base-data.service';
|
||||
import { SearchData, SearchDataImpl } from '../base/search-data';
|
||||
import { dataService } from '../base/data-service.decorator';
|
||||
|
||||
/**
|
||||
* A service to retrieve {@link Authorization}s from the REST API
|
||||
|
@@ -1,12 +1,12 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { FEATURE } from '../../shared/feature.resource-type';
|
||||
import { dataService } from '../../cache/builders/build-decorators';
|
||||
import { Feature } from '../../shared/feature.model';
|
||||
import { RequestService } from '../request.service';
|
||||
import { RemoteDataBuildService } from '../../cache/builders/remote-data-build.service';
|
||||
import { ObjectCacheService } from '../../cache/object-cache.service';
|
||||
import { HALEndpointService } from '../../shared/hal-endpoint.service';
|
||||
import { BaseDataService } from '../base/base-data.service';
|
||||
import { dataService } from '../base/data-service.decorator';
|
||||
|
||||
/**
|
||||
* A service to retrieve {@link Feature}s from the REST API
|
||||
|
@@ -5,7 +5,6 @@ import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { VOCABULARY_ENTRY } from '../submission/vocabularies/models/vocabularies.resource-type';
|
||||
import { FollowLinkConfig } from '../../shared/utils/follow-link-config.model';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { RemoteData } from './remote-data';
|
||||
import { Observable } from 'rxjs';
|
||||
import { PaginatedList } from './paginated-list.model';
|
||||
@@ -15,6 +14,7 @@ import { CacheableObject } from '../cache/cacheable-object.model';
|
||||
import { FindListOptions } from './find-list-options.model';
|
||||
import { BaseDataService } from './base/base-data.service';
|
||||
import { HALDataService } from './base/hal-data-service.interface';
|
||||
import { dataService } from './base/data-service.decorator';
|
||||
|
||||
/**
|
||||
* A DataService with only findByHref methods. Its purpose is to be used for resources that don't
|
||||
|
@@ -13,7 +13,6 @@ import { distinctUntilChanged, filter, find, map, switchMap, take } from 'rxjs/o
|
||||
import { hasValue, isNotEmpty, isNotEmptyOperator } from '../../shared/empty.util';
|
||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||
import { BrowseService } from '../browse/browse.service';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { HttpOptions } from '../dspace-rest/dspace-rest.service';
|
||||
@@ -46,6 +45,7 @@ import { DeleteData, DeleteDataImpl } from './base/delete-data';
|
||||
import { RestRequestMethod } from './rest-request-method';
|
||||
import { CreateData, CreateDataImpl } from './base/create-data';
|
||||
import { RequestParam } from '../cache/models/request-param.model';
|
||||
import { dataService } from './base/data-service.decorator';
|
||||
|
||||
/**
|
||||
* An abstract service for CRUD operations on Items
|
||||
|
@@ -1,6 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { hasValue } from '../../shared/empty.util';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { PaginatedList } from './paginated-list.model';
|
||||
import { RemoteData } from './remote-data';
|
||||
import { RequestService } from './request.service';
|
||||
@@ -22,6 +21,7 @@ import { NotificationsService } from '../../shared/notifications/notifications.s
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { DeleteData, DeleteDataImpl } from './base/delete-data';
|
||||
import { IdentifiableDataService } from './base/identifiable-data.service';
|
||||
import { dataService } from './base/data-service.decorator';
|
||||
|
||||
/**
|
||||
* A service responsible for fetching/sending data from/to the REST API on the metadatafields endpoint
|
||||
|
@@ -1,6 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { MetadataSchema } from '../metadata/metadata-schema.model';
|
||||
@@ -20,6 +19,7 @@ import { FollowLinkConfig } from '../../shared/utils/follow-link-config.model';
|
||||
import { PaginatedList } from './paginated-list.model';
|
||||
import { IdentifiableDataService } from './base/identifiable-data.service';
|
||||
import { DeleteData, DeleteDataImpl } from './base/delete-data';
|
||||
import { dataService } from './base/data-service.decorator';
|
||||
|
||||
/**
|
||||
* A service responsible for fetching/sending data from/to the REST API on the metadataschemas endpoint
|
||||
|
@@ -4,7 +4,6 @@ import { RemoteDataBuildService } from '../../cache/builders/remote-data-build.s
|
||||
import { ObjectCacheService } from '../../cache/object-cache.service';
|
||||
import { HALEndpointService } from '../../shared/hal-endpoint.service';
|
||||
import { Process } from '../../../process-page/processes/process.model';
|
||||
import { dataService } from '../../cache/builders/build-decorators';
|
||||
import { PROCESS } from '../../../process-page/processes/process.resource-type';
|
||||
import { Observable } from 'rxjs';
|
||||
import { switchMap } from 'rxjs/operators';
|
||||
@@ -16,6 +15,7 @@ import { IdentifiableDataService } from '../base/identifiable-data.service';
|
||||
import { FollowLinkConfig } from '../../../shared/utils/follow-link-config.model';
|
||||
import { FindAllData, FindAllDataImpl } from '../base/find-all-data';
|
||||
import { FindListOptions } from '../find-list-options.model';
|
||||
import { dataService } from '../base/data-service.decorator';
|
||||
|
||||
@Injectable()
|
||||
@dataService(PROCESS)
|
||||
|
@@ -10,7 +10,6 @@ import { RemoteData } from '../remote-data';
|
||||
import { MultipartPostRequest } from '../request.models';
|
||||
import { RequestService } from '../request.service';
|
||||
import { Observable } from 'rxjs';
|
||||
import { dataService } from '../../cache/builders/build-decorators';
|
||||
import { SCRIPT } from '../../../process-page/scripts/script.resource-type';
|
||||
import { Process } from '../../../process-page/processes/process.model';
|
||||
import { hasValue } from '../../../shared/empty.util';
|
||||
@@ -21,6 +20,7 @@ import { FindAllData, FindAllDataImpl } from '../base/find-all-data';
|
||||
import { FindListOptions } from '../find-list-options.model';
|
||||
import { FollowLinkConfig } from '../../../shared/utils/follow-link-config.model';
|
||||
import { PaginatedList } from '../paginated-list.model';
|
||||
import { dataService } from '../base/data-service.decorator';
|
||||
|
||||
export const METADATA_IMPORT_SCRIPT_NAME = 'metadata-import';
|
||||
export const METADATA_EXPORT_SCRIPT_NAME = 'metadata-export';
|
||||
|
@@ -3,7 +3,6 @@ import { combineLatest as observableCombineLatest, Observable } from 'rxjs';
|
||||
import { map, mergeMap, switchMap, toArray } from 'rxjs/operators';
|
||||
import { hasValue } from '../../shared/empty.util';
|
||||
import { followLink, FollowLinkConfig } from '../../shared/utils/follow-link-config.model';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
import { ItemType } from '../shared/item-relationships/item-type.model';
|
||||
@@ -17,6 +16,7 @@ import { BaseDataService } from './base/base-data.service';
|
||||
import { FindAllDataImpl } from './base/find-all-data';
|
||||
import { SearchDataImpl } from './base/search-data';
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { dataService } from './base/data-service.decorator';
|
||||
|
||||
/**
|
||||
* Check if one side of a RelationshipType is the ItemType with the given label
|
||||
|
@@ -16,7 +16,6 @@ import {
|
||||
} from '../../shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/name-variant.actions';
|
||||
import { NameVariantListState } from '../../shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/name-variant.reducer';
|
||||
import { followLink, FollowLinkConfig } from '../../shared/utils/follow-link-config.model';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { RequestParam } from '../cache/models/request-param.model';
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
@@ -45,6 +44,7 @@ import { FindListOptions } from './find-list-options.model';
|
||||
import { SearchData, SearchDataImpl } from './base/search-data';
|
||||
import { PutData, PutDataImpl } from './base/put-data';
|
||||
import { IdentifiableDataService } from './base/identifiable-data.service';
|
||||
import { dataService } from './base/data-service.decorator';
|
||||
|
||||
const relationshipListsStateSelector = (state: AppState) => state.relationshipLists;
|
||||
|
||||
|
@@ -1,7 +1,6 @@
|
||||
import { Root } from './root.model';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ROOT } from './root.resource-type';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { RequestService } from './request.service';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
@@ -13,6 +12,7 @@ import { RawRestResponse } from '../dspace-rest/raw-rest-response.model';
|
||||
import { catchError, map } from 'rxjs/operators';
|
||||
import { BaseDataService } from './base/base-data.service';
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { dataService } from './base/data-service.decorator';
|
||||
|
||||
/**
|
||||
* A service to retrieve the {@link Root} object from the REST API.
|
||||
|
@@ -1,7 +1,6 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
import { getFirstSucceededRemoteData } from '../shared/operators';
|
||||
@@ -15,6 +14,7 @@ import { FindAllData, FindAllDataImpl } from './base/find-all-data';
|
||||
import { FollowLinkConfig } from 'src/app/shared/utils/follow-link-config.model';
|
||||
import { FindListOptions } from './find-list-options.model';
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { dataService } from './base/data-service.decorator';
|
||||
|
||||
/**
|
||||
* Service responsible for handling requests related to the Site object
|
||||
|
@@ -5,7 +5,6 @@ import { RemoteDataBuildService } from '../cache/builders/remote-data-build.serv
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
import { EMPTY, Observable } from 'rxjs';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { VERSION } from '../shared/version.resource-type';
|
||||
import { VersionHistory } from '../shared/version-history.model';
|
||||
import { followLink } from '../../shared/utils/follow-link-config.model';
|
||||
@@ -17,6 +16,7 @@ import { PatchData, PatchDataImpl } from './base/patch-data';
|
||||
import { RestRequestMethod } from './rest-request-method';
|
||||
import { DefaultChangeAnalyzer } from './default-change-analyzer.service';
|
||||
import { IdentifiableDataService } from './base/identifiable-data.service';
|
||||
import { dataService } from './base/data-service.decorator';
|
||||
|
||||
/**
|
||||
* Service responsible for handling requests related to the Version object
|
||||
|
@@ -12,7 +12,6 @@ import { RemoteData } from './remote-data';
|
||||
import { PaginatedList } from './paginated-list.model';
|
||||
import { Version } from '../shared/version.model';
|
||||
import { filter, map, switchMap, take } from 'rxjs/operators';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { VERSION_HISTORY } from '../shared/version-history.resource-type';
|
||||
import { followLink, FollowLinkConfig } from '../../shared/utils/follow-link-config.model';
|
||||
import { VersionDataService } from './version-data.service';
|
||||
@@ -25,6 +24,7 @@ import { FindListOptions } from './find-list-options.model';
|
||||
import { sendRequest } from '../shared/request.operators';
|
||||
import { RestRequest } from './rest-request.model';
|
||||
import { IdentifiableDataService } from './base/identifiable-data.service';
|
||||
import { dataService } from './base/data-service.decorator';
|
||||
|
||||
/**
|
||||
* Service responsible for handling requests related to the VersionHistory object
|
||||
|
@@ -4,9 +4,9 @@ import { RemoteDataBuildService } from '../cache/builders/remote-data-build.serv
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { WORKFLOW_ACTION } from '../tasks/models/workflow-action-object.resource-type';
|
||||
import { BaseDataService } from './base/base-data.service';
|
||||
import { dataService } from './base/data-service.decorator';
|
||||
|
||||
/**
|
||||
* A service responsible for fetching/sending data from/to the REST API on the workflowactions endpoint
|
||||
|
@@ -9,7 +9,6 @@ import { AppState } from '../../app.reducer';
|
||||
import { hasNoValue, hasValue } from '../../shared/empty.util';
|
||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||
import { FollowLinkConfig } from '../../shared/utils/follow-link-config.model';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { RequestParam } from '../cache/models/request-param.model';
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
@@ -31,6 +30,7 @@ import { SearchData, SearchDataImpl } from '../data/base/search-data';
|
||||
import { PatchData, PatchDataImpl } from '../data/base/patch-data';
|
||||
import { DeleteData, DeleteDataImpl } from '../data/base/delete-data';
|
||||
import { RestRequestMethod } from '../data/rest-request-method';
|
||||
import { dataService } from '../data/base/data-service.decorator';
|
||||
|
||||
const ePeopleRegistryStateSelector = (state: AppState) => state.epeopleRegistry;
|
||||
const editEPersonSelector = createSelector(ePeopleRegistryStateSelector, (ePeopleRegistryState: EPeopleRegistryState) => ePeopleRegistryState.editEPerson);
|
||||
|
@@ -26,7 +26,6 @@ import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
import { getFirstCompletedRemoteData } from '../shared/operators';
|
||||
import { EPerson } from './models/eperson.model';
|
||||
import { Group } from './models/group.model';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { GROUP } from './models/group.resource-type';
|
||||
import { DSONameService } from '../breadcrumbs/dso-name.service';
|
||||
import { Community } from '../shared/community.model';
|
||||
@@ -40,6 +39,7 @@ import { PatchData, PatchDataImpl } from '../data/base/patch-data';
|
||||
import { DeleteData, DeleteDataImpl } from '../data/base/delete-data';
|
||||
import { Operation } from 'fast-json-patch';
|
||||
import { RestRequestMethod } from '../data/rest-request-method';
|
||||
import { dataService } from '../data/base/data-service.decorator';
|
||||
|
||||
const groupRegistryStateSelector = (state: AppState) => state.groupRegistry;
|
||||
const editGroupSelector = createSelector(groupRegistryStateSelector, (groupRegistryState: GroupRegistryState) => groupRegistryState.editGroup);
|
||||
|
@@ -2,7 +2,6 @@ import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Feedback } from './models/feedback.model';
|
||||
import { FEEDBACK } from './models/feedback.resource-type';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { RequestService } from '../data/request.service';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { Store } from '@ngrx/store';
|
||||
@@ -14,6 +13,7 @@ import { IdentifiableDataService } from '../data/base/identifiable-data.service'
|
||||
import { RemoteData } from '../data/remote-data';
|
||||
import { RequestParam } from '../cache/models/request-param.model';
|
||||
import { CreateData, CreateDataImpl } from '../data/base/create-data';
|
||||
import { dataService } from '../data/base/data-service.decorator';
|
||||
|
||||
/**
|
||||
* Service for checking and managing the feedback
|
||||
|
@@ -2,7 +2,6 @@ import { HttpHeaders } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { map, switchMap } from 'rxjs/operators';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { RemoteData } from '../data/remote-data';
|
||||
@@ -16,6 +15,7 @@ import { HttpOptions } from '../dspace-rest/dspace-rest.service';
|
||||
import { RestRequest } from '../data/rest-request.model';
|
||||
import { sendRequest } from '../shared/request.operators';
|
||||
import { IdentifiableDataService } from '../data/base/identifiable-data.service';
|
||||
import { dataService } from '../data/base/data-service.decorator';
|
||||
|
||||
/**
|
||||
* A service that provides methods to make REST requests with Orcid History endpoint.
|
||||
|
@@ -5,7 +5,6 @@ import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { ORCID_QUEUE } from './model/orcid-queue.resource-type';
|
||||
import { Observable } from 'rxjs';
|
||||
import { RemoteData } from '../data/remote-data';
|
||||
@@ -16,6 +15,7 @@ import { NoContent } from '../shared/NoContent.model';
|
||||
import { DeleteData, DeleteDataImpl } from '../data/base/delete-data';
|
||||
import { SearchData, SearchDataImpl } from '../data/base/search-data';
|
||||
import { IdentifiableDataService } from '../data/base/identifiable-data.service';
|
||||
import { dataService } from '../data/base/data-service.decorator';
|
||||
|
||||
/**
|
||||
* A service that provides methods to make REST requests with Orcid Queue endpoint.
|
||||
|
@@ -6,7 +6,6 @@ import { Operation, ReplaceOperation } from 'fast-json-patch';
|
||||
import { Observable } from 'rxjs';
|
||||
import { find, map } from 'rxjs/operators';
|
||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { DefaultChangeAnalyzer } from '../data/default-change-analyzer.service';
|
||||
@@ -33,6 +32,7 @@ import { RestRequestMethod } from '../data/rest-request-method';
|
||||
import { RequestParam } from '../cache/models/request-param.model';
|
||||
import { FindListOptions } from '../data/find-list-options.model';
|
||||
import { PaginatedList } from '../data/paginated-list.model';
|
||||
import { dataService } from '../data/base/data-service.decorator';
|
||||
|
||||
/**
|
||||
* A service that provides methods to make REST requests with researcher profile endpoint.
|
||||
|
@@ -2,7 +2,6 @@ import { Injectable } from '@angular/core';
|
||||
import { HttpHeaders } from '@angular/common/http';
|
||||
import { Observable } from 'rxjs';
|
||||
import { FollowLinkConfig } from '../../shared/utils/follow-link-config.model';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { RequestService } from '../data/request.service';
|
||||
import { Collection } from '../shared/collection.model';
|
||||
import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
@@ -34,6 +33,7 @@ import { CreateDataImpl } from '../data/base/create-data';
|
||||
import { SearchDataImpl } from '../data/base/search-data';
|
||||
import { PatchDataImpl } from '../data/base/patch-data';
|
||||
import { DeleteDataImpl } from '../data/base/delete-data';
|
||||
import { dataService } from '../data/base/data-service.decorator';
|
||||
|
||||
/**
|
||||
* A service responsible for fetching/sending data from/to the REST API on the resourcepolicies endpoint
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
@@ -15,6 +14,7 @@ import { FindListOptions } from '../data/find-list-options.model';
|
||||
import { FollowLinkConfig } from '../../shared/utils/follow-link-config.model';
|
||||
import { RemoteData } from '../data/remote-data';
|
||||
import { PaginatedList } from '../data/paginated-list.model';
|
||||
import { dataService } from '../data/base/data-service.decorator';
|
||||
|
||||
/**
|
||||
* A service to retrieve {@link UsageReport}s from the REST API
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
@@ -13,6 +12,7 @@ import { FollowLinkConfig } from '../../shared/utils/follow-link-config.model';
|
||||
import { Observable } from 'rxjs';
|
||||
import { RemoteData } from '../data/remote-data';
|
||||
import { PaginatedList } from '../data/paginated-list.model';
|
||||
import { dataService } from '../data/base/data-service.decorator';
|
||||
|
||||
@Injectable()
|
||||
@dataService(SUBMISSION_CC_LICENSE)
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
@@ -16,6 +15,7 @@ import { FindListOptions } from '../data/find-list-options.model';
|
||||
import { FollowLinkConfig } from '../../shared/utils/follow-link-config.model';
|
||||
import { RemoteData } from '../data/remote-data';
|
||||
import { PaginatedList } from '../data/paginated-list.model';
|
||||
import { dataService } from '../data/base/data-service.decorator';
|
||||
|
||||
@Injectable()
|
||||
@dataService(SUBMISSION_CC_LICENSE_URL)
|
||||
|
@@ -19,8 +19,8 @@ import { RemoteData } from '../../data/remote-data';
|
||||
import { PaginatedList } from '../../data/paginated-list.model';
|
||||
import { SearchData, SearchDataImpl } from '../../data/base/search-data';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { dataService } from '../../cache/builders/build-decorators';
|
||||
import { VOCABULARY_ENTRY_DETAIL } from './models/vocabularies.resource-type';
|
||||
import { dataService } from '../../data/base/data-service.decorator';
|
||||
|
||||
@Injectable()
|
||||
@dataService(VOCABULARY_ENTRY_DETAIL)
|
||||
|
@@ -18,8 +18,8 @@ import { Observable } from 'rxjs';
|
||||
import { RemoteData } from '../../data/remote-data';
|
||||
import { PaginatedList } from '../../data/paginated-list.model';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { dataService } from '../../cache/builders/build-decorators';
|
||||
import { VOCABULARY } from './models/vocabularies.resource-type';
|
||||
import { dataService } from '../../data/base/data-service.decorator';
|
||||
|
||||
@Injectable()
|
||||
@dataService(VOCABULARY)
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { RequestService } from '../data/request.service';
|
||||
import { WorkflowItem } from './models/workflowitem.model';
|
||||
@@ -21,6 +20,7 @@ import { IdentifiableDataService } from '../data/base/identifiable-data.service'
|
||||
import { SearchData, SearchDataImpl } from '../data/base/search-data';
|
||||
import { DeleteData, DeleteDataImpl } from '../data/base/delete-data';
|
||||
import { PaginatedList } from '../data/paginated-list.model';
|
||||
import { dataService } from '../data/base/data-service.decorator';
|
||||
|
||||
/**
|
||||
* A service that provides methods to make REST requests with workflow items endpoint.
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { RequestService } from '../data/request.service';
|
||||
import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
@@ -16,6 +15,7 @@ import { SearchData, SearchDataImpl } from '../data/base/search-data';
|
||||
import { PaginatedList } from '../data/paginated-list.model';
|
||||
import { DeleteData, DeleteDataImpl } from '../data/base/delete-data';
|
||||
import { NoContent } from '../shared/NoContent.model';
|
||||
import { dataService } from '../data/base/data-service.decorator';
|
||||
|
||||
/**
|
||||
* A service that provides methods to make REST requests with workspaceitems endpoint.
|
||||
|
@@ -1,7 +1,6 @@
|
||||
import { HttpHeaders } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { RequestService } from '../data/request.service';
|
||||
@@ -15,6 +14,7 @@ import { RequestParam } from '../cache/models/request-param.model';
|
||||
import { HttpOptions } from '../dspace-rest/dspace-rest.service';
|
||||
import { getFirstSucceededRemoteData } from '../shared/operators';
|
||||
import { FindListOptions } from '../data/find-list-options.model';
|
||||
import { dataService } from '../data/base/data-service.decorator';
|
||||
|
||||
/**
|
||||
* The service handling all REST requests for ClaimedTask
|
||||
|
@@ -1,7 +1,6 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
import { dataService } from '../cache/builders/build-decorators';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { RequestService } from '../data/request.service';
|
||||
@@ -13,6 +12,7 @@ import { RemoteData } from '../data/remote-data';
|
||||
import { RequestParam } from '../cache/models/request-param.model';
|
||||
import { getFirstCompletedRemoteData } from '../shared/operators';
|
||||
import { FindListOptions } from '../data/find-list-options.model';
|
||||
import { dataService } from '../data/base/data-service.decorator';
|
||||
|
||||
/**
|
||||
* The service handling all REST requests for PoolTask
|
||||
|
@@ -10,7 +10,6 @@ import { DSpaceObject } from '../../../../core/shared/dspace-object.model';
|
||||
import { PaginationComponentOptions } from '../../../pagination/pagination-component-options.model';
|
||||
import { hasValue, isNotEmpty } from '../../../empty.util';
|
||||
import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service';
|
||||
import { getDataServiceFor } from '../../../../core/cache/builders/build-decorators';
|
||||
import { EPERSON } from '../../../../core/eperson/models/eperson.resource-type';
|
||||
import { GROUP } from '../../../../core/eperson/models/group.resource-type';
|
||||
import { ResourceType } from '../../../../core/shared/resource-type';
|
||||
@@ -20,6 +19,7 @@ import { fadeInOut } from '../../../animations/fade';
|
||||
import { getFirstCompletedRemoteData } from '../../../../core/shared/operators';
|
||||
import { PaginationService } from '../../../../core/pagination/pagination.service';
|
||||
import { FindListOptions } from '../../../../core/data/find-list-options.model';
|
||||
import { getDataServiceFor } from '../../../../core/data/base/data-service.decorator';
|
||||
|
||||
export interface SearchEvent {
|
||||
scope: string;
|
||||
|
@@ -3,13 +3,13 @@ import { ActivatedRouteSnapshot, Resolve, Router, RouterStateSnapshot } from '@a
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { getDataServiceFor } from '../../../core/cache/builders/build-decorators';
|
||||
import { ResourceType } from '../../../core/shared/resource-type';
|
||||
import { DSpaceObject } from '../../../core/shared/dspace-object.model';
|
||||
import { isEmpty } from '../../empty.util';
|
||||
import { RemoteData } from '../../../core/data/remote-data';
|
||||
import { getFirstCompletedRemoteData } from '../../../core/shared/operators';
|
||||
import { IdentifiableDataService } from '../../../core/data/base/identifiable-data.service';
|
||||
import { getDataServiceFor } from '../../../core/data/base/data-service.decorator';
|
||||
|
||||
/**
|
||||
* This class represents a resolver that requests a specific item before the route is activated
|
||||
|
Reference in New Issue
Block a user