We define new Governance Registry artifact type, and we want define the field that can upload the attachment, how we can do that? Any example? Thank you
Asked
Active
Viewed 302 times
1 Answers
2
There are 2 types of artifacts in GReg
- Content type (Ex:WSDL,WADL,Swagger,Policy etc...)
- Metadata type (Ex:Restservice, Soapservice, etc...)
I assume that you have created a metadata type rxt which we can not upload the attachment as a field. However you can achieve this by registry associations. Create one metadata type rxt and create a content type rxt to upload the attachment. Then create association between both of them manually. using this link you will have direct link between these two artifact types.
Link to the attachment:
Dependancy graph: this is additional feature that you can visualise your associations.
You can automate this whole process by using registry mediaType handlers. You can find already created handlers from here
Hope this helps.

tk_
- 16,415
- 8
- 80
- 90
-
Thanks for your help, and please visit this link [The architecture we use with DAS and GREG](http://stackoverflow.com/questions/35934015/the-architecture-we-use-with-das-and-greg) – yeahliu Mar 11 '16 at 06:58
-
I think it is better to contact WSO2 directly for above issue. – tk_ Mar 29 '16 at 12:39
-
Hi thusharaK, we upload the file to registry, and we want to get the file in handler, how we can do that? Thanks. – yeahliu Apr 01 '16 at 11:26
-
1Kindly find below sample code. Use the provided sample handler in my answer and extend it to add associations. https://github.com/wso2/carbon-registry/blob/master/components/registry/org.wso2.carbon.registry.extensions/src/main/java/org/wso2/carbon/registry/extensions/handlers/utils/WADLProcessor.java#L220 – tk_ Apr 01 '16 at 11:51