mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-13 04:53:06 +00:00
Fixed property groups form Group and EPerson models and added comments
This commit is contained in:
@@ -1,22 +1,50 @@
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { DSpaceObject } from '../../shared/dspace-object.model';
|
||||
import { Group } from './group.model';
|
||||
import { RemoteData } from '../../data/remote-data';
|
||||
import { PaginatedList } from '../../data/paginated-list';
|
||||
|
||||
export class EPerson extends DSpaceObject {
|
||||
|
||||
/**
|
||||
* A string representing the unique handle of this Collection
|
||||
*/
|
||||
public handle: string;
|
||||
|
||||
public groups: Group[];
|
||||
/**
|
||||
* List of Groups that this EPerson belong to
|
||||
*/
|
||||
public groups: Observable<RemoteData<PaginatedList<Group>>>;
|
||||
|
||||
/**
|
||||
* A string representing the netid of this EPerson
|
||||
*/
|
||||
public netid: string;
|
||||
|
||||
/**
|
||||
* A string representing the last active date for this EPerson
|
||||
*/
|
||||
public lastActive: string;
|
||||
|
||||
/**
|
||||
* A boolean representing if this EPerson can log in
|
||||
*/
|
||||
public canLogIn: boolean;
|
||||
|
||||
/**
|
||||
* The EPerson email address
|
||||
*/
|
||||
public email: string;
|
||||
|
||||
/**
|
||||
* A boolean representing if this EPerson require certificate
|
||||
*/
|
||||
public requireCertificate: boolean;
|
||||
|
||||
/**
|
||||
* A boolean representing if this EPerson registered itself
|
||||
*/
|
||||
public selfRegistered: boolean;
|
||||
|
||||
/** Getter to retrieve the EPerson's full name as a string */
|
||||
|
@@ -1,12 +1,28 @@
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { DSpaceObject } from '../../shared/dspace-object.model';
|
||||
import { PaginatedList } from '../../data/paginated-list';
|
||||
import { RemoteData } from '../../data/remote-data';
|
||||
|
||||
export class Group extends DSpaceObject {
|
||||
|
||||
public groups: Group[];
|
||||
/**
|
||||
* List of Groups that this Group belong to
|
||||
*/
|
||||
public groups: Observable<RemoteData<PaginatedList<Group>>>;
|
||||
|
||||
/**
|
||||
* A string representing the unique handle of this Group
|
||||
*/
|
||||
public handle: string;
|
||||
|
||||
/**
|
||||
* A string representing the name of this Group
|
||||
*/
|
||||
public name: string;
|
||||
|
||||
/**
|
||||
* A string representing the name of this Group is permanent
|
||||
*/
|
||||
public permanent: boolean;
|
||||
}
|
||||
|
@@ -1,37 +1,62 @@
|
||||
import { autoserialize, autoserializeAs, inheritSerialization } from 'cerialize';
|
||||
import { autoserialize, deserialize, inheritSerialization } from 'cerialize';
|
||||
|
||||
import { CacheableObject } from '../../cache/object-cache.reducer';
|
||||
import { ListableObject } from '../../../shared/object-collection/shared/listable-object.model';
|
||||
import { NormalizedDSpaceObject } from '../../cache/models/normalized-dspace-object.model';
|
||||
import { EPerson } from './eperson.model';
|
||||
import { mapsTo } from '../../cache/builders/build-decorators';
|
||||
import { Group } from './group.model';
|
||||
import { NormalizedGroup } from './normalized-group.model';
|
||||
import { mapsTo, relationship } from '../../cache/builders/build-decorators';
|
||||
import { ResourceType } from '../../shared/resource-type';
|
||||
|
||||
@mapsTo(EPerson)
|
||||
@inheritSerialization(NormalizedDSpaceObject)
|
||||
export class NormalizedEPerson extends NormalizedDSpaceObject<EPerson> implements CacheableObject, ListableObject {
|
||||
|
||||
/**
|
||||
* A string representing the unique handle of this EPerson
|
||||
*/
|
||||
@autoserialize
|
||||
public handle: string;
|
||||
|
||||
@autoserializeAs(NormalizedGroup)
|
||||
groups: Group[];
|
||||
/**
|
||||
* List of Groups that this EPerson belong to
|
||||
*/
|
||||
@deserialize
|
||||
@relationship(ResourceType.Group, true)
|
||||
groups: string[];
|
||||
|
||||
/**
|
||||
* A string representing the netid of this EPerson
|
||||
*/
|
||||
@autoserialize
|
||||
public netid: string;
|
||||
|
||||
/**
|
||||
* A string representing the last active date for this EPerson
|
||||
*/
|
||||
@autoserialize
|
||||
public lastActive: string;
|
||||
|
||||
/**
|
||||
* A boolean representing if this EPerson can log in
|
||||
*/
|
||||
@autoserialize
|
||||
public canLogIn: boolean;
|
||||
|
||||
/**
|
||||
* The EPerson email address
|
||||
*/
|
||||
@autoserialize
|
||||
public email: string;
|
||||
|
||||
/**
|
||||
* A boolean representing if this EPerson require certificate
|
||||
*/
|
||||
@autoserialize
|
||||
public requireCertificate: boolean;
|
||||
|
||||
/**
|
||||
* A boolean representing if this EPerson registered itself
|
||||
*/
|
||||
@autoserialize
|
||||
public selfRegistered: boolean;
|
||||
}
|
||||
|
@@ -1,23 +1,38 @@
|
||||
import { autoserialize, autoserializeAs, inheritSerialization } from 'cerialize';
|
||||
import { autoserialize, deserialize, inheritSerialization } from 'cerialize';
|
||||
|
||||
import { CacheableObject } from '../../cache/object-cache.reducer';
|
||||
import { ListableObject } from '../../../shared/object-collection/shared/listable-object.model';
|
||||
import { NormalizedDSpaceObject } from '../../cache/models/normalized-dspace-object.model';
|
||||
import { mapsTo } from '../../cache/builders/build-decorators';
|
||||
import { mapsTo, relationship } from '../../cache/builders/build-decorators';
|
||||
import { Group } from './group.model';
|
||||
import { ResourceType } from '../../shared/resource-type';
|
||||
|
||||
@mapsTo(Group)
|
||||
@inheritSerialization(NormalizedDSpaceObject)
|
||||
export class NormalizedGroup extends NormalizedDSpaceObject<Group> implements CacheableObject, ListableObject {
|
||||
|
||||
@autoserializeAs(NormalizedGroup)
|
||||
groups: Group[];
|
||||
/**
|
||||
* List of Groups that this Group belong to
|
||||
*/
|
||||
@deserialize
|
||||
@relationship(ResourceType.Group, true)
|
||||
groups: string[];
|
||||
|
||||
/**
|
||||
* A string representing the unique handle of this Group
|
||||
*/
|
||||
@autoserialize
|
||||
public handle: string;
|
||||
|
||||
/**
|
||||
* A string representing the name of this Group
|
||||
*/
|
||||
@autoserialize
|
||||
public name: string;
|
||||
|
||||
/**
|
||||
* A string representing the name of this Group is permanent
|
||||
*/
|
||||
@autoserialize
|
||||
public permanent: boolean;
|
||||
}
|
||||
|
Reference in New Issue
Block a user