Ori Liel has posted comments on this change.
Change subject: restapi: Return Additional Info For 400 Messages (#867794)
......................................................................
Patch Set 1:
(1 comment)
....................................................
File
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/validation/UsageFinder.java
Line 34: }
Line 35: return null; // should never happen
Line 36: }
Line 37:
Line 38: private RSDL getRSDL(Application application) {
More on this - right now the logic of getting the links ('rels') and activating
the RsdlBuilder resides in BackendApiResource. This class like our other
'resource' classes, undergoes initialization which gives it a state: it has
uriInfo and more stuff injected into it, and it has access to the
sessionHelper, etc - things which are used when constructing the RSDL.
To have a manager for RSDL we would need to similarly inject all this stuff
into it. It's technically viable, but I'm not sure it's worth the hassle. The
way things are now, a resource that wants to access RSDL needs to do inject the
'Application' object, search in it for BackendApiResource, and activate
getRSDL(). If I'd create RsdlManager - it would be the same process, except the
user will search for RsdlManager within the 'Application' object. I don't see a
lot of added value worth the work, what do you think ?
Line 39: for (Object obj : application.getSingletons()) {
Line 40: if (obj instanceof BackendApiResource) {
Line 41: BackendApiResource resource = (BackendApiResource) obj;
Line 42: return resource.getRSDL();
--
To view, visit http://gerrit.ovirt.org/23017
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic7a6da4fbb00ea5f1e6919ddfe21dd7b3dd126fd
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ori Liel <[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Ori Liel <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches