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 layout;
38 private String location;
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,
58 boolean releases, boolean blockRedeployments, boolean stageRepoNeeded,
59 String cronExpression )
63 this.location = location;
65 this.snapshots = snapshots;
66 this.releases = releases;
67 this.blockRedeployments = blockRedeployments;
68 this.stageRepoNeeded = stageRepoNeeded;
69 this.cronExpression = cronExpression;
77 public String getLayout()
82 public String getName()
87 public String getLocation()
93 public boolean isReleases()
101 public boolean isSnapshots()
103 return this.snapshots;
106 public void setId( String id )
111 public void setLayout( String layout )
113 this.layout = layout;
116 public void setName( String name )
121 public void setReleases( boolean releases )
123 this.releases = releases;
126 public void setSnapshots( boolean snapshots )
128 this.snapshots = snapshots;
131 public void setLocation( String location )
133 this.location = location;
136 public boolean isBlockRedeployments()
138 return blockRedeployments;
141 public void setBlockRedeployments( boolean blockRedeployments )
143 this.blockRedeployments = blockRedeployments;
146 public String getCronExpression()
148 return cronExpression;
151 public void setCronExpression( String cronExpression )
153 this.cronExpression = cronExpression;
156 public boolean isStageRepoNeeded()
158 return stageRepoNeeded;
161 public void setStageRepoNeeded( boolean stageRepoNeeded )
163 this.stageRepoNeeded = stageRepoNeeded;
166 public boolean isResetStats()
171 public void setResetStats( boolean resetStats )
173 this.resetStats = resetStats;
176 public int hashCode()
179 result = 37 * result + ( id != null ? id.hashCode() : 0 );
183 public boolean equals( Object other )
190 if ( !( other instanceof ManagedRepository ) )
195 ManagedRepository that = (ManagedRepository) other;
196 boolean result = true;
197 result = result && ( getId() == null ? that.getId() == null : getId().equals( that.getId() ) );
202 public String toString()
204 final StringBuilder sb = new StringBuilder();
205 sb.append( "ManagedRepository" );
206 sb.append( "{id='" ).append( id ).append( '\'' );
207 sb.append( ", name='" ).append( name ).append( '\'' );
208 sb.append( ", location='" ).append( location ).append( '\'' );
209 sb.append( ", layout='" ).append( layout ).append( '\'' );
210 sb.append( ", snapshots=" ).append( snapshots );
211 sb.append( ", releases=" ).append( releases );
212 sb.append( ", blockRedeployments=" ).append( blockRedeployments );
213 sb.append( ", stageRepoNeeded=" ).append( stageRepoNeeded );
214 sb.append( ", cronExpression='" ).append( cronExpression ).append( '\'' );
215 sb.append( ", resetStats=" ).append( resetStats );
217 return sb.toString();