This project has retired. For details please refer to its Attic page.
ApplicationRuntimeInfo xref
View Javadoc
1   package org.apache.archiva.web.model;
2   /*
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
10   *
11   *   http://www.apache.org/licenses/LICENSE-2.0
12   *
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
18   * under the License.
19   */
20  
21  import javax.xml.bind.annotation.XmlRootElement;
22  import java.io.Serializable;
23  import java.util.Calendar;
24  
25  /**
26   * @author Olivier Lamy
27   * @since 1.4-M3
28   */
29  @XmlRootElement(name = "applicationRuntimeInfo")
30  public class ApplicationRuntimeInfo
31      implements Serializable
32  {
33      private boolean devMode = false;
34  
35      private boolean javascriptLog = false;
36  
37      private String version;
38  
39      private String buildNumber;
40  
41      private long timestamp;
42  
43      private String copyrightRange;
44  
45      private boolean logMissingI18n;
46  
47      private String baseUrl;
48  
49      private String timestampStr;
50  
51      private CookieInformation cookieInformation;
52  
53      public ApplicationRuntimeInfo()
54      {
55          this.devMode = Boolean.getBoolean( "archiva.devMode" );
56  
57          this.javascriptLog = Boolean.getBoolean( "archiva.javascriptLog" );
58  
59          this.logMissingI18n = Boolean.getBoolean( "archiva.logMissingI18n" );
60  
61          this.copyrightRange = "2005 - " + Calendar.getInstance().get( Calendar.YEAR );
62      }
63  
64      public boolean isDevMode()
65      {
66          return devMode;
67      }
68  
69      public void setDevMode( boolean devMode )
70      {
71          this.devMode = devMode;
72      }
73  
74      public boolean isJavascriptLog()
75      {
76          return javascriptLog;
77      }
78  
79      public void setJavascriptLog( boolean javascriptLog )
80      {
81          this.javascriptLog = javascriptLog;
82      }
83  
84      public String getVersion()
85      {
86          return version;
87      }
88  
89      public void setVersion( String version )
90      {
91          this.version = version;
92      }
93  
94      public String getBuildNumber()
95      {
96          return buildNumber;
97      }
98  
99      public void setBuildNumber( String buildNumber )
100     {
101         this.buildNumber = buildNumber;
102     }
103 
104     public long getTimestamp()
105     {
106         return timestamp;
107     }
108 
109     public void setTimestamp( long timestamp )
110     {
111         this.timestamp = timestamp;
112     }
113 
114     public String getCopyrightRange()
115     {
116         return copyrightRange;
117     }
118 
119     public void setCopyrightRange( String copyrightRange )
120     {
121         this.copyrightRange = copyrightRange;
122     }
123 
124     public boolean isLogMissingI18n()
125     {
126         return logMissingI18n;
127     }
128 
129     public void setLogMissingI18n( boolean logMissingI18n )
130     {
131         this.logMissingI18n = logMissingI18n;
132     }
133 
134     public String getBaseUrl()
135     {
136         return baseUrl;
137     }
138 
139     public void setBaseUrl( String baseUrl )
140     {
141         this.baseUrl = baseUrl;
142     }
143 
144     public String getTimestampStr()
145     {
146         return timestampStr;
147     }
148 
149     public void setTimestampStr( String timestampStr )
150     {
151         this.timestampStr = timestampStr;
152     }
153 
154     public CookieInformation getCookieInformation()
155     {
156         return cookieInformation;
157     }
158 
159     public void setCookieInformation( CookieInformation cookieInformation )
160     {
161         this.cookieInformation = cookieInformation;
162     }
163 
164     @Override
165     public String toString()
166     {
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( ", cookieInformation=" ).append( cookieInformation );
179         sb.append( '}' );
180         return sb.toString();
181     }
182 }