001    // =================== DO NOT EDIT THIS FILE ====================
002    // Generated by Modello 1.7,
003    // any modifications will be overwritten.
004    // ==============================================================
005    
006    package org.apache.archiva.configuration;
007    
008    /**
009     * 
010     *         The runtime configuration.
011     *       
012     * 
013     * @version $Revision$ $Date$
014     */
015    @SuppressWarnings( "all" )
016    public class RedbackRuntimeConfiguration
017        implements java.io.Serializable
018    {
019    
020          //--------------------------/
021         //- Class/Member Variables -/
022        //--------------------------/
023    
024        /**
025         * flag to know if redback configuration has been
026         * checked/migrated.
027         */
028        private boolean migratedFromRedbackConfiguration = false;
029    
030        /**
031         * Field userManagerImpls.
032         */
033        private java.util.List<String> userManagerImpls;
034    
035        /**
036         * Field rbacManagerImpls.
037         */
038        private java.util.List<String> rbacManagerImpls;
039    
040        /**
041         * the ldap configuration.
042         */
043        private LdapConfiguration ldapConfiguration;
044    
045        /**
046         * Field ldapGroupMappings.
047         */
048        private java.util.List<LdapGroupMapping> ldapGroupMappings;
049    
050        /**
051         * Field configurationProperties.
052         */
053        private java.util.Map configurationProperties;
054    
055        /**
056         * flag to know if redback will use a cache to prevent
057         * searching users already found.
058         */
059        private boolean useUsersCache = true;
060    
061        /**
062         * the users cache configuration.
063         */
064        private CacheConfiguration usersCacheConfiguration;
065    
066    
067          //-----------/
068         //- Methods -/
069        //-----------/
070    
071        /**
072         * Method addConfigurationProperty.
073         * 
074         * @param key
075         * @param value
076         */
077        public void addConfigurationProperty( Object key, String value )
078        {
079            getConfigurationProperties().put( key, value );
080        } //-- void addConfigurationProperty( Object, String )
081    
082        /**
083         * Method addLdapGroupMapping.
084         * 
085         * @param ldapGroupMapping
086         */
087        public void addLdapGroupMapping( LdapGroupMapping ldapGroupMapping )
088        {
089            getLdapGroupMappings().add( ldapGroupMapping );
090        } //-- void addLdapGroupMapping( LdapGroupMapping )
091    
092        /**
093         * Method addRbacManagerImpl.
094         * 
095         * @param string
096         */
097        public void addRbacManagerImpl( String string )
098        {
099            getRbacManagerImpls().add( string );
100        } //-- void addRbacManagerImpl( String )
101    
102        /**
103         * Method addUserManagerImpl.
104         * 
105         * @param string
106         */
107        public void addUserManagerImpl( String string )
108        {
109            getUserManagerImpls().add( string );
110        } //-- void addUserManagerImpl( String )
111    
112        /**
113         * Method getConfigurationProperties.
114         * 
115         * @return Map
116         */
117        public java.util.Map getConfigurationProperties()
118        {
119            if ( this.configurationProperties == null )
120            {
121                this.configurationProperties = new java.util.HashMap();
122            }
123    
124            return this.configurationProperties;
125        } //-- java.util.Map getConfigurationProperties()
126    
127        /**
128         * Get the ldap configuration.
129         * 
130         * @return LdapConfiguration
131         */
132        public LdapConfiguration getLdapConfiguration()
133        {
134            return this.ldapConfiguration;
135        } //-- LdapConfiguration getLdapConfiguration()
136    
137        /**
138         * Method getLdapGroupMappings.
139         * 
140         * @return List
141         */
142        public java.util.List<LdapGroupMapping> getLdapGroupMappings()
143        {
144            if ( this.ldapGroupMappings == null )
145            {
146                this.ldapGroupMappings = new java.util.ArrayList<LdapGroupMapping>();
147            }
148    
149            return this.ldapGroupMappings;
150        } //-- java.util.List<LdapGroupMapping> getLdapGroupMappings()
151    
152        /**
153         * Method getRbacManagerImpls.
154         * 
155         * @return List
156         */
157        public java.util.List<String> getRbacManagerImpls()
158        {
159            if ( this.rbacManagerImpls == null )
160            {
161                this.rbacManagerImpls = new java.util.ArrayList<String>();
162            }
163    
164            return this.rbacManagerImpls;
165        } //-- java.util.List<String> getRbacManagerImpls()
166    
167        /**
168         * Method getUserManagerImpls.
169         * 
170         * @return List
171         */
172        public java.util.List<String> getUserManagerImpls()
173        {
174            if ( this.userManagerImpls == null )
175            {
176                this.userManagerImpls = new java.util.ArrayList<String>();
177            }
178    
179            return this.userManagerImpls;
180        } //-- java.util.List<String> getUserManagerImpls()
181    
182        /**
183         * Get the users cache configuration.
184         * 
185         * @return CacheConfiguration
186         */
187        public CacheConfiguration getUsersCacheConfiguration()
188        {
189            return this.usersCacheConfiguration;
190        } //-- CacheConfiguration getUsersCacheConfiguration()
191    
192        /**
193         * Get flag to know if redback configuration has been
194         * checked/migrated.
195         * 
196         * @return boolean
197         */
198        public boolean isMigratedFromRedbackConfiguration()
199        {
200            return this.migratedFromRedbackConfiguration;
201        } //-- boolean isMigratedFromRedbackConfiguration()
202    
203        /**
204         * Get flag to know if redback will use a cache to prevent
205         * searching users already found.
206         * 
207         * @return boolean
208         */
209        public boolean isUseUsersCache()
210        {
211            return this.useUsersCache;
212        } //-- boolean isUseUsersCache()
213    
214        /**
215         * Method removeLdapGroupMapping.
216         * 
217         * @param ldapGroupMapping
218         */
219        public void removeLdapGroupMapping( LdapGroupMapping ldapGroupMapping )
220        {
221            getLdapGroupMappings().remove( ldapGroupMapping );
222        } //-- void removeLdapGroupMapping( LdapGroupMapping )
223    
224        /**
225         * Method removeRbacManagerImpl.
226         * 
227         * @param string
228         */
229        public void removeRbacManagerImpl( String string )
230        {
231            getRbacManagerImpls().remove( string );
232        } //-- void removeRbacManagerImpl( String )
233    
234        /**
235         * Method removeUserManagerImpl.
236         * 
237         * @param string
238         */
239        public void removeUserManagerImpl( String string )
240        {
241            getUserManagerImpls().remove( string );
242        } //-- void removeUserManagerImpl( String )
243    
244        /**
245         * Set extra properties for redback configuration.
246         * String/String.
247         * 
248         * @param configurationProperties
249         */
250        public void setConfigurationProperties( java.util.Map configurationProperties )
251        {
252            this.configurationProperties = configurationProperties;
253        } //-- void setConfigurationProperties( java.util.Map )
254    
255        /**
256         * Set the ldap configuration.
257         * 
258         * @param ldapConfiguration
259         */
260        public void setLdapConfiguration( LdapConfiguration ldapConfiguration )
261        {
262            this.ldapConfiguration = ldapConfiguration;
263        } //-- void setLdapConfiguration( LdapConfiguration )
264    
265        /**
266         * Set ldapGroupMappings.
267         * 
268         * @param ldapGroupMappings
269         */
270        public void setLdapGroupMappings( java.util.List<LdapGroupMapping> ldapGroupMappings )
271        {
272            this.ldapGroupMappings = ldapGroupMappings;
273        } //-- void setLdapGroupMappings( java.util.List )
274    
275        /**
276         * Set flag to know if redback configuration has been
277         * checked/migrated.
278         * 
279         * @param migratedFromRedbackConfiguration
280         */
281        public void setMigratedFromRedbackConfiguration( boolean migratedFromRedbackConfiguration )
282        {
283            this.migratedFromRedbackConfiguration = migratedFromRedbackConfiguration;
284        } //-- void setMigratedFromRedbackConfiguration( boolean )
285    
286        /**
287         * Set the RBAC Manager impls to use.
288         * 
289         * @param rbacManagerImpls
290         */
291        public void setRbacManagerImpls( java.util.List<String> rbacManagerImpls )
292        {
293            this.rbacManagerImpls = rbacManagerImpls;
294        } //-- void setRbacManagerImpls( java.util.List )
295    
296        /**
297         * Set flag to know if redback will use a cache to prevent
298         * searching users already found.
299         * 
300         * @param useUsersCache
301         */
302        public void setUseUsersCache( boolean useUsersCache )
303        {
304            this.useUsersCache = useUsersCache;
305        } //-- void setUseUsersCache( boolean )
306    
307        /**
308         * Set the user manager impls to use.
309         * 
310         * @param userManagerImpls
311         */
312        public void setUserManagerImpls( java.util.List<String> userManagerImpls )
313        {
314            this.userManagerImpls = userManagerImpls;
315        } //-- void setUserManagerImpls( java.util.List )
316    
317        /**
318         * Set the users cache configuration.
319         * 
320         * @param usersCacheConfiguration
321         */
322        public void setUsersCacheConfiguration( CacheConfiguration usersCacheConfiguration )
323        {
324            this.usersCacheConfiguration = usersCacheConfiguration;
325        } //-- void setUsersCacheConfiguration( CacheConfiguration )
326    
327    }