Class ServerPluginInfoImpl
- java.lang.Object
-
- jetbrains.buildServer.web.plugins.bean.ServerPluginInfoImpl
-
- All Implemented Interfaces:
PluginInfo
,ServerPluginInfo
,PluginDescriptor
public class ServerPluginInfoImpl extends Object implements ServerPluginInfo
Represents all necessary information on plugin- Author:
- Eugene.Petrenko Date: 16.04.2008
-
-
Field Summary
-
Fields inherited from interface jetbrains.buildServer.web.openapi.PluginDescriptor
PLUGIN_RESOURCES_PATH
-
-
Constructor Summary
Constructors Constructor Description ServerPluginInfoImpl(File root, ServerPluginXml pluginXml, WebPluginResourcePathManager pathHelper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<File>
getAgentParts()
File
getAgentPluginsRoot()
PluginClassLoadingInfo
getClassloadingInfo()
List<PluginDependencyInfo>
getDependencies()
Returns plugin direct dependencies information.String
getParameterValue(String key)
Returns parameter value of parameters that was declared in teamcity-plugin.xml file.Collection<File>
getPluginJars()
String
getPluginName()
Name of plugin.String
getPluginResourcesPath()
returns context path to all plugin resources.String
getPluginResourcesPath(String relativePath)
Returns absolute path without web application context of the resource by plugin relative path.File
getPluginRoot()
Returns plugin base folderFile
getPluginsRoot(String pluginPartName)
String
getPluginVersion()
ServerPluginXml
getPluginXml()
SpringPluginInfo
getSpringPluginInfo()
String
getUUID()
boolean
isNodeResponsibilitiesAware()
boolean
isRuntimeReloadAllowed()
String
toString()
-
-
-
Constructor Detail
-
ServerPluginInfoImpl
public ServerPluginInfoImpl(@NotNull File root, @NotNull ServerPluginXml pluginXml, @NotNull WebPluginResourcePathManager pathHelper)
-
-
Method Detail
-
getPluginRoot
@NotNull public File getPluginRoot()
Description copied from interface:PluginInfo
Returns plugin base folder- Specified by:
getPluginRoot
in interfacePluginDescriptor
- Specified by:
getPluginRoot
in interfacePluginInfo
- Returns:
- path where plugin files are located on the server.
-
getAgentParts
@NotNull public Collection<File> getAgentParts()
- Specified by:
getAgentParts
in interfaceServerPluginInfo
-
getAgentPluginsRoot
@NotNull public File getAgentPluginsRoot()
- Specified by:
getAgentPluginsRoot
in interfaceServerPluginInfo
- Returns:
- directory that contain agent plugins
-
getPluginsRoot
@NotNull public File getPluginsRoot(@NotNull String pluginPartName)
- Specified by:
getPluginsRoot
in interfaceServerPluginInfo
-
getPluginJars
@NotNull public Collection<File> getPluginJars()
- Specified by:
getPluginJars
in interfaceServerPluginInfo
-
getPluginVersion
@Nullable public String getPluginVersion()
- Specified by:
getPluginVersion
in interfacePluginDescriptor
- Specified by:
getPluginVersion
in interfacePluginInfo
- Returns:
- plugin version string as written in teamcity-plugin.xml file or null
-
getParameterValue
public String getParameterValue(@NotNull String key)
Description copied from interface:PluginDescriptor
Returns parameter value of parameters that was declared in teamcity-plugin.xml file.- Specified by:
getParameterValue
in interfacePluginDescriptor
- Parameters:
key
- parameters name- Returns:
- trimmed and xml normalized parameter value if declared or null otherwise
-
getPluginXml
@NotNull public ServerPluginXml getPluginXml()
- Specified by:
getPluginXml
in interfaceServerPluginInfo
-
isNodeResponsibilitiesAware
public boolean isNodeResponsibilitiesAware()
- Specified by:
isNodeResponsibilitiesAware
in interfaceServerPluginInfo
- Returns:
- true if this plugin is aware of node responsibilities and thus can be loaded by secondary nodes
-
getPluginName
@NotNull public String getPluginName()
Description copied from interface:PluginDescriptor
Name of plugin. The name of plugin is taken from it's root folder name- Specified by:
getPluginName
in interfacePluginDescriptor
- Specified by:
getPluginName
in interfacePluginInfo
- Returns:
- name of plugin
-
getPluginResourcesPath
@NotNull public String getPluginResourcesPath()
Description copied from interface:PluginDescriptor
returns context path to all plugin resources.- Specified by:
getPluginResourcesPath
in interfacePluginDescriptor
- Returns:
- plugin resources deployment paths, ends with '/'
-
getPluginResourcesPath
@NotNull public String getPluginResourcesPath(@NotNull String relativePath)
Description copied from interface:PluginDescriptor
Returns absolute path without web application context of the resource by plugin relative path.- Specified by:
getPluginResourcesPath
in interfacePluginDescriptor
- Parameters:
relativePath
- relative path of the file under plugin's "buildServerResources" directory- Returns:
- absolute server path
-
getSpringPluginInfo
public SpringPluginInfo getSpringPluginInfo()
- Specified by:
getSpringPluginInfo
in interfacePluginInfo
- Returns:
- spring context creation info
-
getClassloadingInfo
@NotNull public PluginClassLoadingInfo getClassloadingInfo()
- Specified by:
getClassloadingInfo
in interfacePluginInfo
-
getDependencies
@NotNull public List<PluginDependencyInfo> getDependencies()
Description copied from interface:PluginInfo
Returns plugin direct dependencies information. NOTE: Transitive dependencies not supported.- Specified by:
getDependencies
in interfacePluginInfo
- Returns:
- see above
-
isRuntimeReloadAllowed
public boolean isRuntimeReloadAllowed()
- Specified by:
isRuntimeReloadAllowed
in interfacePluginInfo
- Returns:
- true if this plugin could be unloaded in runtime.
-
getUUID
@NotNull public String getUUID()
- Specified by:
getUUID
in interfacePluginInfo
- Returns:
- UUID of parsed plugin. Is changed after each restart.
-
-