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.

LdapGroupMapping.java 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. package org.apache.archiva.configuration;
  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. * configuration of a LDAP group to Archiva roles.
  22. *
  23. * @version $Revision$ $Date$
  24. */
  25. @SuppressWarnings( "all" )
  26. public class LdapGroupMapping
  27. implements java.io.Serializable
  28. {
  29. //--------------------------/
  30. //- Class/Member Variables -/
  31. //--------------------------/
  32. /**
  33. * LDAP Group.
  34. */
  35. private String group;
  36. /**
  37. * Field roleNames.
  38. */
  39. private java.util.List<String> roleNames;
  40. //-----------/
  41. //- Methods -/
  42. //-----------/
  43. /**
  44. * Method addRoleName.
  45. *
  46. * @param string
  47. */
  48. public void addRoleName( String string )
  49. {
  50. getRoleNames().add( string );
  51. } //-- void addRoleName( String )
  52. /**
  53. * Get lDAP Group.
  54. *
  55. * @return String
  56. */
  57. public String getGroup()
  58. {
  59. return this.group;
  60. } //-- String getGroup()
  61. /**
  62. * Method getRoleNames.
  63. *
  64. * @return List
  65. */
  66. public java.util.List<String> getRoleNames()
  67. {
  68. if ( this.roleNames == null )
  69. {
  70. this.roleNames = new java.util.ArrayList<String>();
  71. }
  72. return this.roleNames;
  73. } //-- java.util.List<String> getRoleNames()
  74. /**
  75. * Method removeRoleName.
  76. *
  77. * @param string
  78. */
  79. public void removeRoleName( String string )
  80. {
  81. getRoleNames().remove( string );
  82. } //-- void removeRoleName( String )
  83. /**
  84. * Set lDAP Group.
  85. *
  86. * @param group
  87. */
  88. public void setGroup( String group )
  89. {
  90. this.group = group;
  91. } //-- void setGroup( String )
  92. /**
  93. * Set archiva roles.
  94. *
  95. * @param roleNames
  96. */
  97. public void setRoleNames( java.util.List<String> roleNames )
  98. {
  99. this.roleNames = roleNames;
  100. } //-- void setRoleNames( java.util.List )
  101. }