Community
Participate
Working Groups
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.
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.
We are past the API freeze. Please file another bug if you are interested in having the schema available as API.
Steffen, I think the DefaultTaskSchema fields should not be static, right?
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?
Reopening to address comment #3.
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.