}
}
}
if (res instanceof ResFolder) {
ResFolder resFolder = ((ResFolder) res);
List<ResFilter> filters = resFolder.getFilter();
if ((quickID != null && quickID.length() > 0 && reqPath
.equals(new Path(res.getQuickID()).toPortableString()))
|| reqPath.equals(newAliasPath)) {
// check if folder browse allowed???
IResourceVisitController visitController = (IResourceVisitController) threadScope
.get().get(RESPONSE_CUR_VISIT_CTRL);
if (visitController != null
&& !visitController.canBrowseFolder(req)) {
// Buffer the status marking that a folder be found.
threadScope.get().put(RESPONSE_IS_FOLDER, Boolean.TRUE);
return true;
}
File resolvedFolder = null;
// Get file from resolver.
if (res.getResolver() != null)
resolvedFolder = res.getResolver().resolve(req, path,
alias, quickID);
// Case the folder report to large, here create a temporary file
// to store the
// content.
File tmpFile;
FileOutputStream fout;
try {
tmpFile = File.createTempFile("FolderRep"
+ Thread.currentThread().getId(), "tmp");
fout = new FileOutputStream(tmpFile);
PrintWriter writer = new PrintWriter(new BufferedWriter(
new OutputStreamWriter(fout, TEXT_CHARSET)));
List<BaseResource> subReses = resFolder.getResources();
if (subReses.size() > 0) {
for (BaseResource r : subReses) {
String childAlias = r.getAlias();
if (childAlias == null)
childAlias = r.getPath();