BrightSide Workbench Full Report + Source Code
org.turro.file.util.AttachFiles Class Reference

Public Member Functions

void toFolder (Folder folder)
 
void remove ()
 
void removePublishable ()
 
void removePrivate ()
 
List< Document > publishableDocs ()
 
List< Document > privateDocs ()
 

Static Public Member Functions

static Set< String > getAllPublishablePaths (String root)
 
static Set< String > getAllPrivatePaths (String root)
 
static AttachFiles from (String path)
 

Detailed Description

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

Definition at line 36 of file AttachFiles.java.

Member Function Documentation

◆ from()

static AttachFiles org.turro.file.util.AttachFiles.from ( String  path)
static

Definition at line 114 of file AttachFiles.java.

114  {
115  return new AttachFiles(path);
116  }
Here is the caller graph for this function:

◆ getAllPrivatePaths()

static Set<String> org.turro.file.util.AttachFiles.getAllPrivatePaths ( String  root)
static

Definition at line 99 of file AttachFiles.java.

99  {
100  try {
101  Folder folder = AttachFiles.from("/" + root).getPrivateFolder();
102  if(folder.exists()) {
103  return folder.folders().stream()
104  .map(f -> "/" + root + "/" + f.name()).collect(Collectors.toSet());
105  }
106  } catch (IOException ex) {
107  Logger.getLogger(AttachFiles.class.getName()).log(Level.SEVERE, null, ex);
108  }
109  return Collections.EMPTY_SET;
110  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAllPublishablePaths()

static Set<String> org.turro.file.util.AttachFiles.getAllPublishablePaths ( String  root)
static

Definition at line 86 of file AttachFiles.java.

86  {
87  try {
88  Folder folder = AttachFiles.from("/" + root).getPublishableFolder();
89  if(folder.exists()) {
90  return folder.folders().stream()
91  .map(f -> "/" + root + "/" + f.name()).collect(Collectors.toSet());
92  }
93  } catch (IOException ex) {
94  Logger.getLogger(AttachFiles.class.getName()).log(Level.SEVERE, null, ex);
95  }
96  return Collections.EMPTY_SET;
97  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ privateDocs()

List<Document> org.turro.file.util.AttachFiles.privateDocs ( )

Definition at line 65 of file AttachFiles.java.

65  {
66  try {
67  return getPrivateFolder().documents(1000);
68  } catch (IOException ex) {
69  Logger.getLogger(AttachFiles.class.getName()).log(Level.SEVERE, null, ex);
70  }
71  return Collections.EMPTY_LIST;
72  }

◆ publishableDocs()

List<Document> org.turro.file.util.AttachFiles.publishableDocs ( )

Definition at line 56 of file AttachFiles.java.

56  {
57  try {
58  return getPublishableFolder().documents(1000);
59  } catch (IOException ex) {
60  Logger.getLogger(AttachFiles.class.getName()).log(Level.SEVERE, null, ex);
61  }
62  return Collections.EMPTY_LIST;
63  }
Here is the caller graph for this function:

◆ remove()

void org.turro.file.util.AttachFiles.remove ( )

Definition at line 43 of file AttachFiles.java.

Here is the call graph for this function:

◆ removePrivate()

void org.turro.file.util.AttachFiles.removePrivate ( )

Definition at line 52 of file AttachFiles.java.

52  {
53  getPrivateFolder().remove();
54  }
Here is the caller graph for this function:

◆ removePublishable()

void org.turro.file.util.AttachFiles.removePublishable ( )

Definition at line 48 of file AttachFiles.java.

48  {
49  getPublishableFolder().remove();
50  }
Here is the caller graph for this function:

◆ toFolder()

void org.turro.file.util.AttachFiles.toFolder ( Folder  folder)

Definition at line 38 of file AttachFiles.java.

38  {
39  folder.ensure();
40  publishableDocs().forEach(doc -> doc.copyTo(folder));
41  }
List< Document > publishableDocs()
Here is the call graph for this function:

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