-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implemented CRUD operation for tags. * Implemented tag association to the resource. * Added test for tag management. * Added log messages. * Added DB creation scripts for tag tables. * Added javadoc to tag REST service. * Refactoring. * Added count in get all tags operation result. * Added filtering by tag for the extJS get all operation. * Exposed get all tags operation to anonymous users. * Refactored nameLike path variable handling. * Introduced AssociatedEntityFilter abstraction. * Set distinct in resource count query. * Added null check to nameLike path variable handling. * Refactored nameLike query variable handling. * Added DB migration scripts. * Handled on delete cascade actions on tags. * Fixed hash calculation for StoredData to avoid stack overflow. * Fixed bug that was removing tag association after updates. * Signalled failing assertion in rest client test. * Fixed tag list serialization when null. * Handled names in filters that contain commas.
- Loading branch information
Showing
47 changed files
with
2,075 additions
and
267 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
25 changes: 25 additions & 0 deletions
25
doc/sql/migration/h2/h2-migration-from-v.2.1.0-to-v2.3.0.sql
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,25 @@ | ||
CREATE TABLE gs_tag ( | ||
id BIGINT NOT NULL, | ||
color VARCHAR(255) NOT NULL, | ||
description VARCHAR(255), | ||
name VARCHAR(255) NOT NULL, | ||
CONSTRAINT gs_tag_pkey PRIMARY KEY (id) | ||
); | ||
|
||
CREATE TABLE gs_resource_tags ( | ||
tag_id BIGINT NOT NULL, | ||
resource_id BIGINT NOT NULL, | ||
CONSTRAINT gs_resource_tags_pkey PRIMARY KEY (tag_id, resource_id) | ||
); | ||
|
||
-- Add foreign key constraints to gs_resource_tags | ||
ALTER TABLE gs_resource_tags | ||
ADD CONSTRAINT fk_resource_tags_resource | ||
FOREIGN KEY (resource_id) | ||
REFERENCES gs_resource(id) | ||
ON DELETE CASCADE; | ||
|
||
ALTER TABLE gs_resource_tags | ||
ADD CONSTRAINT fk_resource_tags_tag | ||
FOREIGN KEY (tag_id) | ||
REFERENCES gs_tag(id); |
25 changes: 25 additions & 0 deletions
25
doc/sql/migration/oracle/oracle-migration-from-v.2.1.0-to-v2.3.0.sql
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,25 @@ | ||
create table gs_tag ( | ||
id number(19,0) not null, | ||
color varchar2(255 char) not null, | ||
description varchar2(255 char), | ||
"name" varchar2(255 char) not null, | ||
primary key (id) | ||
); | ||
|
||
create table gs_resource_tags ( | ||
tag_id number(19,0) not null, | ||
resource_id number(19,0) not null, | ||
primary key (tag_id, resource_id) | ||
); | ||
|
||
-- Add foreign key constraints to gs_resource_tags | ||
alter table gs_resource_tags | ||
add constraint fk_resource_tags_resource | ||
foreign key (resource_id) | ||
references gs_resource(id) | ||
on delete cascade; | ||
|
||
alter table gs_resource_tags | ||
add constraint fk_resource_tags_tag | ||
foreign key (tag_id) | ||
references gs_tag(id); |
25 changes: 25 additions & 0 deletions
25
doc/sql/migration/postgresql/postgresql-migration-from-v.2.1.0-to-v2.3.0.sql
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,25 @@ | ||
create table gs_tag ( | ||
id int8 not null, | ||
color varchar(255) not null, | ||
description varchar(255) null, | ||
"name" varchar(255) not null, | ||
constraint gs_tag_pkey primary key (id) | ||
); | ||
|
||
create table gs_resource_tags ( | ||
tag_id int8 not null, | ||
resource_id int8 not null, | ||
constraint gs_resource_tags_pkey primary key (tag_id, resource_id) | ||
); | ||
|
||
-- Add foreign key constraints to gs_resource_tags | ||
alter table gs_resource_tags | ||
add constraint fk_resource_tags_resource | ||
foreign key (resource_id) | ||
references gs_resource(id) | ||
on delete cascade; | ||
|
||
alter table gs_resource_tags | ||
add constraint fk_resource_tags_tag | ||
foreign key (tag_id) | ||
references gs_tag(id); |
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.