Skip to content

Commit

Permalink
refactoring asString()
Browse files Browse the repository at this point in the history
  • Loading branch information
witek committed Jul 13, 2015
1 parent 32ce86e commit 027b3d6
Show file tree
Hide file tree
Showing 42 changed files with 178 additions and 176 deletions.
8 changes: 4 additions & 4 deletions src/main/java/scrum/client/admin/ProjectUserConfig.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
* Copyright 2011 Witoslaw Koczewsi <[email protected]>, Artjom Kochtchi
*
*
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
* General Public License as published by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
*
* You should have received a copy of the GNU General Public License along with this program. If not, see
* <http://www.gnu.org/licenses/>.
*/
Expand Down Expand Up @@ -84,7 +84,7 @@ public boolean isMisconductsEditable() {
}

@Override
public String toString() {
public String asString() {
return getProject() + " " + getUser();
}

Expand Down
8 changes: 4 additions & 4 deletions src/main/java/scrum/client/admin/User.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
* Copyright 2011 Witoslaw Koczewsi <[email protected]>, Artjom Kochtchi
*
*
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
* General Public License as published by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
*
* You should have received a copy of the GNU General Public License along with this program. If not, see
* <http://www.gnu.org/licenses/>.
*/
Expand Down Expand Up @@ -70,7 +70,7 @@ public int compareTo(User u) {
}

@Override
public String toString() {
public String asString() {
return getName();
}

Expand Down
8 changes: 4 additions & 4 deletions src/main/java/scrum/client/calendar/SimpleEvent.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
* Copyright 2011 Witoslaw Koczewsi <[email protected]>, Artjom Kochtchi
*
*
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
* General Public License as published by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
*
* You should have received a copy of the GNU General Public License along with this program. If not, see
* <http://www.gnu.org/licenses/>.
*/
Expand Down Expand Up @@ -55,7 +55,7 @@ public String getDurationAsString() {
}

@Override
public String toString() {
public String asString() {
StringBuilder sb = new StringBuilder();
sb.append(getReference()).append(" ");
sb.append(getDate().toString());
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/scrum/client/collaboration/ChatMessage.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
* Copyright 2011 Witoslaw Koczewsi <[email protected]>, Artjom Kochtchi
*
*
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
* General Public License as published by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
*
* You should have received a copy of the GNU General Public License along with this program. If not, see
* <http://www.gnu.org/licenses/>.
*/
Expand Down Expand Up @@ -37,7 +37,7 @@ public ChatMessage(Map data) {
}

@Override
public String toString() {
public String asString() {
return getAuthor() + ": " + getText();
}

Expand Down
8 changes: 4 additions & 4 deletions src/main/java/scrum/client/collaboration/Emoticon.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
* Copyright 2011 Witoslaw Koczewsi <[email protected]>, Artjom Kochtchi
*
*
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
* General Public License as published by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
*
* You should have received a copy of the GNU General Public License along with this program. If not, see
* <http://www.gnu.org/licenses/>.
*/
Expand Down Expand Up @@ -48,7 +48,7 @@ public String getTooltip() {
}

@Override
public String toString() {
public String asString() {
return getOwner() + ":" + getEmotion();
}

Expand Down
12 changes: 6 additions & 6 deletions src/main/java/scrum/client/collaboration/Subject.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/*
* Copyright 2011 Witoslaw Koczewsi <[email protected]>, Artjom Kochtchi
*
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public
* License as published by the Free Software Foundation, either version 3 of the License, or (at your option)
* any later version.
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
* General Public License as published by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
* for more details.
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
* You should have received a copy of the GNU General Public License along with this program. If not, see
* <http://www.gnu.org/licenses/>.
Expand Down Expand Up @@ -54,7 +54,7 @@ public Widget createForumItemWidget() {
}

@Override
public String toString() {
public String asString() {
return getReference() + " " + getLabel();
}

Expand Down
8 changes: 4 additions & 4 deletions src/main/java/scrum/client/collaboration/Wikipage.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
* Copyright 2011 Witoslaw Koczewsi <[email protected]>, Artjom Kochtchi
*
*
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
* General Public License as published by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
*
* You should have received a copy of the GNU General Public License along with this program. If not, see
* <http://www.gnu.org/licenses/>.
*/
Expand Down Expand Up @@ -43,7 +43,7 @@ public String toHtml() {
}

@Override
public String toString() {
public String asString() {
return getName();
}

Expand Down
12 changes: 6 additions & 6 deletions src/main/java/scrum/client/files/File.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/*
* Copyright 2011 Witoslaw Koczewsi <[email protected]>, Artjom Kochtchi
*
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public
* License as published by the Free Software Foundation, either version 3 of the License, or (at your option)
* any later version.
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
* General Public License as published by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
* for more details.
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
* You should have received a copy of the GNU General Public License along with this program. If not, see
* <http://www.gnu.org/licenses/>.
Expand Down Expand Up @@ -45,7 +45,7 @@ public String toHtml() {
}

@Override
public String toString() {
public String asString() {
return getFilename();
}

Expand Down
8 changes: 4 additions & 4 deletions src/main/java/scrum/client/impediments/Impediment.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
* Copyright 2011 Witoslaw Koczewsi <[email protected]>, Artjom Kochtchi
*
*
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
* General Public License as published by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
*
* You should have received a copy of the GNU General Public License along with this program. If not, see
* <http://www.gnu.org/licenses/>.
*/
Expand Down Expand Up @@ -65,7 +65,7 @@ public String toHtml() {
}

@Override
public String toString() {
public String asString() {
return getReference() + " " + getLabel();
}

Expand Down
8 changes: 4 additions & 4 deletions src/main/java/scrum/client/issues/Issue.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
* Copyright 2011 Witoslaw Koczewsi <[email protected]>, Artjom Kochtchi
*
*
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
* General Public License as published by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
*
* You should have received a copy of the GNU General Public License along with this program. If not, see
* <http://www.gnu.org/licenses/>.
*/
Expand Down Expand Up @@ -270,7 +270,7 @@ public String toHtml() {
}

@Override
public String toString() {
public String asString() {
return getReference() + " (" + getType() + ") " + getLabel();
}

Expand Down
10 changes: 5 additions & 5 deletions src/main/java/scrum/client/journal/Change.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
* Copyright 2011 Witoslaw Koczewsi <[email protected]>, Artjom Kochtchi
*
*
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
* General Public License as published by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
*
* You should have received a copy of the GNU General Public License along with this program. If not, see
* <http://www.gnu.org/licenses/>.
*/
Expand Down Expand Up @@ -92,7 +92,7 @@ private String getFieldChangeLabel() {
if (key.equals("sprintId"))
return newValue == null ? "kicked story from " + getEntityReferenceAndLabel(oldValue)
: "pulled story to " + getEntityReferenceAndLabel(newValue);
if (key.equals("issueId")) return "created from " + getEntityReferenceAndLabel(newValue);
if (key.equals("issueId")) return "created from " + getEntityReferenceAndLabel(newValue);
} else if (parent instanceof Task) {
if (key.equals("issueId")) return "created " + getEntityReferenceAndLabel(newValue);
}
Expand Down Expand Up @@ -147,7 +147,7 @@ private String getFieldLabel() {
}

@Override
public String toString() {
public String asString() {
String parent;
try {
parent = getParent().toString();
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/scrum/client/journal/ProjectEvent.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
* Copyright 2011 Witoslaw Koczewsi <[email protected]>, Artjom Kochtchi
*
*
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
* General Public License as published by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
*
* You should have received a copy of the GNU General Public License along with this program. If not, see
* <http://www.gnu.org/licenses/>.
*/
Expand Down Expand Up @@ -45,7 +45,7 @@ public String toHtml() {
}

@Override
public String toString() {
public String asString() {
return getLabel();
}

Expand Down
8 changes: 4 additions & 4 deletions src/main/java/scrum/client/pr/BlogEntry.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
* Copyright 2011 Witoslaw Koczewsi <[email protected]>, Artjom Kochtchi
*
*
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
* General Public License as published by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
*
* You should have received a copy of the GNU General Public License along with this program. If not, see
* <http://www.gnu.org/licenses/>.
*/
Expand Down Expand Up @@ -58,7 +58,7 @@ public String toHtml() {
}

@Override
public String toString() {
public String asString() {
return getReference() + " " + getTitle();
}

Expand Down
8 changes: 4 additions & 4 deletions src/main/java/scrum/client/project/Project.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
* Copyright 2011 Witoslaw Koczewsi <[email protected]>, Artjom Kochtchi
*
*
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
* General Public License as published by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
*
* You should have received a copy of the GNU General Public License along with this program. If not, see
* <http://www.gnu.org/licenses/>.
*/
Expand Down Expand Up @@ -611,7 +611,7 @@ public Sprint createNewSprint() {
}

@Override
public String toString() {
public String asString() {
return getLabel();
}

Expand Down
Loading

0 comments on commit 027b3d6

Please sign in to comment.