use of org.ovirt.engine.api.model.SpecialObjects in project ovirt-engine by oVirt.
the class BackendApiResource method getGlusterApi.
private Api getGlusterApi() {
Api api = new Api();
api.setTime(DateMapper.map(new Date(), null));
for (DetailedLink detailedLink : getGlusterLinks()) {
// add thin link
api.getLinks().add(LinkCreator.createLink(detailedLink.getHref(), detailedLink.getRel()));
// when required - add extra link for search
if (detailedLink.isSetLinkCapabilities() && detailedLink.getLinkCapabilities().isSetSearchable() && detailedLink.getLinkCapabilities().isSearchable()) {
api.getLinks().add(LinkCreator.createLink(detailedLink.getHref(), detailedLink.getRel(), detailedLink.getRequest().getUrl().getParametersSets()));
}
// add special links
SpecialObjects specialObjects = new SpecialObjects();
specialObjects.setRootTag(createRootTag());
api.setSpecialObjects(specialObjects);
}
return api;
}
use of org.ovirt.engine.api.model.SpecialObjects in project ovirt-engine by oVirt.
the class BackendApiResource method getApi.
private Api getApi() {
Api api = new Api();
api.setTime(DateMapper.map(new Date(), null));
for (DetailedLink detailedLink : getLinks()) {
// add thin link
api.getLinks().add(LinkCreator.createLink(detailedLink.getHref(), detailedLink.getRel()));
// when required - add extra link for search
if (detailedLink.isSetLinkCapabilities() && detailedLink.getLinkCapabilities().isSetSearchable() && detailedLink.getLinkCapabilities().isSearchable()) {
api.getLinks().add(LinkCreator.createLink(detailedLink.getHref(), detailedLink.getRel(), detailedLink.getRequest().getUrl().getParametersSets()));
}
// add special links
SpecialObjects specialObjects = new SpecialObjects();
specialObjects.setBlankTemplate(createBlankTemplate());
specialObjects.setRootTag(createRootTag());
api.setSpecialObjects(specialObjects);
}
return api;
}
Aggregations