This project has retired. For details please refer to its Attic page.
Source code
001package org.apache.archiva.rest.api.model;
002/*
003 * Licensed to the Apache Software Foundation (ASF) under one
004 * or more contributor license agreements.  See the NOTICE file
005 * distributed with this work for additional information
006 * regarding copyright ownership.  The ASF licenses this file
007 * to you under the Apache License, Version 2.0 (the
008 * "License"); you may not use this file except in compliance
009 * with the License.  You may obtain a copy of the License at
010 *
011 *   http://www.apache.org/licenses/LICENSE-2.0
012 *
013 * Unless required by applicable law or agreed to in writing,
014 * software distributed under the License is distributed on an
015 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
016 * KIND, either express or implied.  See the License for the
017 * specific language governing permissions and limitations
018 * under the License.
019 */
020
021import javax.xml.bind.annotation.XmlRootElement;
022import java.io.Serializable;
023import java.util.Date;
024
025/**
026 * @author Olivier Lamy
027 * @since 1.4-M3
028 */
029@XmlRootElement( name = "archivaRepositoryStatistics" )
030public class ArchivaRepositoryStatistics
031    implements Serializable
032{
033    private Date scanEndTime;
034
035    private Date scanStartTime;
036
037    private long totalArtifactCount;
038
039    private long totalArtifactFileSize;
040
041    private long totalFileCount;
042
043    private long totalGroupCount;
044
045    private long totalProjectCount;
046
047    private long newFileCount;
048
049    private long duration;
050
051    private String lastScanDate;
052
053    public ArchivaRepositoryStatistics()
054    {
055        // no op
056    }
057
058    public Date getScanEndTime()
059    {
060        return scanEndTime;
061    }
062
063    public void setScanEndTime( Date scanEndTime )
064    {
065        this.scanEndTime = scanEndTime;
066    }
067
068    public Date getScanStartTime()
069    {
070        return scanStartTime;
071    }
072
073    public void setScanStartTime( Date scanStartTime )
074    {
075        this.scanStartTime = scanStartTime;
076    }
077
078    public long getTotalArtifactCount()
079    {
080        return totalArtifactCount;
081    }
082
083    public void setTotalArtifactCount( long totalArtifactCount )
084    {
085        this.totalArtifactCount = totalArtifactCount;
086    }
087
088    public long getTotalArtifactFileSize()
089    {
090        return totalArtifactFileSize;
091    }
092
093    public void setTotalArtifactFileSize( long totalArtifactFileSize )
094    {
095        this.totalArtifactFileSize = totalArtifactFileSize;
096    }
097
098    public long getTotalFileCount()
099    {
100        return totalFileCount;
101    }
102
103    public void setTotalFileCount( long totalFileCount )
104    {
105        this.totalFileCount = totalFileCount;
106    }
107
108    public long getTotalGroupCount()
109    {
110        return totalGroupCount;
111    }
112
113    public void setTotalGroupCount( long totalGroupCount )
114    {
115        this.totalGroupCount = totalGroupCount;
116    }
117
118    public long getTotalProjectCount()
119    {
120        return totalProjectCount;
121    }
122
123    public void setTotalProjectCount( long totalProjectCount )
124    {
125        this.totalProjectCount = totalProjectCount;
126    }
127
128    public long getNewFileCount()
129    {
130        return newFileCount;
131    }
132
133    public void setNewFileCount( long newFileCount )
134    {
135        this.newFileCount = newFileCount;
136    }
137
138    public void setDuration( long duration )
139    {
140        this.duration = duration;
141    }
142
143    public long getDuration()
144    {
145        return duration;
146    }
147
148    public String getLastScanDate()
149    {
150        return lastScanDate;
151    }
152
153    public void setLastScanDate( String lastScanDate )
154    {
155        this.lastScanDate = lastScanDate;
156    }
157
158    @Override
159    public String toString()
160    {
161        final StringBuilder sb = new StringBuilder();
162        sb.append( "ArchivaRepositoryStatistics" );
163        sb.append( "{scanEndTime=" ).append( scanEndTime );
164        sb.append( ", scanStartTime=" ).append( scanStartTime );
165        sb.append( ", totalArtifactCount=" ).append( totalArtifactCount );
166        sb.append( ", totalArtifactFileSize=" ).append( totalArtifactFileSize );
167        sb.append( ", totalFileCount=" ).append( totalFileCount );
168        sb.append( ", totalGroupCount=" ).append( totalGroupCount );
169        sb.append( ", totalProjectCount=" ).append( totalProjectCount );
170        sb.append( ", newFileCount=" ).append( newFileCount );
171        sb.append( ", duration=" ).append( duration );
172        sb.append( ", lastScanDate='" ).append( lastScanDate ).append( '\'' );
173        sb.append( '}' );
174        return sb.toString();
175    }
176}