11-20-2011 10:14 AM
Is it possible do define contribution (to an extension point) as Java class? As i understand, XML contribution config is converted to an instance of java class with Xmap.
For example: when contributing to WebLayoutManager's "layouts" ext. point, xml config is Xmap-ed to an instance of the "LayoutDescriptor" class. Can I instantiate LayoutDescriptor object, configure it and deploy it to nuxeo?
I'd feel much more comfortable with java instead of xml (I am well aware of nuxeo studio, I still want my java editor).
Thanks.
11-21-2011 04:20 AM
There is no problem to contribute with your java code. This exactly what does the Nuxeo Runtime at the server start and for the hot reload. When the Nuxeo Runtime detect the WebLayoutManager declaration, it instantiates this service and store it into a Map. When a contribution is detected, the Nuxeo Runtime get the service from the map and call the method registerContribution
To register your layout, it will be painful to create the contribution object. So I think the better way is to call the registerLayout method that get a LayoutDefinition as parameter.
But I'm not sure your code will be more readable with that.
After I don't know when and how activate this contribution.
I need to check my eclipse 🙂
11-21-2011 04:20 AM
There is no problem to contribute with your java code. This exactly what does the Nuxeo Runtime at the server start and for the hot reload. When the Nuxeo Runtime detect the WebLayoutManager declaration, it instantiates this service and store it into a Map. When a contribution is detected, the Nuxeo Runtime get the service from the map and call the method registerContribution
To register your layout, it will be painful to create the contribution object. So I think the better way is to call the registerLayout method that get a LayoutDefinition as parameter.
But I'm not sure your code will be more readable with that.
After I don't know when and how activate this contribution.
I need to check my eclipse 🙂
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.