Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337083

Summary: [api] provide an extensible task schema implementation
Product: z_Archived Reporter: Steffen Pingel <steffen.pingel>
Component: MylynAssignee: Steffen Pingel <steffen.pingel>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: b.muskalla, thomas.ehrnhoefer
Version: unspecified   
Target Milestone: 3.5   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Steffen Pingel CLA 2011-02-13 20:04:35 EST
To simplify task schema definitions in connectors the framework should provide an extensible abstract implementation for specifying a schema. Connectors should also have a simple way of inheriting fields from the default task schema.
Comment 1 Steffen Pingel CLA 2011-02-13 20:07:45 EST
I have extracted a simple implementation for defining schemas from DefaultTaskSchema and committed that as AbstractTaskSchema. GerritTaskSchema is an example how that is inteded to be used. Thomas, Benjamin, if you get a chance it would be great if you took a look and let me know if it makes sense to move that into an API package.
Comment 2 Steffen Pingel CLA 2011-03-03 01:42:50 EST
We are past the API freeze. Please file another bug if you are interested in having the schema available as API.
Comment 3 Thomas Ehrnhoefer CLA 2011-03-03 13:05:10 EST
Steffen, I think the DefaultTaskSchema fields should not be static, right?
Comment 4 Thomas Ehrnhoefer CLA 2011-03-04 11:42:19 EST
Also, shouldn't the reporter be read only?

Also, if I want to add to the existing flags (e.g. make a field read only), I would need to call
.inheritFrom(DefaultTaskSchema.USER_REPORTER).flags(Flag.PEOPLE, Flag.READ_ONLY).create();
and thus know what the existing flags are. Do you think an addFlags makes sense?
Comment 5 Steffen Pingel CLA 2011-03-04 15:55:32 EST
Reopening to address comment #3.
Comment 6 Steffen Pingel CLA 2011-03-05 02:16:35 EST
Thanks for the feedback. I have moved this into API since its already being consumed by clients anyways.

(In reply to comment #4)
> Also, shouldn't the reporter be read only?

Fixed.

> Also, if I want to add to the existing flags (e.g. make a field read only), I
> would need to call
> .inheritFrom(DefaultTaskSchema.USER_REPORTER).flags(Flag.PEOPLE,
> Flag.READ_ONLY).create();
> and thus know what the existing flags are. Do you think an addFlags makes sense?

Good idea. I have added a addFlag() and removeFlag() method to modify the list of inherited flags.