mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 14:17:57 +01:00
label attribute icon to iconName refactor (because of eze code review)
This commit is contained in:
parent
8cd05ec37e
commit
5ec3b6cce1
@ -30,7 +30,7 @@ INSERT INTO COLLABORATION (id, colaborator_id, properties_id, mindmap_id, role_i
|
|||||||
INSERT INTO COLLABORATION_PROPERTIES (id, starred, mindmap_properties) VALUES (2, 1, '{zoom:0.8}');
|
INSERT INTO COLLABORATION_PROPERTIES (id, starred, mindmap_properties) VALUES (2, 1, '{zoom:0.8}');
|
||||||
INSERT INTO COLLABORATION (id, colaborator_id, properties_id, mindmap_id, role_id) VALUES (2, 2, 2, 1, 1);
|
INSERT INTO COLLABORATION (id, colaborator_id, properties_id, mindmap_id, role_id) VALUES (2, 2, 2, 1, 1);
|
||||||
|
|
||||||
INSERT INTO LABEL (id, title, creator_id, parent_label_id, color, icon) VALUES (1, 'test label', 1, NULL, '#ff0000', 'glyphicon glyphicon-tag');
|
INSERT INTO LABEL (id, title, creator_id, parent_label_id, color, iconName) VALUES (1, 'test label', 1, NULL, '#ff0000', 'glyphicon glyphicon-tag');
|
||||||
INSERT INTO R_LABEL_MINDMAP (label_id, mindmap_id) VALUES (1,1);
|
INSERT INTO R_LABEL_MINDMAP (label_id, mindmap_id) VALUES (1,1);
|
||||||
|
|
||||||
INSERT INTO MINDMAP (id, title, xml, description, public, creation_date, edition_date, creator_id, tags, last_editor_id)
|
INSERT INTO MINDMAP (id, title, xml, description, public, creation_date, edition_date, creator_id, tags, last_editor_id)
|
||||||
@ -38,9 +38,9 @@ INSERT INTO MINDMAP (id, title, xml, description, public, creation_date, edition
|
|||||||
INSERT INTO COLLABORATION_PROPERTIES (id, starred, mindmap_properties) VALUES (3, 1, '{zoom:0.8}');
|
INSERT INTO COLLABORATION_PROPERTIES (id, starred, mindmap_properties) VALUES (3, 1, '{zoom:0.8}');
|
||||||
INSERT INTO COLLABORATION (id, colaborator_id, properties_id, mindmap_id, role_id) VALUES (3, 2, 3, 2, 0);
|
INSERT INTO COLLABORATION (id, colaborator_id, properties_id, mindmap_id, role_id) VALUES (3, 2, 3, 2, 0);
|
||||||
|
|
||||||
INSERT INTO LABEL (id, title, creator_id, parent_label_id, color, icon) VALUES (2, 'admin label', 2, NULL, '#0000ff', 'glyphicon glyphicon-star');
|
INSERT INTO LABEL (id, title, creator_id, parent_label_id, color, iconName) VALUES (2, 'admin label', 2, NULL, '#0000ff', 'glyphicon glyphicon-star');
|
||||||
INSERT INTO R_LABEL_MINDMAP (label_id, mindmap_id) VALUES (2,2);
|
INSERT INTO R_LABEL_MINDMAP (label_id, mindmap_id) VALUES (2,2);
|
||||||
INSERT INTO LABEL (id, title, creator_id, parent_label_id, color, icon) VALUES (3, 'mindmap shared', 2, NULL, '#00ff00', 'glyphicon glyphicon-share');
|
INSERT INTO LABEL (id, title, creator_id, parent_label_id, color, iconName) VALUES (3, 'mindmap shared', 2, NULL, '#00ff00', 'glyphicon glyphicon-share');
|
||||||
INSERT INTO R_LABEL_MINDMAP (label_id, mindmap_id) VALUES (3,1);
|
INSERT INTO R_LABEL_MINDMAP (label_id, mindmap_id) VALUES (3,1);
|
||||||
|
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
@ -38,7 +38,7 @@ CREATE TABLE LABEL (
|
|||||||
creator_id INTEGER NOT NULL,
|
creator_id INTEGER NOT NULL,
|
||||||
parent_label_id INTEGER,
|
parent_label_id INTEGER,
|
||||||
color VARCHAR(7) NOT NULL,
|
color VARCHAR(7) NOT NULL,
|
||||||
icon VARCHAR(255) NOT NULL
|
iconName VARCHAR(50) NOT NULL
|
||||||
--FOREIGN KEY (creator_id) REFERENCES USER (colaborator_id)
|
--FOREIGN KEY (creator_id) REFERENCES USER (colaborator_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ INSERT INTO COLLABORATION (id, colaborator_id, properties_id, mindmap_id, role_i
|
|||||||
INSERT INTO COLLABORATION_PROPERTIES (id, starred, mindmap_properties) VALUES (2, 1, '{zoom:0.8}');
|
INSERT INTO COLLABORATION_PROPERTIES (id, starred, mindmap_properties) VALUES (2, 1, '{zoom:0.8}');
|
||||||
INSERT INTO COLLABORATION (id, colaborator_id, properties_id, mindmap_id, role_id) VALUES (2, 2, 2, 1, 1);
|
INSERT INTO COLLABORATION (id, colaborator_id, properties_id, mindmap_id, role_id) VALUES (2, 2, 2, 1, 1);
|
||||||
|
|
||||||
INSERT INTO LABEL (id, title, creator_id, parent_label_id, color, icon) VALUES (1, 'test label', 1, NULL, '#ff0000', 'glyphicon glyphicon-tag');
|
INSERT INTO LABEL (id, title, creator_id, parent_label_id, color, iconName) VALUES (1, 'test label', 1, NULL, '#ff0000', 'glyphicon glyphicon-tag');
|
||||||
INSERT INTO R_LABEL_MINDMAP (label_id, mindmap_id) VALUES (1,1);
|
INSERT INTO R_LABEL_MINDMAP (label_id, mindmap_id) VALUES (1,1);
|
||||||
|
|
||||||
INSERT INTO MINDMAP (id, title, xml, description, public, creation_date, edition_date, creator_id, tags, last_editor_id)
|
INSERT INTO MINDMAP (id, title, xml, description, public, creation_date, edition_date, creator_id, tags, last_editor_id)
|
||||||
@ -42,9 +42,9 @@ INSERT INTO MINDMAP (id, title, xml, description, public, creation_date, edition
|
|||||||
INSERT INTO COLLABORATION_PROPERTIES (id, starred, mindmap_properties) VALUES (3, 1, '{zoom:0.8}');
|
INSERT INTO COLLABORATION_PROPERTIES (id, starred, mindmap_properties) VALUES (3, 1, '{zoom:0.8}');
|
||||||
INSERT INTO COLLABORATION (id, colaborator_id, properties_id, mindmap_id, role_id) VALUES (3, 2, 3, 2, 0);
|
INSERT INTO COLLABORATION (id, colaborator_id, properties_id, mindmap_id, role_id) VALUES (3, 2, 3, 2, 0);
|
||||||
|
|
||||||
INSERT INTO LABEL (id, title, creator_id, parent_label_id, color, icon) VALUES (2, 'admin label', 2, NULL, '#0000ff', 'glyphicon glyphicon-star');
|
INSERT INTO LABEL (id, title, creator_id, parent_label_id, color, iconName) VALUES (2, 'admin label', 2, NULL, '#0000ff', 'glyphicon glyphicon-star');
|
||||||
INSERT INTO R_LABEL_MINDMAP (label_id, mindmap_id) VALUES (2,2);
|
INSERT INTO R_LABEL_MINDMAP (label_id, mindmap_id) VALUES (2,2);
|
||||||
INSERT INTO LABEL (id, title, creator_id, parent_label_id, color, icon) VALUES (3, 'mindmap shared', 2, NULL, '#00ff00', 'glyphicon glyphicon-share');
|
INSERT INTO LABEL (id, title, creator_id, parent_label_id, color, iconName) VALUES (3, 'mindmap shared', 2, NULL, '#00ff00', 'glyphicon glyphicon-share');
|
||||||
INSERT INTO R_LABEL_MINDMAP (label_id, mindmap_id) VALUES (3,1);
|
INSERT INTO R_LABEL_MINDMAP (label_id, mindmap_id) VALUES (3,1);
|
||||||
|
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
@ -58,7 +58,7 @@ CREATE TABLE LABEL (
|
|||||||
creator_id INTEGER NOT NULL,
|
creator_id INTEGER NOT NULL,
|
||||||
parent_label_id INTEGER,
|
parent_label_id INTEGER,
|
||||||
color VARCHAR(7) NOT NULL,
|
color VARCHAR(7) NOT NULL,
|
||||||
icon VARCHAR(255) NOT NULL,
|
iconName VARCHAR(50) NOT NULL,
|
||||||
FOREIGN KEY (creator_id) REFERENCES USER (colaborator_id),
|
FOREIGN KEY (creator_id) REFERENCES USER (colaborator_id),
|
||||||
FOREIGN KEY (parent_label_id) REFERENCES LABEL (id)
|
FOREIGN KEY (parent_label_id) REFERENCES LABEL (id)
|
||||||
ON DELETE CASCADE
|
ON DELETE CASCADE
|
||||||
|
@ -12,7 +12,7 @@ public class Label {
|
|||||||
@NotNull private User creator;
|
@NotNull private User creator;
|
||||||
@Nullable private Label parent;
|
@Nullable private Label parent;
|
||||||
@NotNull private String color;
|
@NotNull private String color;
|
||||||
@NotNull private String icon;
|
@NotNull private String iconName;
|
||||||
|
|
||||||
public void setParent(@Nullable Label parent) {
|
public void setParent(@Nullable Label parent) {
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
@ -59,12 +59,12 @@ public class Label {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public String getIcon() {
|
public String getIconName() {
|
||||||
return icon;
|
return iconName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIcon(@NotNull String icon) {
|
public void setIconName(@NotNull String iconName) {
|
||||||
this.icon = icon;
|
this.iconName = iconName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -65,16 +65,16 @@ public class RestLabel {
|
|||||||
label.setColor(color);
|
label.setColor(color);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIcon(@NotNull final String icon) {
|
public void setIconName(@NotNull final String iconName) {
|
||||||
label.setIcon(icon);
|
label.setIconName(iconName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable public String getColor() {
|
@Nullable public String getColor() {
|
||||||
return label.getColor();
|
return label.getColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable public String getIcon() {
|
@Nullable public String getIconName() {
|
||||||
return label.getIcon();
|
return label.getIconName();
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
</id>
|
</id>
|
||||||
<property name="title"/>
|
<property name="title"/>
|
||||||
<property name="color"/>
|
<property name="color"/>
|
||||||
<property name="icon"/>
|
<property name="iconName"/>
|
||||||
<many-to-one name="parent" column="parent_label_id" not-null="false"/>
|
<many-to-one name="parent" column="parent_label_id" not-null="false"/>
|
||||||
<many-to-one name="creator" column="creator_id" unique="true" not-null="false" lazy="proxy"/>
|
<many-to-one name="creator" column="creator_id" unique="true" not-null="false" lazy="proxy"/>
|
||||||
</class>
|
</class>
|
||||||
|
@ -138,7 +138,7 @@ public class RestLabelITCase {
|
|||||||
restLabel.setColor(color);
|
restLabel.setColor(color);
|
||||||
}
|
}
|
||||||
if (icon != null) {
|
if (icon != null) {
|
||||||
restLabel.setIcon(icon);
|
restLabel.setIconName(icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a new label ...
|
// Create a new label ...
|
||||||
|
Loading…
Reference in New Issue
Block a user