projects
/
Sone.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1d18096
)
Rename “friend Sone” to just “friend.”
author
David ‘Bombe’ Roden
<bombe@pterodactylus.net>
Fri, 15 Oct 2010 07:42:18 +0000
(09:42 +0200)
committer
David ‘Bombe’ Roden
<bombe@pterodactylus.net>
Fri, 15 Oct 2010 07:42:18 +0000
(09:42 +0200)
src/main/java/net/pterodactylus/sone/core/Core.java
patch
|
blob
|
history
src/main/java/net/pterodactylus/sone/data/Sone.java
patch
|
blob
|
history
src/main/java/net/pterodactylus/sone/data/SoneShell.java
patch
|
blob
|
history
src/main/java/net/pterodactylus/sone/template/SoneAccessor.java
patch
|
blob
|
history
src/main/java/net/pterodactylus/sone/web/FollowSonePage.java
patch
|
blob
|
history
src/main/java/net/pterodactylus/sone/web/IndexPage.java
patch
|
blob
|
history
diff --git
a/src/main/java/net/pterodactylus/sone/core/Core.java
b/src/main/java/net/pterodactylus/sone/core/Core.java
index
576cdf4
..
72c36d8
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/core/Core.java
+++ b/
src/main/java/net/pterodactylus/sone/core/Core.java
@@
-347,7
+347,7
@@
public class Core extends AbstractService {
((SoneShell) friendSone).setRequestUri(new FreenetURI(friendKey)).setName(friendName);
}
addRemoteSone(friendSone);
((SoneShell) friendSone).setRequestUri(new FreenetURI(friendKey)).setName(friendName);
}
addRemoteSone(friendSone);
- sone.addFriend
Sone
(sone);
+ sone.addFriend(sone);
}
sone.setModificationCounter(modificationCounter);
}
sone.setModificationCounter(modificationCounter);
@@
-406,7
+406,7
@@
public class Core extends AbstractService {
configuration.getStringValue(sonePrefix + "/Reply." + replyId + "/ID").setValue(null);
int friendId = 0;
configuration.getStringValue(sonePrefix + "/Reply." + replyId + "/ID").setValue(null);
int friendId = 0;
- for (Sone friend : sone.getFriend
Sone
s()) {
+ for (Sone friend : sone.getFriends()) {
String friendPrefix = sonePrefix + "/Friend." + friendId++;
configuration.getStringValue(friendPrefix + "/ID").setValue(friend.getId());
configuration.getStringValue(friendPrefix + "/Key").setValue(friend.getRequestUri().toString());
String friendPrefix = sonePrefix + "/Friend." + friendId++;
configuration.getStringValue(friendPrefix + "/ID").setValue(friend.getId());
configuration.getStringValue(friendPrefix + "/Key").setValue(friend.getRequestUri().toString());
diff --git
a/src/main/java/net/pterodactylus/sone/data/Sone.java
b/src/main/java/net/pterodactylus/sone/data/Sone.java
index
e6c9433
..
7041289
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/data/Sone.java
+++ b/
src/main/java/net/pterodactylus/sone/data/Sone.java
@@
-173,7
+173,7
@@
public class Sone {
*
* @return The friend Sones of this Sone
*/
*
* @return The friend Sones of this Sone
*/
- public Set<Sone> getFriend
Sone
s() {
+ public Set<Sone> getFriends() {
return Collections.unmodifiableSet(friendSones);
}
return Collections.unmodifiableSet(friendSones);
}
@@
-185,7
+185,7
@@
public class Sone {
* @return {@code true} if this Sone has the given Sone as a friend,
* {@code false} otherwise
*/
* @return {@code true} if this Sone has the given Sone as a friend,
* {@code false} otherwise
*/
- public boolean hasFriend
Sone
(Sone friendSone) {
+ public boolean hasFriend(Sone friendSone) {
return friendSones.contains(friendSone);
}
return friendSones.contains(friendSone);
}
@@
-196,7
+196,7
@@
public class Sone {
* The friend Sone to add
* @return This Sone (for method chaining)
*/
* The friend Sone to add
* @return This Sone (for method chaining)
*/
- public synchronized Sone addFriend
Sone
(Sone friendSone) {
+ public synchronized Sone addFriend(Sone friendSone) {
if (friendSones.add(friendSone)) {
modificationCounter++;
}
if (friendSones.add(friendSone)) {
modificationCounter++;
}
@@
-210,7
+210,7
@@
public class Sone {
* The friend Sone to remove
* @return This Sone (for method chaining)
*/
* The friend Sone to remove
* @return This Sone (for method chaining)
*/
- public synchronized Sone removeFriend
Sone
(Sone friendSone) {
+ public synchronized Sone removeFriend(Sone friendSone) {
if (friendSones.remove(friendSone)) {
modificationCounter++;
}
if (friendSones.remove(friendSone)) {
modificationCounter++;
}
diff --git
a/src/main/java/net/pterodactylus/sone/data/SoneShell.java
b/src/main/java/net/pterodactylus/sone/data/SoneShell.java
index
16afea1
..
9063d31
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/data/SoneShell.java
+++ b/
src/main/java/net/pterodactylus/sone/data/SoneShell.java
@@
-178,7
+178,7
@@
public class SoneShell extends Sone implements Shell<Sone> {
* @return The friend Sones of this Sone
*/
@Override
* @return The friend Sones of this Sone
*/
@Override
- public Set<Sone> getFriend
Sone
s() {
+ public Set<Sone> getFriends() {
return Collections.unmodifiableSet(friendSones);
}
return Collections.unmodifiableSet(friendSones);
}
@@
-191,7
+191,7
@@
public class SoneShell extends Sone implements Shell<Sone> {
* {@code false} otherwise
*/
@Override
* {@code false} otherwise
*/
@Override
- public boolean hasFriend
Sone
(Sone friendSone) {
+ public boolean hasFriend(Sone friendSone) {
return friendSones.contains(friendSone);
}
return friendSones.contains(friendSone);
}
@@
-203,7
+203,7
@@
public class SoneShell extends Sone implements Shell<Sone> {
* @return This Sone (for method chaining)
*/
@Override
* @return This Sone (for method chaining)
*/
@Override
- public Sone addFriend
Sone
(Sone friendSone) {
+ public Sone addFriend(Sone friendSone) {
friendSones.add(friendSone);
return this;
}
friendSones.add(friendSone);
return this;
}
@@
-216,7
+216,7
@@
public class SoneShell extends Sone implements Shell<Sone> {
* @return This Sone (for method chaining)
*/
@Override
* @return This Sone (for method chaining)
*/
@Override
- public Sone removeFriend
Sone
(Sone friendSone) {
+ public Sone removeFriend(Sone friendSone) {
friendSones.remove(friendSone);
return this;
}
friendSones.remove(friendSone);
return this;
}
@@
-317,7
+317,7
@@
public class SoneShell extends Sone implements Shell<Sone> {
Sone sone = new Sone(id, name, requestUri);
sone.setProfile(profile);
for (Sone friendSone : friendSones) {
Sone sone = new Sone(id, name, requestUri);
sone.setProfile(profile);
for (Sone friendSone : friendSones) {
- sone.addFriend
Sone
(friendSone);
+ sone.addFriend(friendSone);
}
for (Post post : posts) {
sone.addPost(post);
}
for (Post post : posts) {
sone.addPost(post);
diff --git
a/src/main/java/net/pterodactylus/sone/template/SoneAccessor.java
b/src/main/java/net/pterodactylus/sone/template/SoneAccessor.java
index
bed5771
..
b45e140
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/template/SoneAccessor.java
+++ b/
src/main/java/net/pterodactylus/sone/template/SoneAccessor.java
@@
-52,7
+52,7
@@
public class SoneAccessor extends ReflectionAccessor {
return getNiceName(sone);
} else if (member.equals("isFriend")) {
Sone currentSone = (Sone) dataProvider.getData("currentSone");
return getNiceName(sone);
} else if (member.equals("isFriend")) {
Sone currentSone = (Sone) dataProvider.getData("currentSone");
- return currentSone.hasFriend
Sone
(sone) ? true : null;
+ return currentSone.hasFriend(sone) ? true : null;
} else if (member.equals("isCurrent")) {
Sone currentSone = (Sone) dataProvider.getData("currentSone");
return currentSone.equals(sone);
} else if (member.equals("isCurrent")) {
Sone currentSone = (Sone) dataProvider.getData("currentSone");
return currentSone.equals(sone);
diff --git
a/src/main/java/net/pterodactylus/sone/web/FollowSonePage.java
b/src/main/java/net/pterodactylus/sone/web/FollowSonePage.java
index
39e08f3
..
ba55e23
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/web/FollowSonePage.java
+++ b/
src/main/java/net/pterodactylus/sone/web/FollowSonePage.java
@@
-52,7
+52,7
@@
public class FollowSonePage extends SoneTemplatePage {
Sone currentSone = getCurrentSone(request.getToadletContext());
Sone sone = webInterface.core().getSone(soneId);
if (!(sone instanceof SoneShell) && !sone.equals(currentSone)) {
Sone currentSone = getCurrentSone(request.getToadletContext());
Sone sone = webInterface.core().getSone(soneId);
if (!(sone instanceof SoneShell) && !sone.equals(currentSone)) {
- currentSone.addFriend
Sone
(sone);
+ currentSone.addFriend(sone);
}
throw new RedirectException("viewSone.html?sone=" + soneId);
}
}
throw new RedirectException("viewSone.html?sone=" + soneId);
}
diff --git
a/src/main/java/net/pterodactylus/sone/web/IndexPage.java
b/src/main/java/net/pterodactylus/sone/web/IndexPage.java
index
3965aee
..
47f2715
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/web/IndexPage.java
+++ b/
src/main/java/net/pterodactylus/sone/web/IndexPage.java
@@
-57,7
+57,7
@@
public class IndexPage extends SoneTemplatePage {
Sone sone = getCurrentSone(request.getToadletContext());
List<Post> allPosts = new ArrayList<Post>();
allPosts.addAll(sone.getPosts());
Sone sone = getCurrentSone(request.getToadletContext());
List<Post> allPosts = new ArrayList<Post>();
allPosts.addAll(sone.getPosts());
- for (Sone friendSone : sone.getFriend
Sone
s()) {
+ for (Sone friendSone : sone.getFriends()) {
allPosts.addAll(friendSone.getPosts());
}
Collections.sort(allPosts, new Comparator<Post>() {
allPosts.addAll(friendSone.getPosts());
}
Collections.sort(allPosts, new Comparator<Post>() {