-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from IQSS/80-files-filters
Add filters to getDatasetFiles use case
- Loading branch information
Showing
24 changed files
with
257 additions
and
187 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export enum DatasetNotNumberedVersion { | ||
DRAFT = ':draft', | ||
LATEST = ':latest', | ||
} |
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
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,45 @@ | ||
export class FileCriteria { | ||
constructor( | ||
public readonly orderCriteria: FileOrderCriteria = FileOrderCriteria.NAME_AZ, | ||
public readonly contentType?: string, | ||
public readonly accessStatus?: FileAccessStatus, | ||
public readonly categoryName?: string, | ||
public readonly searchText?: string, | ||
) {} | ||
|
||
withOrderCriteria(orderCriteria: FileOrderCriteria): FileCriteria { | ||
return new FileCriteria(orderCriteria, this.contentType, this.accessStatus, this.categoryName); | ||
} | ||
|
||
withContentType(contentType: string | undefined): FileCriteria { | ||
return new FileCriteria(this.orderCriteria, contentType, this.accessStatus, this.categoryName); | ||
} | ||
|
||
withAccessStatus(accessStatus: FileAccessStatus | undefined): FileCriteria { | ||
return new FileCriteria(this.orderCriteria, this.contentType, accessStatus, this.categoryName); | ||
} | ||
|
||
withCategoryName(categoryName: string | undefined): FileCriteria { | ||
return new FileCriteria(this.orderCriteria, this.contentType, this.accessStatus, categoryName); | ||
} | ||
|
||
withSearchText(searchText: string | undefined): FileCriteria { | ||
return new FileCriteria(this.orderCriteria, this.contentType, this.accessStatus, this.categoryName, searchText); | ||
} | ||
} | ||
|
||
export enum FileOrderCriteria { | ||
NAME_AZ = 'NameAZ', | ||
NAME_ZA = 'NameZA', | ||
NEWEST = 'Newest', | ||
OLDEST = 'Oldest', | ||
SIZE = 'Size', | ||
TYPE = 'Type', | ||
} | ||
|
||
export enum FileAccessStatus { | ||
PUBLIC = 'Public', | ||
RESTRICTED = 'Restricted', | ||
EMBARGOED = 'EmbargoedThenRestricted', | ||
EMBARGOED_RESTRICTED = 'EmbargoedThenPublic', | ||
} |
This file was deleted.
Oops, something went wrong.
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
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.