String senderId = request.getHttpRequest().getPartAsStringFailsafe("sender", 43);
String recipientId = request.getHttpRequest().getPartAsStringFailsafe("recipient", 43);
Sone currentSone = getCurrentSone(request.getToadletContext());
- Sone sender = webInterface.getCore().getLocalSone(senderId, false);
+ Sone sender = webInterface.getCore().getLocalSone(senderId);
if (sender == null) {
sender = currentSone;
}
}
if (text.length() > 0) {
String senderId = request.getHttpRequest().getPartAsStringFailsafe("sender", 43);
- Sone sender = webInterface.getCore().getLocalSone(senderId, false);
+ Sone sender = webInterface.getCore().getLocalSone(senderId);
if (sender == null) {
sender = getCurrentSone(request.getToadletContext());
}
protected void processTemplate(FreenetRequest request, TemplateContext templateContext) throws RedirectException {
super.processTemplate(request, templateContext);
String soneId = request.getHttpRequest().getPartAsStringFailsafe("sone", 44);
- Sone sone = webInterface.getCore().getLocalSone(soneId, false);
+ Sone sone = webInterface.getCore().getLocalSone(soneId);
if (sone != null) {
webInterface.getCore().lockSone(sone);
}
templateContext.set("sones", localSones);
if (request.getMethod() == Method.POST) {
String soneId = request.getHttpRequest().getPartAsStringFailsafe("sone-id", 100);
- Sone selectedSone = webInterface.getCore().getLocalSone(soneId, false);
+ Sone selectedSone = webInterface.getCore().getLocalSone(soneId);
if (selectedSone != null) {
setCurrentSone(request.getToadletContext(), selectedSone);
String target = request.getHttpRequest().getParam("target");
protected void processTemplate(FreenetRequest request, TemplateContext templateContext) throws RedirectException {
super.processTemplate(request, templateContext);
String soneId = request.getHttpRequest().getPartAsStringFailsafe("sone", 44);
- Sone sone = webInterface.getCore().getLocalSone(soneId, false);
+ Sone sone = webInterface.getCore().getLocalSone(soneId);
if (sone != null) {
webInterface.getCore().unlockSone(sone);
}
if (soneId == null) {
return null;
}
- return getCore().getLocalSone(soneId, false);
+ return getCore().getLocalSone(soneId);
}
/**
String recipientId = request.getHttpRequest().getParam("recipient");
Optional<Sone> recipient = webInterface.getCore().getSone(recipientId);
String senderId = request.getHttpRequest().getParam("sender");
- Sone sender = webInterface.getCore().getLocalSone(senderId, false);
+ Sone sender = webInterface.getCore().getLocalSone(senderId);
if (sender == null) {
sender = sone;
}
String postId = request.getHttpRequest().getParam("post");
String text = request.getHttpRequest().getParam("text").trim();
String senderId = request.getHttpRequest().getParam("sender");
- Sone sender = webInterface.getCore().getLocalSone(senderId, false);
+ Sone sender = webInterface.getCore().getLocalSone(senderId);
if (sender == null) {
sender = getCurrentSone(request.getToadletContext());
}
@Override
protected JsonReturnObject createJsonObject(FreenetRequest request) {
String soneId = request.getHttpRequest().getParam("sone");
- Sone sone = webInterface.getCore().getLocalSone(soneId, false);
+ Sone sone = webInterface.getCore().getLocalSone(soneId);
if (sone == null) {
return createErrorJsonObject("invalid-sone-id");
}
@Override
protected JsonReturnObject createJsonObject(FreenetRequest request) {
String soneId = request.getHttpRequest().getParam("sone");
- Sone sone = webInterface.getCore().getLocalSone(soneId, false);
+ Sone sone = webInterface.getCore().getLocalSone(soneId);
if (sone == null) {
return createErrorJsonObject("invalid-sone-id");
}
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.MatcherAssert.assertThat;
-import static org.mockito.Matchers.anyBoolean;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
when(localSone.isLocal()).thenReturn(true);
Core core = mock(Core.class);
when(core.getSone(eq("LocalSone"))).thenReturn(Optional.of(localSone));
- when(core.getLocalSone(eq("LocalSone"), anyBoolean())).thenReturn(localSone);
+ when(core.getLocalSone(eq("LocalSone"))).thenReturn(localSone);
SimpleFieldSet fields = new SimpleFieldSetBuilder().put("Sone", "LocalSone").get();
LockSoneCommand lockSoneCommand = new LockSoneCommand(core);
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.MatcherAssert.assertThat;
-import static org.mockito.Matchers.anyBoolean;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
when(localSone.isLocal()).thenReturn(true);
Core core = mock(Core.class);
when(core.getSone(eq("LocalSone"))).thenReturn(Optional.of(localSone));
- when(core.getLocalSone(eq("LocalSone"), anyBoolean())).thenReturn(localSone);
+ when(core.getLocalSone(eq("LocalSone"))).thenReturn(localSone);
SimpleFieldSet fields = new SimpleFieldSetBuilder().put("Sone", "LocalSone").get();
UnlockSoneCommand unlockSoneCommand = new UnlockSoneCommand(core);