use of org.eclipse.ecf.internal.bulletinboard.commons.webapp.GetRequest in project ecf by eclipse.
the class VBulletin method createMemberGroupListRequest.
@Override
protected WebRequest createMemberGroupListRequest() {
WebRequest request = new GetRequest(httpClient, url, "profile.php");
request.addParameter(new NameValuePair("do", "editusergroups"));
return request;
}
use of org.eclipse.ecf.internal.bulletinboard.commons.webapp.GetRequest in project ecf by eclipse.
the class Forum method getThreads.
public Collection<IThread> getThreads() {
PHPBBParser parser = (PHPBBParser) bb.getParser();
Map<ID, IThread> threadMap = null;
try {
WebRequest request = new GetRequest(bb.getHttpClient(), new URL(id.toExternalForm()), "");
request.addParameter(new NameValuePair("f", String.valueOf(id.getLongValue())));
request.execute();
String resp = request.getResponseBodyAsString();
request.releaseConnection();
threadMap = parser.parseThreads(resp);
for (IThread thread : threadMap.values()) {
((AbstractBBObject) thread).setBulletinBoard(bb);
((Thread) thread).forum = this;
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return new HashSet<IThread>(threadMap.values());
}
use of org.eclipse.ecf.internal.bulletinboard.commons.webapp.GetRequest in project ecf by eclipse.
the class Forum method getThreads.
public Collection<IThread> getThreads() {
VBParser parser = (VBParser) bb.getParser();
Map<ID, IThread> threadMap = null;
WebRequest request = new GetRequest(bb.getHttpClient(), getURL(), "");
request.addParameter(new NameValuePair("f", String.valueOf(id.getLongValue())));
try {
request.execute();
String resp = request.getResponseBodyAsString();
request.releaseConnection();
threadMap = parser.parseThreads(resp);
for (IThread thread : threadMap.values()) {
((AbstractBBObject) thread).setBulletinBoard(bb);
((Thread) thread).forum = this;
}
} catch (IOException e) {
e.printStackTrace();
}
return new HashSet<IThread>(threadMap.values());
}
use of org.eclipse.ecf.internal.bulletinboard.commons.webapp.GetRequest in project ecf by eclipse.
the class PHPBB method createMemberPageRequest.
@Override
protected WebRequest createMemberPageRequest(ID id) {
WebRequest request = new GetRequest(httpClient, url, "profile.php");
NameValuePair[] params = { new NameValuePair("mode", "viewprofile"), 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 PHPBB method getThread.
public IThread getThread(ID id) throws BBException {
GetRequest request = new GetRequest(httpClient, url, "viewtopic.php");
request.addParameter(new NameValuePair("t", String.valueOf(((ThreadID) id).getLongValue())));
String resp = null;
try {
request.execute();
resp = request.getResponseBodyAsString();
} catch (IOException e) {
e.printStackTrace();
}
request.releaseConnection();
if (resp != null) {
Thread t = getParser().parseThreadPageForThreadAttributes(resp);
t.setBulletinBoard(this);
return t;
}
return null;
}
Aggregations