BrightSide Workbench Full Report + Source Code
org.turro.deliverables.model.DeliverablesVM Class Reference

Public Member Functions

void init (@ExecutionArgParam("entityPath") String entityPath)
 
IElephantEntity getIee ()
 
boolean isCanView ()
 
boolean isCanCreate ()
 
void upload (@BindingParam("medias") Media medias[])
 
void download (@BindingParam("document") Document document)
 
void deleteDoc (@BindingParam("document") Document document)
 
List< Document > getModel ()
 

Detailed Description

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

Definition at line 49 of file DeliverablesVM.java.

Member Function Documentation

◆ deleteDoc()

void org.turro.deliverables.model.DeliverablesVM.deleteDoc ( @BindingParam("document") Document  document)

Definition at line 96 of file DeliverablesVM.java.

96  {
97  Messages.confirmDeletion().add(document.name()).show(() -> {
98  document.delete();
99  BindUtils.postNotifyChange(null, null, DeliverablesVM.this, "model");
100  });
101  }
Here is the call graph for this function:

◆ download()

void org.turro.deliverables.model.DeliverablesVM.download ( @BindingParam("document") Document  document)

Definition at line 91 of file DeliverablesVM.java.

91  {
92  new FileWrapper(document.document()).download();
93  }
Here is the call graph for this function:

◆ getIee()

IElephantEntity org.turro.deliverables.model.DeliverablesVM.getIee ( )

Definition at line 67 of file DeliverablesVM.java.

67  {
68  return iee;
69  }

◆ getModel()

List<Document> org.turro.deliverables.model.DeliverablesVM.getModel ( )

Definition at line 103 of file DeliverablesVM.java.

103  {
104  try {
105  Folder folder = iee.getDeliverables();
106  if(folder != null && folder.exists()) return folder.documents();
107  } catch (IOException ex) {
108  Logger.getLogger(DeliverablesVM.class.getName()).log(Level.SEVERE, null, ex);
109  }
110  return Collections.EMPTY_LIST;
111  }
Here is the call graph for this function:

◆ init()

void org.turro.deliverables.model.DeliverablesVM.init ( @ExecutionArgParam("entityPath") String  entityPath)

Definition at line 55 of file DeliverablesVM.java.

55  {
56  if(Strings.isBlank(entityPath)) {
57  entityPath = Executions.getCurrent().getParameter("entityPath");
58  }
59  if(!Strings.isBlank(entityPath)) {
60  iee = Entities.getController(entityPath);
61  } else {
62  iee = Entities.emptyController();
63  }
64  prepareValues();
65  }
IElephantEntity getController(String entityPath)
Here is the call graph for this function:

◆ isCanCreate()

boolean org.turro.deliverables.model.DeliverablesVM.isCanCreate ( )

Definition at line 75 of file DeliverablesVM.java.

75  {
76  return canCreate;
77  }

◆ isCanView()

boolean org.turro.deliverables.model.DeliverablesVM.isCanView ( )

Definition at line 71 of file DeliverablesVM.java.

71  {
72  return canView;
73  }

◆ upload()

void org.turro.deliverables.model.DeliverablesVM.upload ( @BindingParam("medias") Media  medias[])

Definition at line 81 of file DeliverablesVM.java.

81  {
82  Folder folder = iee.getDeliverables();
83  if(folder != null) {
84  for(Media media : medias) {
85  Medias.toFolder(media, folder);
86  }
87  }
88  }
Here is the call graph for this function:

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