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));
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));
55 }
else if(parent !=
null &&
"/product".equals(parent.getFolderPath())) {
56 Product product =
new FinancialsPU().find(Product.class, Long.valueOf(folder.getFolderLabel()));
58 folder.setFolderLabel(product.getProductCodeStr() +
" - " + StringParser.cutString(product.getDescription(), 50));