1 package org.apache.archiva.rest.api.model; 2 /* 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 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 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 18 * under the License. 19 */ 20 21 /** 22 * @author Olivier Lamy 23 * @since 1.4-M4 24 */ 25 public class AbstractImplementationInformation 26 { 27 28 private String beanId; 29 30 private String descriptionKey; 31 32 private boolean readOnly; 33 34 public AbstractImplementationInformation() 35 { 36 // no op 37 } 38 39 public AbstractImplementationInformation( String beanId, String descriptionKey, boolean readOnly ) 40 { 41 this.beanId = beanId; 42 this.descriptionKey = descriptionKey; 43 this.readOnly = readOnly; 44 } 45 46 47 public String getBeanId() 48 { 49 return beanId; 50 } 51 52 public void setBeanId( String beanId ) 53 { 54 this.beanId = beanId; 55 } 56 57 public String getDescriptionKey() 58 { 59 return descriptionKey; 60 } 61 62 public void setDescriptionKey( String descriptionKey ) 63 { 64 this.descriptionKey = descriptionKey; 65 } 66 67 public boolean isReadOnly() 68 { 69 return readOnly; 70 } 71 72 public void setReadOnly( boolean readOnly ) 73 { 74 this.readOnly = readOnly; 75 } 76 77 @Override 78 public String toString() 79 { 80 final StringBuilder sb = new StringBuilder(); 81 sb.append( "UserManagerImplementationInformation" ); 82 sb.append( "{beanId='" ).append( beanId ).append( '\'' ); 83 sb.append( ", descriptionKey='" ).append( descriptionKey ).append( '\'' ); 84 sb.append( '}' ); 85 return sb.toString(); 86 } 87 88 @Override 89 public boolean equals( Object o ) 90 { 91 if ( this == o ) 92 { 93 return true; 94 } 95 if ( !( o instanceof AbstractImplementationInformation ) ) 96 { 97 return false; 98 } 99 100 AbstractImplementationInformationche/archiva/rest/api/model/AbstractImplementationInformation.html#AbstractImplementationInformation">AbstractImplementationInformation that = (AbstractImplementationInformation) o; 101 102 if ( !beanId.equals( that.beanId ) ) 103 { 104 return false; 105 } 106 107 return true; 108 } 109 110 @Override 111 public int hashCode() 112 { 113 return beanId.hashCode(); 114 } 115 116 }