1 package org.apache.archiva.web.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 org.apache.archiva.admin.model.beans.RedbackRuntimeConfiguration;
23 import javax.xml.bind.annotation.XmlRootElement;
24 import java.util.Calendar;
27 * @author Olivier Lamy
30 @XmlRootElement(name = "applicationRuntimeInfo")
31 public class ApplicationRuntimeInfo
33 private boolean devMode = false;
35 private boolean javascriptLog = false;
37 private String version;
39 private String buildNumber;
41 private long timestamp;
43 private String copyrightRange;
45 private boolean logMissingI18n;
47 private String baseUrl;
49 private String timestampStr;
51 private RedbackRuntimeConfiguration redbackRuntimeConfiguration;
53 public ApplicationRuntimeInfo()
55 this.devMode = Boolean.getBoolean( "archiva.devMode" );
57 this.javascriptLog = Boolean.getBoolean( "archiva.javascriptLog" );
59 this.logMissingI18n = Boolean.getBoolean( "archiva.logMissingI18n" );
61 this.copyrightRange = "2005 - " + Calendar.getInstance().get( Calendar.YEAR );
64 public boolean isDevMode()
69 public void setDevMode( boolean devMode )
71 this.devMode = devMode;
74 public boolean isJavascriptLog()
79 public void setJavascriptLog( boolean javascriptLog )
81 this.javascriptLog = javascriptLog;
84 public String getVersion()
89 public void setVersion( String version )
91 this.version = version;
94 public String getBuildNumber()
99 public void setBuildNumber( String buildNumber )
101 this.buildNumber = buildNumber;
104 public long getTimestamp()
109 public void setTimestamp( long timestamp )
111 this.timestamp = timestamp;
114 public String getCopyrightRange()
116 return copyrightRange;
119 public void setCopyrightRange( String copyrightRange )
121 this.copyrightRange = copyrightRange;
124 public boolean isLogMissingI18n()
126 return logMissingI18n;
129 public void setLogMissingI18n( boolean logMissingI18n )
131 this.logMissingI18n = logMissingI18n;
134 public String getBaseUrl()
139 public void setBaseUrl( String baseUrl )
141 this.baseUrl = baseUrl;
144 public String getTimestampStr()
149 public void setTimestampStr( String timestampStr )
151 this.timestampStr = timestampStr;
154 public RedbackRuntimeConfiguration getRedbackRuntimeConfiguration()
156 return redbackRuntimeConfiguration;
159 public void setRedbackRuntimeConfiguration( RedbackRuntimeConfiguration redbackRuntimeConfiguration )
161 this.redbackRuntimeConfiguration = redbackRuntimeConfiguration;
165 public String toString()
167 final StringBuilder sb = new StringBuilder();
168 sb.append( "ApplicationRuntimeInfo" );
169 sb.append( "{devMode=" ).append( devMode );
170 sb.append( ", javascriptLog=" ).append( javascriptLog );
171 sb.append( ", version='" ).append( version ).append( '\'' );
172 sb.append( ", buildNumber='" ).append( buildNumber ).append( '\'' );
173 sb.append( ", timestamp=" ).append( timestamp );
174 sb.append( ", copyrightRange='" ).append( copyrightRange ).append( '\'' );
175 sb.append( ", logMissingI18n=" ).append( logMissingI18n );
176 sb.append( ", baseUrl='" ).append( baseUrl ).append( '\'' );
177 sb.append( ", timestampStr='" ).append( timestampStr ).append( '\'' );
178 sb.append( ", redbackRuntimeConfiguration=" ).append( redbackRuntimeConfiguration );
180 return sb.toString();