use of org.eclipse.ecf.internal.bulletinboard.commons.AbstractBBObject in project ecf by eclipse.
the class MemberGroup method getMembers.
public Collection<IMember> getMembers() {
Map<ID, IMember> map = Collections.emptyMap();
GetRequest request = new GetRequest(bb.getHttpClient(), bb.getURL(), "groupcp.php");
request.addParameter(new NameValuePair("g", String.valueOf(id.getLongValue())));
try {
request.execute();
String str = request.getResponseBodyAsString();
request.releaseConnection();
if (str != null) {
map = bb.getParser().parseMembers(str);
for (IMember member : map.values()) {
((AbstractBBObject) member).setBulletinBoard(bb);
}
}
} catch (IOException e) {
e.printStackTrace();
}
return new HashSet<IMember>(map.values());
}
use of org.eclipse.ecf.internal.bulletinboard.commons.AbstractBBObject 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.AbstractBBObject 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());
}
Aggregations