How to read description attribute of a project area?
11 answers
To access to the description field of a project area, instead getSummary() API, did you try getDetails() API provided by the IDescription interface?
Hi Philippe,
I think your answer is about 1st part of my question. I tried it now. But that method is returning an IContent and I do not know how to get Description attribute of a project area from there.
I need the value as a string.
Plus I need the same thing for client side.
thanks,
Hi bariserdemir,
Hope following code snippets help-
ServerSide:
IContent content = projectArea.getDescription().getDetails();
ByteArrayOutputStream out = new ByteArrayOutputStream();
IContentService cs = getService(IContentService.class);//get IContentService
cs.retrieveContent(content, out);
String description = new String(out.toByteArray(),content.getCharacterEncoding());
code snippet of ClientSide:
ByteArrayOutputStream stream= new ByteArrayOutputStream();
//fTeamRepository: client side team repository
//content: project area description details
//monitor: ProgressMonitor for retrieveConent
fTeamRepository.contentManager().retrieveContent(content, stream, monitor);
page 2of 1 pagesof 2 pages