BrightSide Workbench Full Report + Source Code
org.turro.file.zul.tree.MyDocumentsTree Class Reference
Inheritance diagram for org.turro.file.zul.tree.MyDocumentsTree:
Collaboration diagram for org.turro.file.zul.tree.MyDocumentsTree:

Public Member Functions

 MyDocumentsTree ()
 
void afterCompose ()
 
void uploadDone (FileItem file)
 
void downloadDone (FileItem file)
 
void deleteDone (FileItem file)
 
- Public Member Functions inherited from org.turro.file.zul.tree.FileTree
 FileTree ()
 
 FileTree (String title)
 
void initTreeColumns (List< FileColumn > fileColumns)
 
FileFilter getFileFilter ()
 
void setFileFilter (FileFilter fileFilter)
 
FileListener getFileListener ()
 
void setFileListener (FileListener listener)
 
String getRole ()
 
void setRole (String role)
 
boolean isInRole (String role)
 
Menupopup getActionMenu ()
 
void setAddToolbar (boolean addToolbar)
 
FileItem addFolder (String label, String path)
 
List< FileColumngetColumns ()
 
File getSelectedFile ()
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 34 of file MyDocumentsTree.java.

Constructor & Destructor Documentation

◆ MyDocumentsTree()

org.turro.file.zul.tree.MyDocumentsTree.MyDocumentsTree ( )

Definition at line 36 of file MyDocumentsTree.java.

36  {
37  super(I_.get("My documents"));
38  setFileFilter(new HiddenFilter());
39  }
void setFileFilter(FileFilter fileFilter)
Here is the call graph for this function:

Member Function Documentation

◆ afterCompose()

void org.turro.file.zul.tree.MyDocumentsTree.afterCompose ( )

Definition at line 42 of file MyDocumentsTree.java.

42  {
43  initTreeColumns(createFileColumns());
44  IContact contact = Authentication.getIContact();
45  if(contact != null) {
46  File myDocs = new File(ElephantContext.getRealPath("/WEB-INF/mydocuments") + "/" + contact.getId());
47  if(!myDocs.exists()) myDocs.mkdirs();
48  addFolder(I_.get("My documents"), myDocs.getAbsolutePath());
49  String dirs = contact.getCommentValue("#dir");
50  if(dirs != null) {
51  for(String dir : dirs.split(",")) {
52  File dirFile = new File(dir);
53  if(dirFile.exists() && dirFile.getAbsolutePath().startsWith("/home/")) {
54  addFolder(dirFile.getName(), dirFile.getAbsolutePath());
55  }
56  }
57  }
58  }
59  }
void initTreeColumns(List< FileColumn > fileColumns)
FileItem addFolder(String label, String path)
Here is the call graph for this function:

◆ deleteDone()

void org.turro.file.zul.tree.MyDocumentsTree.deleteDone ( FileItem  file)

Implements org.turro.file.zul.tree.FileListener.

Definition at line 70 of file MyDocumentsTree.java.

70  {
71  }

◆ downloadDone()

void org.turro.file.zul.tree.MyDocumentsTree.downloadDone ( FileItem  file)

Implements org.turro.file.zul.tree.FileListener.

Definition at line 66 of file MyDocumentsTree.java.

66  {
67  }

◆ uploadDone()

void org.turro.file.zul.tree.MyDocumentsTree.uploadDone ( FileItem  file)

Implements org.turro.file.zul.tree.FileListener.

Definition at line 62 of file MyDocumentsTree.java.

62  {
63  }

The documentation for this class was generated from the following file: