Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
开发团队
Flowable Engine
提交
0b36679c
F
Flowable Engine
项目概览
开发团队
/
Flowable Engine
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Flowable Engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0b36679c
编写于
10月 25, 2010
作者:
N
nilspreusker
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
added visualization of transformation errors to content-get
上级
014982c5
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
11 addition
and
5 deletion
+11
-5
modules/activiti-webapp-cycle/src/main/webapp/css/activiti-app.css
...ctiviti-webapp-cycle/src/main/webapp/css/activiti-app.css
+1
-1
modules/activiti-webapp-rest/src/main/java/org/activiti/rest/api/cycle/ContentGet.java
...src/main/java/org/activiti/rest/api/cycle/ContentGet.java
+10
-3
modules/activiti-webapp-rest/src/main/java/org/activiti/rest/api/cycle/ContentRepresentationGet.java
...org/activiti/rest/api/cycle/ContentRepresentationGet.java
+0
-1
未找到文件。
modules/activiti-webapp-cycle/src/main/webapp/css/activiti-app.css
浏览文件 @
0b36679c
...
...
@@ -9,4 +9,4 @@ h1 {
color
:
#007dc3
;
}
/* STRUCTURE */
\ No newline at end of file
/* STRUCTURE */
modules/activiti-webapp-rest/src/main/java/org/activiti/rest/api/cycle/ContentGet.java
浏览文件 @
0b36679c
...
...
@@ -12,7 +12,9 @@
*/
package
org.activiti.rest.api.cycle
;
import
java.io.ByteArrayInputStream
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.util.Date
;
import
javax.servlet.http.HttpSession
;
...
...
@@ -22,11 +24,11 @@ import org.activiti.cycle.CycleDefaultMimeType;
import
org.activiti.cycle.CycleService
;
import
org.activiti.cycle.RepositoryArtifact
;
import
org.activiti.cycle.impl.CycleServiceImpl
;
import
org.activiti.cycle.impl.transform.TransformationException
;
import
org.activiti.rest.util.ActivitiRequest
;
import
org.activiti.rest.util.ActivitiStreamingWebScript
;
import
org.springframework.extensions.webscripts.WebScriptResponse
;
/**
*
* @author Nils Preusker (nils.preusker@camunda.com)
...
...
@@ -83,9 +85,14 @@ public class ContentGet extends ActivitiStreamingWebScript {
}
}
InputStream
content
;
try
{
content
=
this
.
cycleService
.
getContent
(
artifact
.
getConnectorId
(),
artifact
.
getNodeId
(),
contentRepresentation
.
getId
()).
asInputStream
();
}
catch
(
TransformationException
e
)
{
content
=
new
ByteArrayInputStream
(
e
.
getRenderContent
().
getBytes
());
}
streamResponse
(
res
,
content
,
new
Date
(
0
),
// TODO: what is a good way to determine the etag? Using a fake one...
streamResponse
(
res
,
this
.
cycleService
.
getContent
(
artifact
.
getConnectorId
(),
artifact
.
getNodeId
(),
contentRepresentation
.
getId
()).
asInputStream
(),
new
Date
(
0
),
"W/\"647-1281077702000\""
,
attach
,
attachmentFileName
,
contentType
);
}
...
...
modules/activiti-webapp-rest/src/main/java/org/activiti/rest/api/cycle/ContentRepresentationGet.java
浏览文件 @
0b36679c
...
...
@@ -86,7 +86,6 @@ public class ContentRepresentationGet extends ActivitiWebScript {
// Show errors that occur during transformations as HTML in the UI
model
.
put
(
"renderInfo"
,
RenderInfo
.
HTML
);
model
.
put
(
"contentRepresentationId"
,
representationId
);
model
.
put
(
"content"
,
e
.
getRenderContent
());
model
.
put
(
"contentType"
,
CycleDefaultMimeType
.
HTML
.
getContentType
());
}
catch
(
Exception
ex
)
{
log
.
log
(
Level
.
WARNING
,
"Exception while loading content representation"
,
ex
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录