001package org.apache.archiva.configuration; 002 003/* 004 * Licensed to the Apache Software Foundation (ASF) under one 005 * or more contributor license agreements. See the NOTICE file 006 * distributed with this work for additional information 007 * regarding copyright ownership. The ASF licenses this file 008 * to you under the Apache License, Version 2.0 (the 009 * "License"); you may not use this file except in compliance 010 * with the License. You may obtain a copy of the License at 011 * 012 * http://www.apache.org/licenses/LICENSE-2.0 013 * 014 * Unless required by applicable law or agreed to in writing, 015 * software distributed under the License is distributed on an 016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 017 * KIND, either express or implied. See the License for the 018 * specific language governing permissions and limitations 019 * under the License. 020 */ 021 022/** 023 * configuration of a LDAP group to Archiva roles. 024 * 025 * @version $Revision$ $Date$ 026 */ 027@SuppressWarnings( "all" ) 028public class LdapGroupMapping 029 implements java.io.Serializable 030{ 031 032 //--------------------------/ 033 //- Class/Member Variables -/ 034 //--------------------------/ 035 036 /** 037 * LDAP Group. 038 */ 039 private String group; 040 041 /** 042 * Field roleNames. 043 */ 044 private java.util.List<String> roleNames; 045 046 047 //-----------/ 048 //- Methods -/ 049 //-----------/ 050 051 /** 052 * Method addRoleName. 053 * 054 * @param string 055 */ 056 public void addRoleName( String string ) 057 { 058 getRoleNames().add( string ); 059 } //-- void addRoleName( String ) 060 061 /** 062 * Get lDAP Group. 063 * 064 * @return String 065 */ 066 public String getGroup() 067 { 068 return this.group; 069 } //-- String getGroup() 070 071 /** 072 * Method getRoleNames. 073 * 074 * @return List 075 */ 076 public java.util.List<String> getRoleNames() 077 { 078 if ( this.roleNames == null ) 079 { 080 this.roleNames = new java.util.ArrayList<String>(); 081 } 082 083 return this.roleNames; 084 } //-- java.util.List<String> getRoleNames() 085 086 /** 087 * Method removeRoleName. 088 * 089 * @param string 090 */ 091 public void removeRoleName( String string ) 092 { 093 getRoleNames().remove( string ); 094 } //-- void removeRoleName( String ) 095 096 /** 097 * Set lDAP Group. 098 * 099 * @param group 100 */ 101 public void setGroup( String group ) 102 { 103 this.group = group; 104 } //-- void setGroup( String ) 105 106 /** 107 * Set archiva roles. 108 * 109 * @param roleNames 110 */ 111 public void setRoleNames( java.util.List<String> roleNames ) 112 { 113 this.roleNames = roleNames; 114 } //-- void setRoleNames( java.util.List ) 115 116}