19 package org.turro.file.zul.repository;
22 import org.turro.string.Strings;
23 import org.turro.elephant.context.Application;
24 import org.turro.elephant.context.ElephantContext;
25 import org.turro.file.zul.control.FileResults;
26 import org.turro.file.zul.navigator.FileNavigatorListener;
27 import org.turro.i18n.I_;
28 import org.zkoss.zk.ui.ext.AfterCompose;
29 import org.zkoss.zul.Tree;
30 import org.zkoss.zul.Treechildren;
38 public static final String
40 REPOSITORY_PUBLICATION =
"/_internal/UserFiles",
41 REPOSITORY_PUBLISHABLE =
"/_internal/files";
43 private Treechildren children;
56 this.results = results;
64 this.fileListener = listener;
68 if(Strings.isBlank(path))
return;
69 if(
"*".equals(path)) {
78 private void addFolder(String name, File file, String path) {
79 children = getTreechildren();
80 if(children ==
null) {
81 children =
new Treechildren();
82 appendChild(children);
84 children.appendChild(
new RepositoryItem(file, name, path));
95 for(Object o : getItems()) {
107 for(Object o : getItems()) {
118 if(children !=
null) children.getChildren().clear();
122 for(Object o : children.getChildren()) {
boolean isInRole(String role)
static Application getApplication()
static String getRealPath(String path)
RepositoryItem selectFirst()
void setResults(FileResults results)
void setPath(String path)
FileNavigatorListener getFileListener()
void setSelectedFolder(RepositoryItem folder)
RepositoryItem getSelectedFolder()
static final String REPOSITORY_DIR
void setFileListener(FileNavigatorListener listener)
static String get(String msg)