Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Dspace7 Angular
Manage
Activity
Members
Labels
Plan
Issues
42
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vtechworks
Dspace7 Angular
Commits
97374d47
Commit
97374d47
authored
5 years ago
by
Alexander Sulfrian
Browse files
Options
Downloads
Patches
Plain Diff
Use delegation for MetadataSchemaDataService
parent
745245ef
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/app/core/data/metadata-schema-data.service.ts
+27
-15
27 additions, 15 deletions
src/app/core/data/metadata-schema-data.service.ts
with
27 additions
and
15 deletions
src/app/core/data/metadata-schema-data.service.ts
+
27
−
15
View file @
97374d47
...
...
@@ -13,15 +13,38 @@ import { MetadataSchema } from '../metadata/metadataschema.model';
import
{
NormalizedObjectBuildService
}
from
'
../cache/builders/normalized-object-build.service
'
;
import
{
HttpClient
}
from
'
@angular/common/http
'
;
import
{
NotificationsService
}
from
'
../../shared/notifications/notifications.service
'
;
import
{
ChangeAnalyzer
}
from
'
./change-analyzer
'
;
import
{
DefaultChangeAnalyzer
}
from
'
./default-change-analyzer.service
'
;
/* tslint:disable:max-classes-per-file */
class
DataServiceImpl
extends
DataService
<
MetadataSchema
>
{
protected
linkPath
=
'
metadataschemas
'
;
protected
forceBypassCache
=
false
;
constructor
(
protected
requestService
:
RequestService
,
protected
rdbService
:
RemoteDataBuildService
,
protected
dataBuildService
:
NormalizedObjectBuildService
,
protected
store
:
Store
<
CoreState
>
,
protected
objectCache
:
ObjectCacheService
,
protected
halService
:
HALEndpointService
,
protected
notificationsService
:
NotificationsService
,
protected
http
:
HttpClient
,
protected
comparator
:
ChangeAnalyzer
<
MetadataSchema
>
)
{
super
();
}
getBrowseEndpoint
(
options
:
FindAllOptions
=
{},
linkPath
:
string
=
this
.
linkPath
):
Observable
<
string
>
{
return
this
.
halService
.
getEndpoint
(
linkPath
);
}
}
/**
* A service responsible for fetching/sending data from/to the REST API on the metadataschemas endpoint
*/
@
Injectable
()
export
class
MetadataSchemaDataService
extends
DataService
<
MetadataSchema
>
{
protected
linkPath
=
'
metadataschemas
'
;
protected
forceBypassCache
=
false
;
export
class
MetadataSchemaDataService
{
private
dataService
:
DataServiceImpl
;
constructor
(
protected
requestService
:
RequestService
,
...
...
@@ -33,17 +56,6 @@ export class MetadataSchemaDataService extends DataService<MetadataSchema> {
protected
dataBuildService
:
NormalizedObjectBuildService
,
protected
http
:
HttpClient
,
protected
notificationsService
:
NotificationsService
)
{
super
();
}
/**
* Get the endpoint for browsing metadataschemas
* @param {FindAllOptions} options
* @returns {Observable<string>}
*/
public
getBrowseEndpoint
(
options
:
FindAllOptions
=
{},
linkPath
:
string
=
this
.
linkPath
):
Observable
<
string
>
{
return
null
;
this
.
dataService
=
new
DataServiceImpl
(
requestService
,
rdbService
,
dataBuildService
,
null
,
objectCache
,
halService
,
notificationsService
,
http
,
comparator
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment