Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
jenkins
提交
9c197b24
J
jenkins
项目概览
xxadev
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jenkins
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9c197b24
编写于
4月 01, 2012
作者:
V
Vojtech Juranek
浏览文件
操作
浏览文件
下载
差异文件
Merge pull421
Conflicts: changelog.html
上级
85e13303
19865f36
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
57 addition
and
1 deletion
+57
-1
changelog.html
changelog.html
+3
-1
core/src/main/java/hudson/model/AbstractBuild.java
core/src/main/java/hudson/model/AbstractBuild.java
+20
-0
core/src/main/java/hudson/model/TransientBuildActionFactory.java
...c/main/java/hudson/model/TransientBuildActionFactory.java
+34
-0
未找到文件。
changelog.html
浏览文件 @
9c197b24
...
@@ -67,7 +67,9 @@ Upcoming changes</a>
...
@@ -67,7 +67,9 @@ Upcoming changes</a>
<li
class=
rfe
>
<li
class=
rfe
>
Added the View.READ permission to control visibility of views, and updated the default implementation to hide empty views.
Added the View.READ permission to control visibility of views, and updated the default implementation to hide empty views.
(
<a
href=
"https://issues.jenkins-ci.org/browse/JENKINS-3681"
>
issue 3681
</a>
)
(
<a
href=
"https://issues.jenkins-ci.org/browse/JENKINS-3681"
>
issue 3681
</a>
)
<li
class=
rfe
>
Added new extension point for transient build actions.
(
<a
href=
"https://github.com/jenkinsci/jenkins/pull/421"
>
pull 421
</a>
)
</ul>
</ul>
</div>
<!--=TRUNK-END=-->
</div>
<!--=TRUNK-END=-->
...
...
core/src/main/java/hudson/model/AbstractBuild.java
浏览文件 @
9c197b24
...
@@ -87,6 +87,7 @@ import java.util.Iterator;
...
@@ -87,6 +87,7 @@ import java.util.Iterator;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.Set
;
import
java.util.Vector
;
import
java.util.logging.Level
;
import
java.util.logging.Level
;
import
java.util.logging.Logger
;
import
java.util.logging.Logger
;
...
@@ -882,6 +883,25 @@ public abstract class AbstractBuild<P extends AbstractProject<P,R>,R extends Abs
...
@@ -882,6 +883,25 @@ public abstract class AbstractBuild<P extends AbstractProject<P,R>,R extends Abs
public
Calendar
due
()
{
public
Calendar
due
()
{
return
getTimestamp
();
return
getTimestamp
();
}
}
/**
* Add all transient action for this build
*
*/
protected
List
<
Action
>
createTransientActions
()
{
Vector
<
Action
>
ta
=
new
Vector
<
Action
>();
for
(
TransientBuildActionFactory
tpaf
:
TransientBuildActionFactory
.
all
())
ta
.
addAll
(
Util
.
fixNull
(
tpaf
.
createFor
(
this
)));
return
ta
;
}
@Override
public
synchronized
List
<
Action
>
getActions
()
{
List
<
Action
>
actions
=
new
Vector
<
Action
>(
super
.
getActions
());
//add transient actions too
actions
.
addAll
(
createTransientActions
());
return
actions
;
}
/**
/**
* Builds up a set of variable names that contain sensitive values that
* Builds up a set of variable names that contain sensitive values that
...
...
core/src/main/java/hudson/model/TransientBuildActionFactory.java
0 → 100644
浏览文件 @
9c197b24
package
hudson.model
;
import
hudson.Extension
;
import
hudson.ExtensionList
;
import
hudson.ExtensionPoint
;
import
jenkins.model.Jenkins
;
import
java.util.Collection
;
/**
* Extension point for inserting transient {@link Action}s into {@link AbstractBuild}s.
*
* To register your implementation, put {@link Extension} on your subtype.
*
* @author Lucie Votypkova
* @since 1.458
* @see Action
*/
public
abstract
class
TransientBuildActionFactory
implements
ExtensionPoint
{
/**
* Creates actions for the given build.
*
* @param project for which the action objects are requested. Never null.
* @return Can be empty but must not be null.
*/
public
abstract
Collection
<?
extends
Action
>
createFor
(
AbstractBuild
target
);
/**
* Returns all the registered {@link TransientBuildActionFactory}s.
*/
public
static
ExtensionList
<
TransientBuildActionFactory
>
all
()
{
return
Jenkins
.
getInstance
().
getExtensionList
(
TransientBuildActionFactory
.
class
);
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录