use of io.milton.http.values.HrefList in project lobcder by skoulouzis.
the class WebDataResource method getPrincipalCollectionHrefs.
@Override
public HrefList getPrincipalCollectionHrefs() {
HrefList list = new HrefList();
list.add("");
return list;
}
use of io.milton.http.values.HrefList in project lobcder by skoulouzis.
the class AnnoPrincipalResource method getCalendarHomeSet.
@Override
public HrefList getCalendarHomeSet() {
try {
HrefList list = new HrefList();
for (Resource r : getChildren()) {
if (r instanceof AnnoCollectionResource) {
AnnoCollectionResource col = (AnnoCollectionResource) r;
if (annoFactory.calendarsAnnotationHandler.hasCalendars(col.getSource())) {
list.add(col.getHref());
}
}
}
if (list.isEmpty()) {
ResourceList topDirs = getChildren().getDirs();
if (topDirs.isEmpty()) {
log.warn("Could not find any calendar home directories for user type: " + getSource().getClass() + ". In fact there are no child diretories at all!");
} else {
log.warn("Could not find any calendar home directories for user type: " + getSource().getClass() + " You should have a @" + Calendars.class + " annotation on one of the following methods");
for (Resource r : topDirs) {
if (r instanceof AnnoCollectionResource) {
AnnoCollectionResource col = (AnnoCollectionResource) r;
List<ControllerMethod> candMethods = annoFactory.calendarsAnnotationHandler.getMethods(col.getSource().getClass());
if (candMethods.isEmpty()) {
log.info(" - inspecting: " + col.getName() + " for source: " + col.getSource().getClass() + " - has NO child methods");
} else {
log.info(" - inspecting: " + col.getName() + " for source: " + col.getSource().getClass());
for (ControllerMethod cm : candMethods) {
log.warn(" - candidate method: " + cm.controller.getClass() + "::" + cm.method.getName());
}
}
} else {
log.warn(" - found a directory which is not a AnnoCollectionResource: " + r.getClass() + " which cannot be inspected");
}
}
}
}
return list;
} catch (NotAuthorizedException e) {
throw new RuntimeException(e);
} catch (BadRequestException e) {
throw new RuntimeException(e);
}
}
use of io.milton.http.values.HrefList in project lobcder by skoulouzis.
the class AnnoResource method getPrincipalCollectionHrefs.
@Override
public HrefList getPrincipalCollectionHrefs() {
List<AnnoCollectionResource> list = annoFactory.usersAnnotationHandler.findUsersCollections(getRoot());
HrefList l = new HrefList();
for (AnnoCollectionResource col : list) {
l.add(col.getHref());
}
return l;
}
Aggregations