1 package org.apache.archiva.rest.api.model;
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
22 import javax.xml.bind.annotation.XmlRootElement;
23 import java.io.Serializable;
28 @XmlRootElement( name = "managedRepository" )
29 public class ManagedRepository
30 implements Serializable
36 private String location;
38 private String layout;
40 private boolean snapshots = false;
42 private boolean releases = false;
44 private boolean blockRedeployments;
46 private boolean stageRepoNeeded;
48 private String cronExpression;
50 private boolean resetStats;
52 public ManagedRepository()
57 public ManagedRepository( String id, String name, String location, String layout, boolean snapshots, boolean releases,
58 boolean blockRedeployments, boolean stageRepoNeeded, String cronExpression )
62 this.location = location;
64 this.snapshots = snapshots;
65 this.releases = releases;
66 this.blockRedeployments = blockRedeployments;
67 this.stageRepoNeeded = stageRepoNeeded;
68 this.cronExpression = cronExpression;
76 public String getLayout()
81 public String getName()
86 public String getLocation()
92 public boolean isReleases()
100 public boolean isSnapshots()
102 return this.snapshots;
105 public void setId( String id )
110 public void setLayout( String layout )
112 this.layout = layout;
115 public void setName( String name )
120 public void setReleases( boolean releases )
122 this.releases = releases;
125 public void setSnapshots( boolean snapshots )
127 this.snapshots = snapshots;
130 public void setLocation( String location )
132 this.location = location;
135 public boolean isBlockRedeployments()
137 return blockRedeployments;
140 public void setBlockRedeployments( boolean blockRedeployments )
142 this.blockRedeployments = blockRedeployments;
145 public String getCronExpression()
147 return cronExpression;
150 public void setCronExpression( String cronExpression )
152 this.cronExpression = cronExpression;
155 public boolean isStageRepoNeeded()
157 return stageRepoNeeded;
160 public void setStageRepoNeeded( boolean stageRepoNeeded )
162 this.stageRepoNeeded = stageRepoNeeded;
165 public boolean isResetStats()
170 public void setResetStats( boolean resetStats )
172 this.resetStats = resetStats;
175 public int hashCode()
178 result = 37 * result + ( id != null ? id.hashCode() : 0 );
182 public boolean equals( Object other )
189 if ( !( other instanceof ManagedRepository ) )
194 ManagedRepository that = (ManagedRepository) other;
195 boolean result = true;
196 result = result && ( getId() == null ? that.getId() == null : getId().equals( that.getId() ) );
201 public String toString()
203 final StringBuilder sb = new StringBuilder();
204 sb.append( "ManagedRepository" );
205 sb.append( "{id='" ).append( id ).append( '\'' );
206 sb.append( ", name='" ).append( name ).append( '\'' );
207 sb.append( ", location='" ).append( location ).append( '\'' );
208 sb.append( ", layout='" ).append( layout ).append( '\'' );
209 sb.append( ", snapshots=" ).append( snapshots );
210 sb.append( ", releases=" ).append( releases );
211 sb.append( ", blockRedeployments=" ).append( blockRedeployments );
212 sb.append( ", stageRepoNeeded=" ).append( stageRepoNeeded );
213 sb.append( ", cronExpression='" ).append( cronExpression ).append( '\'' );
214 sb.append( ", resetStats=" ).append( resetStats );
216 return sb.toString();