View Javadoc
1   /*
2    Licensed to the Apache Software Foundation (ASF) under one
3    or more contributor license agreements.  See the NOTICE file
4    distributed with this work for additional information
5    regarding copyright ownership.  The ASF licenses this file
6    to you under the Apache License, Version 2.0 (the
7    "License"); you may not use this file except in compliance
8    with the License.  You may obtain a copy of the License at
9    
10       http://www.apache.org/licenses/LICENSE-2.0
11   
12   Unless required by applicable law or agreed to in writing,
13   software distributed under the License is distributed on an
14   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   KIND, either express or implied.  See the License for the
16   specific language governing permissions and limitations
17   under the License.
18   =================== DO NOT EDIT THIS FILE ====================
19   Generated by Modello 2.4.0,
20   any modifications will be overwritten.
21   ==============================================================
22   */
23  
24  package org.apache.maven.artifact.repository.metadata;
25  
26  /**
27   * Snapshot data for the last artifact corresponding to the
28   * SNAPSHOT base version.
29   * 
30   * @version $Revision$ $Date$
31   */
32  @SuppressWarnings( "all" )
33  public class Snapshot
34      implements java.io.Serializable, java.lang.Cloneable
35  {
36  
37        //--------------------------/
38       //- Class/Member Variables -/
39      //--------------------------/
40  
41      /**
42       * The timestamp when this version was deployed. The timestamp
43       * is expressed using UTC in the format yyyyMMdd.HHmmss.
44       */
45      private String timestamp;
46  
47      /**
48       * The incremental build number.
49       */
50      private int buildNumber = 0;
51  
52      /**
53       * Whether to use a local copy instead (with filename that
54       * includes the base version).
55       */
56      private boolean localCopy = false;
57  
58  
59        //-----------/
60       //- Methods -/
61      //-----------/
62  
63      /**
64       * Method clone.
65       * 
66       * @return Snapshot
67       */
68      public Snapshot clone()
69      {
70          try
71          {
72              Snapshot copy = (Snapshot) super.clone();
73  
74              return copy;
75          }
76          catch ( java.lang.Exception ex )
77          {
78              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
79                  + " does not support clone()" ).initCause( ex );
80          }
81      } //-- Snapshot clone()
82  
83      /**
84       * Get the incremental build number.
85       * 
86       * @return int
87       */
88      public int getBuildNumber()
89      {
90          return this.buildNumber;
91      } //-- int getBuildNumber()
92  
93      /**
94       * Get the timestamp when this version was deployed. The
95       * timestamp is expressed using UTC in the format
96       * yyyyMMdd.HHmmss.
97       * 
98       * @return String
99       */
100     public String getTimestamp()
101     {
102         return this.timestamp;
103     } //-- String getTimestamp()
104 
105     /**
106      * Get whether to use a local copy instead (with filename that
107      * includes the base version).
108      * 
109      * @return boolean
110      */
111     public boolean isLocalCopy()
112     {
113         return this.localCopy;
114     } //-- boolean isLocalCopy()
115 
116     /**
117      * Set the incremental build number.
118      * 
119      * @param buildNumber a buildNumber object.
120      */
121     public void setBuildNumber( int buildNumber )
122     {
123         this.buildNumber = buildNumber;
124     } //-- void setBuildNumber( int )
125 
126     /**
127      * Set whether to use a local copy instead (with filename that
128      * includes the base version).
129      * 
130      * @param localCopy a localCopy object.
131      */
132     public void setLocalCopy( boolean localCopy )
133     {
134         this.localCopy = localCopy;
135     } //-- void setLocalCopy( boolean )
136 
137     /**
138      * Set the timestamp when this version was deployed. The
139      * timestamp is expressed using UTC in the format
140      * yyyyMMdd.HHmmss.
141      * 
142      * @param timestamp a timestamp object.
143      */
144     public void setTimestamp( String timestamp )
145     {
146         this.timestamp = timestamp;
147     } //-- void setTimestamp( String )
148 
149 }