}
public String getHtml(String requestPath) throws MalformedURLException,
- IOException, ClassNotFoundException {
+ IOException, ClassNotFoundException {
+
+ if (requestPath == null)
+ requestPath = "";
if (requestPath.equals("/"))
requestPath = "";
requestPath);
layout.init("Photos", context.getLocalPathComponents(), this, context);
- final DirectoryMetadata metadata = getMetadataForPath(requestPath);
+ final DirectoryMetadata directory = getMetadataForPath(requestPath);
- compileHtml(layout, metadata);
+ compileHtml(layout, directory);
- return layout.getHtml(false, false);
+ return layout.getHtml(false, false, directory);
}
public DirectoryMetadata getMetadataForPath(final String requestPath)
// file path
if (picture.getDimensions().equals(desiredDimension))
return context.getGlobalUrl() + context.getLocalUrl() + "/"
- + picture.fileName;
+ + picture.fileName;
final String thumbnailFileName = picture
.getRelativeThumbnailFileName(desiredDimension);
return context.getGlobalUrl() + context.getLocalUrl() + "/"
- + Constants.THUMBNAILS_DIRECTORY_NAME + "/"
- + UrlParamEncoder.encode(thumbnailFileName);
+ + Constants.THUMBNAILS_DIRECTORY_NAME + "/"
+ + UrlParamEncoder.encode(thumbnailFileName);
}
}