BrightSide Workbench Full Report + Source Code
org.turro.financials.attach.AttachProcessor Class Reference
Inheritance diagram for org.turro.financials.attach.AttachProcessor:
Collaboration diagram for org.turro.financials.attach.AttachProcessor:

Public Member Functions

void processFolder (IAttachFolder folder)
 

Detailed Description

Member Function Documentation

◆ processFolder()

void org.turro.financials.attach.AttachProcessor.processFolder ( IAttachFolder  folder)

Implements org.turro.plugin.attach.IAttachProcessor.

Definition at line 37 of file bsfinancials-www/src/main/java/org/turro/financials/attach/AttachProcessor.java.

37  {
38  IAttachFolder parent = folder.getParentFolder();
39  if("/contract".equals(folder.getFolderPath())) {
40  folder.setFolderLabel(I_.get("Contract"));
41  } else if("/document".equals(folder.getFolderPath())) {
42  folder.setFolderLabel(I_.get("Document"));
43  } else if("/product".equals(folder.getFolderPath())) {
44  folder.setFolderLabel(I_.get("Product"));
45  } else if(parent != null && "/contract".equals(parent.getFolderPath())) {
46  Contract contract = new FinancialsPU().find(Contract.class, Long.valueOf(folder.getFolderLabel()));
47  if(contract != null) {
48  folder.setFolderLabel(contract.getId() + " - " + StringParser.cutString(contract.getFullDescription(), 50));
49  }
50  } else if(parent != null && "/document".equals(parent.getFolderPath())) {
51  Document document = new FinancialsPU().find(Document.class, Long.valueOf(folder.getFolderLabel()));
52  if(document != null) {
53  folder.setFolderLabel(StringParser.cutString(new DocumentWrapper(document).getDocDescription(), 50));
54  }
55  } else if(parent != null && "/product".equals(parent.getFolderPath())) {
56  Product product = new FinancialsPU().find(Product.class, Long.valueOf(folder.getFolderLabel()));
57  if(product != null) {
58  folder.setFolderLabel(product.getProductCodeStr() + " - " + StringParser.cutString(product.getDescription(), 50));
59  }
60  }
61  }
Here is the call graph for this function:

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