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;
26 @XmlRootElement( name = "remoteRepository" )
27 public class RemoteRepository
28 implements Serializable
36 private String layout;
38 private String userName;
40 private String password;
42 private int timeOut = 60;
44 public RemoteRepository()
49 public RemoteRepository( String id, String name, String url, String layout )
57 public RemoteRepository( String id, String name, String url, String layout, String userName, String password,
60 this( id, name, url, layout );
61 this.userName = userName;
62 this.password = password;
63 this.timeOut = timeOut;
71 public String getLayout()
76 public String getName()
81 public String getUrl()
87 public void setId( String id )
92 public void setLayout( String layout )
97 public void setName( String name )
102 public void setUrl( String url )
108 public int hashCode()
111 result = 37 * result + ( id != null ? id.hashCode() : 0 );
115 public boolean equals( Object other )
122 if ( !( other instanceof RemoteRepository ) )
127 RemoteRepository that = (RemoteRepository) other;
128 boolean result = true;
129 result = result && ( getId() == null ? that.getId() == null : getId().equals( that.getId() ) );
133 public String getUserName()
138 public void setUserName( String userName )
140 this.userName = userName;
143 public String getPassword()
148 public void setPassword( String password )
150 this.password = password;
153 public int getTimeOut()
158 public void setTimeOut( int timeOut )
160 this.timeOut = timeOut;
165 public String toString()
167 final StringBuilder sb = new StringBuilder();
168 sb.append( "RemoteRepository" );
169 sb.append( "{id='" ).append( id ).append( '\'' );
170 sb.append( ", name='" ).append( name ).append( '\'' );
171 sb.append( ", url='" ).append( url ).append( '\'' );
172 sb.append( ", layout='" ).append( layout ).append( '\'' );
173 sb.append( ", userName='" ).append( userName ).append( '\'' );
174 sb.append( ", password='" ).append( password ).append( '\'' );
175 sb.append( ", timeOut=" ).append( timeOut );
177 return sb.toString();