1 package org.apache.archiva.webapp.ui.services.model;
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
21 import javax.xml.bind.annotation.XmlRootElement;
22 import java.util.Calendar;
25 * @author Olivier Lamy
28 @XmlRootElement( name = "applicationRuntimeInfo" )
29 public class ApplicationRuntimeInfo
31 private boolean devMode = false;
33 private boolean javascriptLog = false;
35 private String version;
37 private String buildNumber;
39 private long timestamp;
41 private String copyrightRange;
43 private boolean logMissingI18n;
45 private String baseUrl;
47 private String timestampStr;
49 public ApplicationRuntimeInfo()
51 this.devMode = Boolean.getBoolean( "archiva.devMode" );
53 this.javascriptLog = Boolean.getBoolean( "archiva.javascriptLog" );
55 this.logMissingI18n = Boolean.getBoolean( "archiva.logMissingI18n" );
57 this.copyrightRange = "2005 - " + Calendar.getInstance().get( Calendar.YEAR );
60 public boolean isDevMode()
65 public void setDevMode( boolean devMode )
67 this.devMode = devMode;
70 public boolean isJavascriptLog()
75 public void setJavascriptLog( boolean javascriptLog )
77 this.javascriptLog = javascriptLog;
80 public String getVersion()
85 public void setVersion( String version )
87 this.version = version;
90 public String getBuildNumber()
95 public void setBuildNumber( String buildNumber )
97 this.buildNumber = buildNumber;
100 public long getTimestamp()
105 public void setTimestamp( long timestamp )
107 this.timestamp = timestamp;
110 public String getCopyrightRange()
112 return copyrightRange;
115 public void setCopyrightRange( String copyrightRange )
117 this.copyrightRange = copyrightRange;
120 public boolean isLogMissingI18n()
122 return logMissingI18n;
125 public void setLogMissingI18n( boolean logMissingI18n )
127 this.logMissingI18n = logMissingI18n;
130 public String getBaseUrl()
135 public void setBaseUrl( String baseUrl )
137 this.baseUrl = baseUrl;
140 public String getTimestampStr()
145 public void setTimestampStr( String timestampStr )
147 this.timestampStr = timestampStr;
151 public String toString()
153 final StringBuilder sb = new StringBuilder();
154 sb.append( "ApplicationRuntimeInfo" );
155 sb.append( "{devMode=" ).append( devMode );
156 sb.append( ", javascriptLog=" ).append( javascriptLog );
157 sb.append( ", version='" ).append( version ).append( '\'' );
158 sb.append( ", buildNumber='" ).append( buildNumber ).append( '\'' );
159 sb.append( ", timestamp=" ).append( timestamp );
160 sb.append( ", copyrightRange='" ).append( copyrightRange ).append( '\'' );
161 sb.append( ", logMissingI18n=" ).append( logMissingI18n );
162 sb.append( ", baseUrl='" ).append( baseUrl ).append( '\'' );
163 sb.append( ", timestampStr='" ).append( timestampStr ).append( '\'' );
165 return sb.toString();