forked from DSpace/dspace-angular
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged from dtq-dev and resolved conflicts
- Loading branch information
Showing
21 changed files
with
398 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...tstream-page/clarin-bitstream-token-expired/clarin-bitstream-token-expired.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<div class="jumbotron jumbotron-fluid bg-clarin-red rounded"> | ||
<div class="container"> | ||
<h1 class="display-4 px-3 py-3">The download token is expired, you will be redirected to the download page.</h1> | ||
<h1 class="display-4 px-3 py-3">{{'clarin.bitstream.expired.dtoken.message' | translate}}</h1> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { dataService } from './data/base/data-service.decorator'; | ||
import { BaseDataService } from './data/base/base-data.service'; | ||
import { RequestService } from './data/request.service'; | ||
import { RemoteDataBuildService } from './cache/builders/remote-data-build.service'; | ||
import { Store } from '@ngrx/store'; | ||
import { CoreState } from './core-state.model'; | ||
import { HALEndpointService } from './shared/hal-endpoint.service'; | ||
import { ObjectCacheService } from './cache/object-cache.service'; | ||
import { DefaultChangeAnalyzer } from './data/default-change-analyzer.service'; | ||
import { HttpClient } from '@angular/common/http'; | ||
import { NotificationsService } from '../shared/notifications/notifications.service'; | ||
import { linkName } from './data/clarin/clrua-data.service'; | ||
import { BitstreamChecksum } from './shared/bitstream-checksum.model'; | ||
|
||
/** | ||
* A service responsible for fetching BitstreamChecksum objects from the REST API | ||
*/ | ||
@Injectable() | ||
@dataService(BitstreamChecksum.type) | ||
export class BitstreamChecksumDataService extends BaseDataService<BitstreamChecksum> { | ||
protected linkPath = 'checksum'; | ||
|
||
constructor( | ||
protected requestService: RequestService, | ||
protected rdbService: RemoteDataBuildService, | ||
protected store: Store<CoreState>, | ||
protected halService: HALEndpointService, | ||
protected objectCache: ObjectCacheService, | ||
protected comparator: DefaultChangeAnalyzer<BitstreamChecksum>, | ||
protected http: HttpClient, | ||
protected notificationsService: NotificationsService, | ||
) { | ||
super(linkName, requestService, rdbService, objectCache, halService, undefined); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import { BITSTREAM_CHECKSUM } from './bitstream-checksum.resource'; | ||
import { excludeFromEquals } from '../utilities/equals.decorators'; | ||
import { autoserialize, deserialize } from 'cerialize'; | ||
import { ResourceType } from './resource-type'; | ||
import { HALLink } from './hal-link.model'; | ||
import { typedObject } from '../cache/builders/build-decorators'; | ||
import { TypedObject } from '../cache/typed-object.model'; | ||
|
||
|
||
/** | ||
* Model class containing the checksums of a bitstream (local, S3, DB) | ||
*/ | ||
@typedObject | ||
export class BitstreamChecksum extends TypedObject { | ||
/** | ||
* The `bitstreamchecksum` object type. | ||
*/ | ||
static type = BITSTREAM_CHECKSUM; | ||
|
||
/** | ||
* The object type | ||
*/ | ||
@excludeFromEquals | ||
@autoserialize | ||
type: ResourceType; | ||
|
||
/** | ||
* The identifier of this BitstreamChecksum object | ||
*/ | ||
@autoserialize | ||
id: string; | ||
|
||
/** | ||
* The checksum of the active store (local/S3) | ||
*/ | ||
@autoserialize | ||
activeStore: CheckSum; | ||
|
||
/** | ||
* The checksum from the database | ||
*/ | ||
@autoserialize | ||
databaseChecksum: CheckSum; | ||
|
||
/** | ||
* The checksum of the synchronized store (S3, local) | ||
*/ | ||
@autoserialize | ||
synchronizedStore: CheckSum; | ||
|
||
@deserialize | ||
_links: { | ||
self: HALLink | ||
}; | ||
} | ||
|
||
/** | ||
* Model class containing a checksum value and algorithm | ||
*/ | ||
export interface CheckSum { | ||
checkSumAlgorithm: string; | ||
value: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { ResourceType } from './resource-type'; | ||
|
||
/** | ||
* The resource type for BitstreamChecksum | ||
* | ||
* Needs to be in a separate file to prevent circular | ||
* dependencies in webpack. | ||
*/ | ||
export const BITSTREAM_CHECKSUM = new ResourceType('bitstreamchecksum'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.