make date format configurable

This commit is contained in:
Sebastian Sdorra
2011-04-05 08:20:55 +02:00
parent 2396430431
commit ef5f68a96c
6 changed files with 194 additions and 10 deletions

View File

@@ -61,6 +61,9 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
public class ScmConfiguration
{
/** Field description */
public static final String DEFAULT_DATEFORMAT = "Y-m-d H:i:s";
/** Field description */
public static final String DEFAULT_PLUGINURL =
"http://plugins.scm-manager.org/scm-plugin-backend/api/{version}/plugins?os={os}&arch={arch}&snapshot=false";
@@ -84,6 +87,7 @@ public class ScmConfiguration
public void load(ScmConfiguration other)
{
this.servername = other.servername;
this.dateFormat = other.dateFormat;
this.pluginUrl = other.pluginUrl;
this.sslPort = other.sslPort;
this.enableSSL = other.enableSSL;
@@ -118,6 +122,17 @@ public class ScmConfiguration
return adminUsers;
}
/**
* Method description
*
*
* @return
*/
public String getDateFormat()
{
return dateFormat;
}
/**
* Method description
*
@@ -230,6 +245,17 @@ public class ScmConfiguration
this.anonymousAccessEnabled = anonymousAccessEnabled;
}
/**
* Method description
*
*
* @param dateFormat
*/
public void setDateFormat(String dateFormat)
{
this.dateFormat = dateFormat;
}
/**
* Method description
*
@@ -327,6 +353,11 @@ public class ScmConfiguration
/** Field description */
private int sslPort = 8181;
/**
* JavaScript date format, see http://jacwright.com/projects/javascript/date_format
*/
private String dateFormat = DEFAULT_DATEFORMAT;
/** Field description */
private boolean anonymousAccessEnabled = false;
}