1 package org.apache.archiva.admin.repository;
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";
37 public AbstractRepository()
42 public AbstractRepository( String id, String name, String layout )
54 public void setId( String id )
59 public String getName()
64 public void setName( String name )
69 public String getLayout()
74 public void setLayout( String layout )
83 result = 37 * result + ( id != null ? id.hashCode() : 0 );
87 public boolean equals( Object other )
94 if ( !( other instanceof AbstractRepository ) )
99 AbstractRepository that = (AbstractRepository) other;
100 boolean result = true;
101 result = result && ( getId() == null ? that.getId() == null : getId().equals( that.getId() ) );
106 public String toString()
108 final StringBuilder sb = new StringBuilder();
109 sb.append( "AbstractRepository" );
110 sb.append( "{id='" ).append( id ).append( '\'' );
111 sb.append( ", name='" ).append( name ).append( '\'' );
112 sb.append( ", layout='" ).append( layout ).append( '\'' );
114 return sb.toString();