hudson.plugins.jobConfigHistory
Class ConfigInfo

java.lang.Object
  extended by hudson.plugins.jobConfigHistory.ConfigInfo

@ExportedBean(defaultVisibility=999)
public class ConfigInfo
extends Object

Holder object for displaying information.

Author:
Stefan Brausch

Method Summary
static ConfigInfo create(hudson.model.AbstractProject<?,?> job, File file, HistoryDescr histDescr)
          Returns a new ConfigInfo object for a Hudson job.
static ConfigInfo create(String name, File file, HistoryDescr histDescr)
          Returns a new ConfigInfo object for a system configuration file.
 String getDate()
          Returns the date of the change.
 String getFile()
          Returns the URL encoded absolute name of the file.
 boolean getIsJob()
          Returns true if this object represents a Hudson job as opposed to representing a system configuration.
 String getJob()
          Returns the name of the job.
 String getOperation()
          Returns the type of the operation.
 String getUser()
          Returns the display name of the user.
 String getUserID()
          Returns the id of the user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static ConfigInfo create(hudson.model.AbstractProject<?,?> job,
                                File file,
                                HistoryDescr histDescr)
                         throws UnsupportedEncodingException
Returns a new ConfigInfo object for a Hudson job.

Parameters:
job - a project
file - pointing to config.xml
histDescr - metadata of the change
Returns:
a new ConfigInfo object.
Throws:
UnsupportedEncodingException - if UTF-8 is not available (probably a serious error).

create

public static ConfigInfo create(String name,
                                File file,
                                HistoryDescr histDescr)
                         throws UnsupportedEncodingException
Returns a new ConfigInfo object for a system configuration file.

Parameters:
name - Name of the configuration entity we are saving.
file - The file with configuration data.
histDescr - metadata of the change.
Returns:
a new ConfigInfo object.
Throws:
UnsupportedEncodingException - if UTF-8 is not available

getUser

@Exported
public String getUser()
Returns the display name of the user.

Returns:
display name

getUserID

@Exported
public String getUserID()
Returns the id of the user.

Returns:
user id

getDate

@Exported
public String getDate()
Returns the date of the change.

Returns:
timestamp in the format of ConfigHistoryListenerHelper#ID_FORMATTER

getFile

@Exported
public String getFile()
Returns the URL encoded absolute name of the file.

Returns:
URL encoded filename

getJob

@Exported
public String getJob()
Returns the name of the job.

Returns:
name of the job

getOperation

@Exported
public String getOperation()
Returns the type of the operation.

Returns:
name of the operation

getIsJob

public boolean getIsJob()
Returns true if this object represents a Hudson job as opposed to representing a system configuration.

Returns:
true if this object stores a Hudson job configuration


Copyright © 2004-2012. All Rights Reserved.