if (Parameters.SERVLET_NAME.DISPATCH.equals(visibility)) {
LOGGER.info("no visibility found in url");
ModuleDescriptorDao dao = WOJServer.getInstance().getDataService().getModuleDescriptorDao();
md = dao.getModuleDescriptor(org, mod, rev, uak.getUserId(), uak.getGroups());
if (md == null) {
throw new UnknwownContentException(visibility+"/"+org+"/"+mod+"/"+rev+"/"+path);
}
v = md.getVisibility();
} else {
v = Visibility.fromString(visibility);
}
if (v == Visibility.PRIVATE) {
ServletHelper.ensureCurrentRequestEncrypted(uak, visibility+"/"+org+"/"+mod+"/"+rev+"/"+path);
}
Long accessorId = null;
boolean hasSources = true;
boolean hasJavadoc = true;
if (md != null || !Visibility.PUBLIC.equals(v)) {
if (md == null) {
ModuleDescriptorDao dao= WOJServer.getInstance().getDataService().getModuleDescriptorDao();
md = dao.getModuleDescriptor(org, mod, rev, uak.getUserId(), uak.getGroups(), v);
}
// look for accessor id
if (md == null) {
throw new UnknwownContentException(visibility+"/"+org+"/"+mod+"/"+rev+"/"+path);
} else {
accessorId = md.getAccessorId();
hasSources = md.hasSources();
hasJavadoc = md.hasJavadoc();
}