|
|
@ -99,6 +99,30 @@ public class OssBuilder { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 获取template |
|
|
|
|
|
|
|
* @param code 资源编号 |
|
|
|
|
|
|
|
* @param tenantId 租户ID |
|
|
|
|
|
|
|
* @return 文件对象 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public OssTemplate template(String code, String tenantId) { |
|
|
|
|
|
|
|
Oss oss = getOss(tenantId, code); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
OssContext ossContext = new OssContext(); |
|
|
|
|
|
|
|
ossContext.setOss(oss); |
|
|
|
|
|
|
|
ossContext.setOssProperties(ossProperties); |
|
|
|
|
|
|
|
ossContext.setOssPool(ossPool); |
|
|
|
|
|
|
|
ossContext.setTemplatePool(templatePool); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LiteflowResponse resp = flowExecutor.execute2Resp("ossChain", tenantId, ossContext); |
|
|
|
|
|
|
|
if (resp.isSuccess()) { |
|
|
|
|
|
|
|
OssContext contextBean = resp.getFirstContextBean(); |
|
|
|
|
|
|
|
return contextBean.getOssTemplate(); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
throw new ServiceException("未获取到对应的对象存储配置"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 获取对象存储实体 |
|
|
|
* 获取对象存储实体 |
|
|
|
* |
|
|
|
* |
|
|
|