123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341 |
- package org.apache.archiva.configuration;
-
- /*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
- /**
- *
- * The redback runtime configuration.
- *
- *
- * @version $Revision$ $Date$
- */
- @SuppressWarnings( "all" )
- public class RedbackRuntimeConfiguration
- implements java.io.Serializable
- {
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * flag to know if redback configuration has been
- * checked/migrated.
- */
- private boolean migratedFromRedbackConfiguration = false;
-
- /**
- * Field userManagerImpls.
- */
- private java.util.List<String> userManagerImpls;
-
- /**
- * Field rbacManagerImpls.
- */
- private java.util.List<String> rbacManagerImpls;
-
- /**
- * the ldap configuration.
- */
- private LdapConfiguration ldapConfiguration;
-
- /**
- * Field ldapGroupMappings.
- */
- private java.util.List<LdapGroupMapping> ldapGroupMappings;
-
- /**
- * Field configurationProperties.
- */
- private java.util.Map configurationProperties;
-
- /**
- * flag to know if redback will use a cache to prevent
- * searching users already found.
- */
- private boolean useUsersCache = true;
-
- /**
- * the users cache configuration.
- */
- private CacheConfiguration usersCacheConfiguration;
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- * Method addConfigurationProperty.
- *
- * @param key
- * @param value
- */
- public void addConfigurationProperty( Object key, String value )
- {
- getConfigurationProperties().put( key, value );
- } //-- void addConfigurationProperty( Object, String )
-
- /**
- * Method addLdapGroupMapping.
- *
- * @param ldapGroupMapping
- */
- public void addLdapGroupMapping( LdapGroupMapping ldapGroupMapping )
- {
- getLdapGroupMappings().add( ldapGroupMapping );
- } //-- void addLdapGroupMapping( LdapGroupMapping )
-
- /**
- * Method addRbacManagerImpl.
- *
- * @param string
- */
- public void addRbacManagerImpl( String string )
- {
- getRbacManagerImpls().add( string );
- } //-- void addRbacManagerImpl( String )
-
- /**
- * Method addUserManagerImpl.
- *
- * @param string
- */
- public void addUserManagerImpl( String string )
- {
- getUserManagerImpls().add( string );
- } //-- void addUserManagerImpl( String )
-
- /**
- * Method getConfigurationProperties.
- *
- * @return Map
- */
- public java.util.Map getConfigurationProperties()
- {
- if ( this.configurationProperties == null )
- {
- this.configurationProperties = new java.util.HashMap();
- }
-
- return this.configurationProperties;
- } //-- java.util.Map getConfigurationProperties()
-
- /**
- * Get the ldap configuration.
- *
- * @return LdapConfiguration
- */
- public LdapConfiguration getLdapConfiguration()
- {
- return this.ldapConfiguration;
- } //-- LdapConfiguration getLdapConfiguration()
-
- /**
- * Method getLdapGroupMappings.
- *
- * @return List
- */
- public java.util.List<LdapGroupMapping> getLdapGroupMappings()
- {
- if ( this.ldapGroupMappings == null )
- {
- this.ldapGroupMappings = new java.util.ArrayList<LdapGroupMapping>();
- }
-
- return this.ldapGroupMappings;
- } //-- java.util.List<LdapGroupMapping> getLdapGroupMappings()
-
- /**
- * Method getRbacManagerImpls.
- *
- * @return List
- */
- public java.util.List<String> getRbacManagerImpls()
- {
- if ( this.rbacManagerImpls == null )
- {
- this.rbacManagerImpls = new java.util.ArrayList<String>();
- }
-
- return this.rbacManagerImpls;
- } //-- java.util.List<String> getRbacManagerImpls()
-
- /**
- * Method getUserManagerImpls.
- *
- * @return List
- */
- public java.util.List<String> getUserManagerImpls()
- {
- if ( this.userManagerImpls == null )
- {
- this.userManagerImpls = new java.util.ArrayList<String>();
- }
-
- return this.userManagerImpls;
- } //-- java.util.List<String> getUserManagerImpls()
-
- /**
- * Get the users cache configuration.
- *
- * @return CacheConfiguration
- */
- public CacheConfiguration getUsersCacheConfiguration()
- {
- return this.usersCacheConfiguration;
- } //-- CacheConfiguration getUsersCacheConfiguration()
-
- /**
- * Get flag to know if redback configuration has been
- * checked/migrated.
- *
- * @return boolean
- */
- public boolean isMigratedFromRedbackConfiguration()
- {
- return this.migratedFromRedbackConfiguration;
- } //-- boolean isMigratedFromRedbackConfiguration()
-
- /**
- * Get flag to know if redback will use a cache to prevent
- * searching users already found.
- *
- * @return boolean
- */
- public boolean isUseUsersCache()
- {
- return this.useUsersCache;
- } //-- boolean isUseUsersCache()
-
- /**
- * Method removeLdapGroupMapping.
- *
- * @param ldapGroupMapping
- */
- public void removeLdapGroupMapping( LdapGroupMapping ldapGroupMapping )
- {
- getLdapGroupMappings().remove( ldapGroupMapping );
- } //-- void removeLdapGroupMapping( LdapGroupMapping )
-
- /**
- * Method removeRbacManagerImpl.
- *
- * @param string
- */
- public void removeRbacManagerImpl( String string )
- {
- getRbacManagerImpls().remove( string );
- } //-- void removeRbacManagerImpl( String )
-
- /**
- * Method removeUserManagerImpl.
- *
- * @param string
- */
- public void removeUserManagerImpl( String string )
- {
- getUserManagerImpls().remove( string );
- } //-- void removeUserManagerImpl( String )
-
- /**
- * Set extra properties for redback configuration.
- * String/String.
- *
- * @param configurationProperties
- */
- public void setConfigurationProperties( java.util.Map configurationProperties )
- {
- this.configurationProperties = configurationProperties;
- } //-- void setConfigurationProperties( java.util.Map )
-
- /**
- * Set the ldap configuration.
- *
- * @param ldapConfiguration
- */
- public void setLdapConfiguration( LdapConfiguration ldapConfiguration )
- {
- this.ldapConfiguration = ldapConfiguration;
- } //-- void setLdapConfiguration( LdapConfiguration )
-
- /**
- * Set ldapGroupMappings.
- *
- * @param ldapGroupMappings
- */
- public void setLdapGroupMappings( java.util.List<LdapGroupMapping> ldapGroupMappings )
- {
- this.ldapGroupMappings = ldapGroupMappings;
- } //-- void setLdapGroupMappings( java.util.List )
-
- /**
- * Set flag to know if redback configuration has been
- * checked/migrated.
- *
- * @param migratedFromRedbackConfiguration
- */
- public void setMigratedFromRedbackConfiguration( boolean migratedFromRedbackConfiguration )
- {
- this.migratedFromRedbackConfiguration = migratedFromRedbackConfiguration;
- } //-- void setMigratedFromRedbackConfiguration( boolean )
-
- /**
- * Set the RBAC Manager impls to use.
- *
- * @param rbacManagerImpls
- */
- public void setRbacManagerImpls( java.util.List<String> rbacManagerImpls )
- {
- this.rbacManagerImpls = rbacManagerImpls;
- } //-- void setRbacManagerImpls( java.util.List )
-
- /**
- * Set flag to know if redback will use a cache to prevent
- * searching users already found.
- *
- * @param useUsersCache
- */
- public void setUseUsersCache( boolean useUsersCache )
- {
- this.useUsersCache = useUsersCache;
- } //-- void setUseUsersCache( boolean )
-
- /**
- * Set the user manager impls to use.
- *
- * @param userManagerImpls
- */
- public void setUserManagerImpls( java.util.List<String> userManagerImpls )
- {
- this.userManagerImpls = userManagerImpls;
- } //-- void setUserManagerImpls( java.util.List )
-
- /**
- * Set the users cache configuration.
- *
- * @param usersCacheConfiguration
- */
- public void setUsersCacheConfiguration( CacheConfiguration usersCacheConfiguration )
- {
- this.usersCacheConfiguration = usersCacheConfiguration;
- } //-- void setUsersCacheConfiguration( CacheConfiguration )
-
- }
|