use of org.olat.restapi.support.vo.LinkVO in project OpenOLAT by OpenOLAT.
the class CatalogVOFactory method link.
public static CatalogEntryVO link(CatalogEntryVO entryVo, UriInfo uriInfo) {
if (uriInfo != null) {
UriBuilder baseUriBuilder = uriInfo.getBaseUriBuilder();
URI getUri = baseUriBuilder.path("catalog").path(entryVo.getKey().toString()).build();
entryVo.getLink().add(new LinkVO("self", getUri.toString(), ""));
entryVo.getLink().add(new LinkVO("jumpin", Settings.getServerContextPathURI() + "/url/CatalogEntry/" + entryVo.getKey(), ""));
entryVo.getLink().add(new LinkVO("edit", getUri.toString(), ""));
entryVo.getLink().add(new LinkVO("delete", getUri.toString(), ""));
URI childrenUri = baseUriBuilder.path("catalog").path(entryVo.getKey().toString()).path("children").build();
entryVo.getLink().add(new LinkVO("children", childrenUri.toString(), ""));
}
return entryVo;
}
use of org.olat.restapi.support.vo.LinkVO in project openolat by klemens.
the class CatalogVOFactory method link.
public static CatalogEntryVO link(CatalogEntryVO entryVo, UriInfo uriInfo) {
if (uriInfo != null) {
UriBuilder baseUriBuilder = uriInfo.getBaseUriBuilder();
URI getUri = baseUriBuilder.path("catalog").path(entryVo.getKey().toString()).build();
entryVo.getLink().add(new LinkVO("self", getUri.toString(), ""));
entryVo.getLink().add(new LinkVO("jumpin", Settings.getServerContextPathURI() + "/url/CatalogEntry/" + entryVo.getKey(), ""));
entryVo.getLink().add(new LinkVO("edit", getUri.toString(), ""));
entryVo.getLink().add(new LinkVO("delete", getUri.toString(), ""));
URI childrenUri = baseUriBuilder.path("catalog").path(entryVo.getKey().toString()).path("children").build();
entryVo.getLink().add(new LinkVO("children", childrenUri.toString(), ""));
}
return entryVo;
}
Aggregations