This project has retired. For details please refer to its Attic page.
Source code
001package org.apache.archiva.rest.api.model;
002/*
003 * Licensed to the Apache Software Foundation (ASF) under one
004 * or more contributor license agreements.  See the NOTICE file
005 * distributed with this work for additional information
006 * regarding copyright ownership.  The ASF licenses this file
007 * to you under the Apache License, Version 2.0 (the
008 * "License"); you may not use this file except in compliance
009 * with the License.  You may obtain a copy of the License at
010 *
011 * http://www.apache.org/licenses/LICENSE-2.0
012 *
013 * Unless required by applicable law or agreed to in writing,
014 * software distributed under the License is distributed on an
015 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
016 * KIND, either express or implied.  See the License for the
017 * specific language governing permissions and limitations
018 * under the License.
019 */
020
021/**
022 * @author Olivier Lamy
023 * @since 1.4-M4
024 */
025public class AbstractImplementationInformation
026{
027
028    private String beanId;
029
030    private String descriptionKey;
031
032    private boolean readOnly;
033
034    public AbstractImplementationInformation()
035    {
036        // no op
037    }
038
039    public AbstractImplementationInformation( String beanId, String descriptionKey, boolean readOnly )
040    {
041        this.beanId = beanId;
042        this.descriptionKey = descriptionKey;
043        this.readOnly = readOnly;
044    }
045
046
047    public String getBeanId()
048    {
049        return beanId;
050    }
051
052    public void setBeanId( String beanId )
053    {
054        this.beanId = beanId;
055    }
056
057    public String getDescriptionKey()
058    {
059        return descriptionKey;
060    }
061
062    public void setDescriptionKey( String descriptionKey )
063    {
064        this.descriptionKey = descriptionKey;
065    }
066
067    public boolean isReadOnly()
068    {
069        return readOnly;
070    }
071
072    public void setReadOnly( boolean readOnly )
073    {
074        this.readOnly = readOnly;
075    }
076
077    @Override
078    public String toString()
079    {
080        final StringBuilder sb = new StringBuilder();
081        sb.append( "UserManagerImplementationInformation" );
082        sb.append( "{beanId='" ).append( beanId ).append( '\'' );
083        sb.append( ", descriptionKey='" ).append( descriptionKey ).append( '\'' );
084        sb.append( '}' );
085        return sb.toString();
086    }
087
088    @Override
089    public boolean equals( Object o )
090    {
091        if ( this == o )
092        {
093            return true;
094        }
095        if ( !( o instanceof AbstractImplementationInformation ) )
096        {
097            return false;
098        }
099
100        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}