use of io.gravitee.rest.api.portal.rest.model.ApplicationLinks in project gravitee-management-rest-api by gravitee-io.
the class ApplicationMapperTest method testApplicationLinks.
@Test
public void testApplicationLinks() {
String basePath = "/" + APPLICATION;
ApplicationLinks links = applicationMapper.computeApplicationLinks(basePath, null);
assertNotNull(links);
assertEquals(basePath, links.getSelf());
assertEquals(basePath + "/members", links.getMembers());
assertEquals(basePath + "/notifications", links.getNotifications());
assertEquals(basePath + "/picture", links.getPicture());
}
use of io.gravitee.rest.api.portal.rest.model.ApplicationLinks in project gravitee-management-rest-api by gravitee-io.
the class ApplicationMapper method computeApplicationLinks.
public ApplicationLinks computeApplicationLinks(String basePath, OffsetDateTime updateDate) {
ApplicationLinks applicationLinks = new ApplicationLinks();
applicationLinks.setMembers(basePath + "/members");
applicationLinks.setNotifications(basePath + "/notifications");
applicationLinks.setPicture(basePath + "/picture" + (updateDate == null ? "" : "?" + updateDate.hashCode()));
applicationLinks.setBackground(basePath + "/background" + (updateDate == null ? "" : "?" + updateDate.hashCode()));
applicationLinks.setSelf(basePath);
return applicationLinks;
}
Aggregations