use of org.eclipse.ecf.internal.bulletinboard.commons.webapp.GetRequest in project ecf by eclipse.
the class PHPBB method getForums.
public List<IForum> getForums() {
if (cachedForums.isEmpty()) {
GetRequest request = new GetRequest(httpClient, url, "");
try {
request.execute();
String resp = request.getResponseBodyAsString();
request.releaseConnection();
cachedForums = getParser().parseForums(resp);
for (Forum forum : cachedForums.values()) {
forum.setBulletinBoard(this);
}
} catch (IOException e) {
// log.error(e);
}
}
return new ArrayList<IForum>(cachedForums.values());
}
use of org.eclipse.ecf.internal.bulletinboard.commons.webapp.GetRequest in project ecf by eclipse.
the class VBulletin method getForums.
public List<IForum> getForums() throws BBException {
if (cachedForums.isEmpty()) {
GetRequest request = new GetRequest(httpClient, url, "");
try {
request.execute();
String resp = request.getResponseBodyAsString();
request.releaseConnection();
cachedForums = getParser().parseForums(resp);
for (Forum forum : cachedForums.values()) {
forum.setBulletinBoard(this);
}
} catch (IOException e) {
// log.error(e);
}
}
return new ArrayList<IForum>(cachedForums.values());
}
use of org.eclipse.ecf.internal.bulletinboard.commons.webapp.GetRequest in project ecf by eclipse.
the class VBulletin method createMemberPageRequest.
@Override
protected WebRequest createMemberPageRequest(ID id) {
WebRequest request = new GetRequest(httpClient, url, "member.php");
NameValuePair[] params = { new NameValuePair("u", String.valueOf(((MemberID) id).getLongValue())) };
request.setParameters(params);
return request;
}
use of org.eclipse.ecf.internal.bulletinboard.commons.webapp.GetRequest in project ecf by eclipse.
the class VBulletin method getTitle.
public String getTitle() throws BBException {
if (this.title == null) {
GetRequest request = new GetRequest(httpClient, url, "");
String resp = null;
try {
request.execute();
resp = request.getResponseBodyAsString();
} catch (IOException e) {
throw new BBException(e);
}
request.releaseConnection();
if (resp != null) {
this.title = getParser().parseTitle(resp);
}
}
return this.title;
}
Aggregations