You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AbstractImplementationInformation.java 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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. * @author Olivier Lamy
  22. * @since 1.4-M4
  23. */
  24. public class AbstractImplementationInformation
  25. {
  26. private String beanId;
  27. private String descriptionKey;
  28. private boolean readOnly;
  29. public AbstractImplementationInformation()
  30. {
  31. // no op
  32. }
  33. public AbstractImplementationInformation( String beanId, String descriptionKey, boolean readOnly )
  34. {
  35. this.beanId = beanId;
  36. this.descriptionKey = descriptionKey;
  37. this.readOnly = readOnly;
  38. }
  39. public String getBeanId()
  40. {
  41. return beanId;
  42. }
  43. public void setBeanId( String beanId )
  44. {
  45. this.beanId = beanId;
  46. }
  47. public String getDescriptionKey()
  48. {
  49. return descriptionKey;
  50. }
  51. public void setDescriptionKey( String descriptionKey )
  52. {
  53. this.descriptionKey = descriptionKey;
  54. }
  55. public boolean isReadOnly()
  56. {
  57. return readOnly;
  58. }
  59. public void setReadOnly( boolean readOnly )
  60. {
  61. this.readOnly = readOnly;
  62. }
  63. @Override
  64. public String toString()
  65. {
  66. final StringBuilder sb = new StringBuilder();
  67. sb.append( "UserManagerImplementationInformation" );
  68. sb.append( "{beanId='" ).append( beanId ).append( '\'' );
  69. sb.append( ", descriptionKey='" ).append( descriptionKey ).append( '\'' );
  70. sb.append( '}' );
  71. return sb.toString();
  72. }
  73. @Override
  74. public boolean equals( Object o )
  75. {
  76. if ( this == o )
  77. {
  78. return true;
  79. }
  80. if ( !( o instanceof AbstractImplementationInformation ) )
  81. {
  82. return false;
  83. }
  84. AbstractImplementationInformation that = (AbstractImplementationInformation) o;
  85. if ( !beanId.equals( that.beanId ) )
  86. {
  87. return false;
  88. }
  89. return true;
  90. }
  91. @Override
  92. public int hashCode()
  93. {
  94. return beanId.hashCode();
  95. }
  96. }