1 package org.apache.archiva.admin.model.beans;
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
21 import java.io.Serializable;
24 * @author Olivier Lamy
27 public class AbstractRepository
28 implements Serializable
35 private String layout = "default";
39 private String indexDirectory;
41 public AbstractRepository()
46 public AbstractRepository( String id, String name, String layout )
58 public void setId( String id )
63 public String getName()
68 public void setName( String name )
73 public String getLayout()
78 public void setLayout( String layout )
85 public String getIndexDirectory()
87 return indexDirectory;
90 public void setIndexDirectory( String indexDirectory )
92 this.indexDirectory = indexDirectory;
98 result = 37 * result + ( id != null ? id.hashCode() : 0 );
102 public boolean equals( Object other )
109 if ( !( other instanceof AbstractRepository ) )
114 AbstractRepository that = (AbstractRepository) other;
115 boolean result = true;
116 result = result && ( getId() == null ? that.getId() == null : getId().equals( that.getId() ) );
121 public String toString()
123 final StringBuilder sb = new StringBuilder();
124 sb.append( "AbstractRepository" );
125 sb.append( "{id='" ).append( id ).append( '\'' );
126 sb.append( ", name='" ).append( name ).append( '\'' );
127 sb.append( ", layout='" ).append( layout ).append( '\'' );
128 sb.append( ", indexDirectory='" ).append( indexDirectory ).append( '\'' );
130 return sb.toString();