Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
jenkins
提交
d0d5ea3b
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,发现更多精彩内容 >>
提交
d0d5ea3b
编写于
6月 14, 2011
作者:
B
Ben Lau
提交者:
Kohsuke Kawaguchi
6月 15, 2011
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[FIXED JENKINS-5577] added a 'Text Parameter' capability
上级
ea9ddafa
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
344 addition
and
0 deletion
+344
-0
core/src/main/java/hudson/model/TextParameterDefinition.java
core/src/main/java/hudson/model/TextParameterDefinition.java
+95
-0
core/src/main/resources/hudson/model/Messages.properties
core/src/main/resources/hudson/model/Messages.properties
+1
-0
core/src/main/resources/hudson/model/TextParameterDefinition/config.jelly
...sources/hudson/model/TextParameterDefinition/config.jelly
+36
-0
core/src/main/resources/hudson/model/TextParameterDefinition/config_da.properties
...hudson/model/TextParameterDefinition/config_da.properties
+25
-0
core/src/main/resources/hudson/model/TextParameterDefinition/config_de.properties
...hudson/model/TextParameterDefinition/config_de.properties
+3
-0
core/src/main/resources/hudson/model/TextParameterDefinition/config_es.properties
...hudson/model/TextParameterDefinition/config_es.properties
+25
-0
core/src/main/resources/hudson/model/TextParameterDefinition/config_fr.properties
...hudson/model/TextParameterDefinition/config_fr.properties
+26
-0
core/src/main/resources/hudson/model/TextParameterDefinition/config_ja.properties
...hudson/model/TextParameterDefinition/config_ja.properties
+25
-0
core/src/main/resources/hudson/model/TextParameterDefinition/config_pt_BR.properties
...son/model/TextParameterDefinition/config_pt_BR.properties
+25
-0
core/src/main/resources/hudson/model/TextParameterDefinition/config_ru.properties
...hudson/model/TextParameterDefinition/config_ru.properties
+25
-0
core/src/main/resources/hudson/model/TextParameterDefinition/config_zh_TW.properties
...son/model/TextParameterDefinition/config_zh_TW.properties
+25
-0
core/src/main/resources/hudson/model/TextParameterDefinition/index.jelly
...esources/hudson/model/TextParameterDefinition/index.jelly
+33
-0
未找到文件。
core/src/main/java/hudson/model/TextParameterDefinition.java
0 → 100644
浏览文件 @
d0d5ea3b
/*
* The MIT License
*
* Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Luca Domenico Milanesio, Seiji Sogabe, Tom Huybrechts
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package
hudson.model
;
import
hudson.Extension
;
import
net.sf.json.JSONObject
;
import
org.kohsuke.stapler.DataBoundConstructor
;
import
org.kohsuke.stapler.StaplerRequest
;
/**
* Parameter whose value is a string value.
*/
public
class
TextParameterDefinition
extends
SimpleParameterDefinition
{
private
String
defaultValue
;
@DataBoundConstructor
public
TextParameterDefinition
(
String
name
,
String
defaultValue
,
String
description
)
{
super
(
name
,
description
);
this
.
defaultValue
=
defaultValue
;
}
public
TextParameterDefinition
(
String
name
,
String
defaultValue
)
{
this
(
name
,
defaultValue
,
null
);
}
@Override
public
ParameterDefinition
copyWithDefaultValue
(
ParameterValue
defaultValue
)
{
if
(
defaultValue
instanceof
StringParameterValue
)
{
StringParameterValue
value
=
(
StringParameterValue
)
defaultValue
;
return
new
TextParameterDefinition
(
getName
(),
value
.
value
,
getDescription
());
}
else
{
return
this
;
}
}
public
String
getDefaultValue
()
{
return
defaultValue
;
}
public
void
setDefaultValue
(
String
defaultValue
)
{
this
.
defaultValue
=
defaultValue
;
}
@Override
public
StringParameterValue
getDefaultParameterValue
()
{
StringParameterValue
v
=
new
StringParameterValue
(
getName
(),
defaultValue
,
getDescription
());
return
v
;
}
@Extension
public
static
class
DescriptorImpl
extends
ParameterDescriptor
{
@Override
public
String
getDisplayName
()
{
return
Messages
.
TextParameterDefinition_DisplayName
();
}
@Override
public
String
getHelpFile
()
{
return
"/help/parameter/string.html"
;
}
}
@Override
public
ParameterValue
createValue
(
StaplerRequest
req
,
JSONObject
jo
)
{
StringParameterValue
value
=
req
.
bindJSON
(
StringParameterValue
.
class
,
jo
);
value
.
setDescription
(
getDescription
());
return
value
;
}
public
ParameterValue
createValue
(
String
value
)
{
return
new
StringParameterValue
(
getName
(),
value
,
getDescription
());
}
}
core/src/main/resources/hudson/model/Messages.properties
浏览文件 @
d0d5ea3b
...
...
@@ -266,6 +266,7 @@ Permalink.LastFailedBuild=Last failed build
ParameterAction.DisplayName
=
Parameters
ParametersDefinitionProperty.DisplayName
=
Parameters
StringParameterDefinition.DisplayName
=
String Parameter
TextParameterDefinition.DisplayName
=
Text Parameter
FileParameterDefinition.DisplayName
=
File Parameter
BooleanParameterDefinition.DisplayName
=
Boolean Value
ChoiceParameterDefinition.DisplayName
=
Choice
...
...
core/src/main/resources/hudson/model/TextParameterDefinition/config.jelly
0 → 100644
浏览文件 @
d0d5ea3b
<?xml version="1.0"?>
<!--
The MIT License
Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe, Tom Huybrechts
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<?jelly escape-by-default='true'?>
<j:jelly
xmlns:j=
"jelly:core"
xmlns:st=
"jelly:stapler"
xmlns:d=
"jelly:define"
xmlns:l=
"/lib/layout"
xmlns:t=
"/lib/hudson"
xmlns:f=
"/lib/form"
xmlns:i=
"jelly:fmt"
xmlns:p=
"/lib/hudson/project"
>
<f:entry
title=
"${%Name}"
help=
"/help/parameter/name.html"
>
<f:textbox
name=
"parameter.name"
value=
"${instance.name}"
/>
</f:entry>
<f:entry
title=
"${%Default Value}"
help=
"/help/parameter/string-default.html"
>
<f:textarea
name=
"parameter.defaultValue"
value=
"${instance.defaultValue}"
/>
</f:entry>
<f:entry
title=
"${%Description}"
help=
"/help/parameter/description.html"
>
<f:textarea
name=
"parameter.description"
value=
"${instance.description}"
/>
</f:entry>
</j:jelly>
core/src/main/resources/hudson/model/TextParameterDefinition/config_da.properties
0 → 100644
浏览文件 @
d0d5ea3b
# The MIT License
#
# Copyright (c) 2004-2010, Sun Microsystems, Inc. Kohsuke Kawaguchi. Knud Poulsen.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
Name
=
Navn
Default\
Value
=
Standardv
\u
00e6rdi
Description
=
Beskrivelse
core/src/main/resources/hudson/model/TextParameterDefinition/config_de.properties
0 → 100644
浏览文件 @
d0d5ea3b
Name
=
Name
Default\
Value
=
Vorgabewert
Description
=
Beschreibung
core/src/main/resources/hudson/model/TextParameterDefinition/config_es.properties
0 → 100644
浏览文件 @
d0d5ea3b
# The MIT License
#
# Copyright (c) 2004-2010, Sun Microsystems, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
Name
=
Nombre
Default\
Value
=
Valor por defecto
Description
=
Descripción
core/src/main/resources/hudson/model/TextParameterDefinition/config_fr.properties
0 → 100644
浏览文件 @
d0d5ea3b
# The MIT License
#
# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Eric Lefevre-Ardant
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
Name
=
Nom
Default\
Value
=
Valeur par défaut
Description
=
Description
core/src/main/resources/hudson/model/TextParameterDefinition/config_ja.properties
0 → 100644
浏览文件 @
d0d5ea3b
# The MIT License
#
# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
Name
=
\u
540D
\u
524D
Default\
Value
=
\u
30C7
\u
30D5
\u
30A9
\u
30EB
\u
30C8
\u5024
Description
=
\u
8AAC
\u
660E
core/src/main/resources/hudson/model/TextParameterDefinition/config_pt_BR.properties
0 → 100644
浏览文件 @
d0d5ea3b
# The MIT License
#
# Copyright (c) 2004-2010, Sun Microsystems, Inc., Cleiber Silva
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
Name
=
Nome
Default\
Value
=
Valor padr
\u
00e3o
Description
=
Descri
\u
00e7
\u
00e3o
core/src/main/resources/hudson/model/TextParameterDefinition/config_ru.properties
0 → 100644
浏览文件 @
d0d5ea3b
# The MIT License
#
# Copyright (c) 2004-2010, Sun Microsystems, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
Default\
Value
=
\u0417\u
043D
\u0430\u0447\u0435\u
043D
\u0438\u0435
\u
043F
\u
043E-
\u0443\u
043C
\u
043E
\u
043B
\u0447\u0430\u
043D
\u0438\u
044E
Description
=
\u
041E
\u
043F
\u0438\u0441\u0430\u
043D
\u0438\u0435
Name
=
\u0418\u
043C
\u
044F
core/src/main/resources/hudson/model/TextParameterDefinition/config_zh_TW.properties
0 → 100644
浏览文件 @
d0d5ea3b
# The MIT License
#
# Copyright (c) 2004-2010, Sun Microsystems, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
Default\
Value
=
\u9810\u
8A2D
\u
503C
Description
=
\u
63CF
\u
8FF0
Name
=
\u
540D
\u
7A31
core/src/main/resources/hudson/model/TextParameterDefinition/index.jelly
0 → 100644
浏览文件 @
d0d5ea3b
<?xml version="1.0"?>
<!--
The MIT License
Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Tom Huybrechts
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<?jelly escape-by-default='true'?>
<j:jelly
xmlns:j=
"jelly:core"
xmlns:st=
"jelly:stapler"
xmlns:d=
"jelly:define"
xmlns:l=
"/lib/layout"
xmlns:t=
"/lib/hudson"
xmlns:f=
"/lib/form"
xmlns:i=
"jelly:fmt"
xmlns:p=
"/lib/hudson/project"
>
<f:entry
title=
"${it.name}"
description=
"${it.description}"
>
<div
name=
"parameter"
description=
"${it.description}"
>
<input
type=
"hidden"
name=
"name"
value=
"${it.name}"
/>
<f:textarea
name=
"value"
value=
"${it.defaultValue}"
/>
</div>
</f:entry>
</j:jelly>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录