It's all about the answers!

Ask a question

difference between 2 methods


Christophe Doré (63) | asked Jun 06 '08, 11:53 a.m.
Hi

I'm supposed to add custom attributes to some Work Items I generate

the question is

what is the difference between

IAttribute createAttribute(IProjectAreaHandle projectArea, String
identifier, String attributeType, String displayName, IProgressMonitor
monitor) throws TeamRepositoryException;

and


IAttribute createNewAttribute(IProjectAreaHandle projectArea, String
identifier, String attributeType, String fullTextKind, IProgressMonitor
monitor) throws TeamRepositoryException;


in com.ibm.team.workitem.common.IWorkItemCommon ?

Regards

--
cd

One answer



permanent link
Patrick Streule (4.9k21) | answered Jun 10 '08, 5:45 a.m.
JAZZ DEVELOPER
what is the difference between

IAttribute createAttribute(IProjectAreaHandle projectArea, String
identifier, String attributeType, String displayName, IProgressMonitor
monitor) throws TeamRepositoryException;

This method creates a new custom attribute and stores it in the
repository. The returned IAttribute is not a working copy and cannot be
modified any further.

IAttribute createNewAttribute(IProjectAreaHandle projectArea, String
identifier, String attributeType, String fullTextKind, IProgressMonitor
monitor) throws TeamRepositoryException;

This method creates a new custom attribute but does not store it yet.
The returned IAttribute is a working copy and can still be modified. You
have to store the attribute yourself using
IWorkItemCommon#saveAttribute(...)

JavaDoc for the Work Item API is available in the latest build and also
covers IWorkItemCommon.

HTH,
Patrick,
Jazz Work Item Team

Your answer


Register or to post your answer.