mirror of
https://github.com/kekingcn/kkFileView.git
synced 2026-04-20 18:58:38 +00:00
Add workflow bpmn file preview support (#441)
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package cn.keking.service.impl;
|
||||
|
||||
import cn.keking.model.FileAttribute;
|
||||
import cn.keking.service.FilePreview;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
/**
|
||||
* @author kl (http://kailing.pub)
|
||||
* @since 2023/3/9
|
||||
*/
|
||||
@Component
|
||||
public class BpmnFilePreviewImpl implements FilePreview {
|
||||
|
||||
private final CommonPreviewImpl commonPreview;
|
||||
|
||||
public BpmnFilePreviewImpl(CommonPreviewImpl commonPreview) {
|
||||
this.commonPreview = commonPreview;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String filePreviewHandle(String url, Model model, FileAttribute fileAttribute) {
|
||||
commonPreview.filePreviewHandle(url,model,fileAttribute);
|
||||
model.addAttribute("fileName", fileAttribute.getName());
|
||||
return FilePreview.BPMN_FILE_PREVIEW_PAGE;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user