001// =================== DO NOT EDIT THIS FILE ====================
002// Generated by Modello 1.8.3,
003// any modifications will be overwritten.
004// ==============================================================
005
006package org.apache.maven.settings.io.xpp3;
007
008  //---------------------------------/
009 //- Imported classes and packages -/
010//---------------------------------/
011
012import java.io.OutputStream;
013import java.io.Writer;
014import java.util.Iterator;
015import org.apache.maven.settings.Activation;
016import org.apache.maven.settings.ActivationFile;
017import org.apache.maven.settings.ActivationOS;
018import org.apache.maven.settings.ActivationProperty;
019import org.apache.maven.settings.IdentifiableBase;
020import org.apache.maven.settings.Mirror;
021import org.apache.maven.settings.Profile;
022import org.apache.maven.settings.Proxy;
023import org.apache.maven.settings.Repository;
024import org.apache.maven.settings.RepositoryBase;
025import org.apache.maven.settings.RepositoryPolicy;
026import org.apache.maven.settings.Server;
027import org.apache.maven.settings.Settings;
028import org.apache.maven.settings.TrackableBase;
029import org.codehaus.plexus.util.xml.Xpp3Dom;
030import org.codehaus.plexus.util.xml.pull.MXSerializer;
031import org.codehaus.plexus.util.xml.pull.XmlSerializer;
032
033/**
034 * Class SettingsXpp3Writer.
035 * 
036 * @version $Revision: 965443 $ $Date: 2015-09-14 22:18:52 +0000 (Mon, 14 Sep 2015) $
037 */
038@SuppressWarnings( "all" )
039public class SettingsXpp3Writer
040{
041
042      //--------------------------/
043     //- Class/Member Variables -/
044    //--------------------------/
045
046    /**
047     * Field NAMESPACE.
048     */
049    private static final String NAMESPACE = null;
050
051
052      //-----------/
053     //- Methods -/
054    //-----------/
055
056    /**
057     * Method write.
058     * 
059     * @param writer
060     * @param settings
061     * @throws java.io.IOException
062     */
063    public void write( Writer writer, Settings settings )
064        throws java.io.IOException
065    {
066        XmlSerializer serializer = new MXSerializer();
067        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-indentation", "  " );
068        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-line-separator", "\n" );
069        serializer.setOutput( writer );
070        serializer.startDocument( settings.getModelEncoding(), null );
071        writeSettings( settings, "settings", serializer );
072        serializer.endDocument();
073    } //-- void write( Writer, Settings )
074
075    /**
076     * Method write.
077     * 
078     * @param stream
079     * @param settings
080     * @throws java.io.IOException
081     */
082    public void write( OutputStream stream, Settings settings )
083        throws java.io.IOException
084    {
085        XmlSerializer serializer = new MXSerializer();
086        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-indentation", "  " );
087        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-line-separator", "\n" );
088        serializer.setOutput( stream, settings.getModelEncoding() );
089        serializer.startDocument( settings.getModelEncoding(), null );
090        writeSettings( settings, "settings", serializer );
091        serializer.endDocument();
092    } //-- void write( OutputStream, Settings )
093
094    /**
095     * Method writeActivation.
096     * 
097     * @param activation
098     * @param serializer
099     * @param tagName
100     * @throws java.io.IOException
101     */
102    private void writeActivation( Activation activation, String tagName, XmlSerializer serializer )
103        throws java.io.IOException
104    {
105        serializer.startTag( NAMESPACE, tagName );
106        if ( activation.isActiveByDefault() != false )
107        {
108            serializer.startTag( NAMESPACE, "activeByDefault" ).text( String.valueOf( activation.isActiveByDefault() ) ).endTag( NAMESPACE, "activeByDefault" );
109        }
110        if ( activation.getJdk() != null )
111        {
112            serializer.startTag( NAMESPACE, "jdk" ).text( activation.getJdk() ).endTag( NAMESPACE, "jdk" );
113        }
114        if ( activation.getOs() != null )
115        {
116            writeActivationOS( (ActivationOS) activation.getOs(), "os", serializer );
117        }
118        if ( activation.getProperty() != null )
119        {
120            writeActivationProperty( (ActivationProperty) activation.getProperty(), "property", serializer );
121        }
122        if ( activation.getFile() != null )
123        {
124            writeActivationFile( (ActivationFile) activation.getFile(), "file", serializer );
125        }
126        serializer.endTag( NAMESPACE, tagName );
127    } //-- void writeActivation( Activation, String, XmlSerializer )
128
129    /**
130     * Method writeActivationFile.
131     * 
132     * @param activationFile
133     * @param serializer
134     * @param tagName
135     * @throws java.io.IOException
136     */
137    private void writeActivationFile( ActivationFile activationFile, String tagName, XmlSerializer serializer )
138        throws java.io.IOException
139    {
140        serializer.startTag( NAMESPACE, tagName );
141        if ( activationFile.getMissing() != null )
142        {
143            serializer.startTag( NAMESPACE, "missing" ).text( activationFile.getMissing() ).endTag( NAMESPACE, "missing" );
144        }
145        if ( activationFile.getExists() != null )
146        {
147            serializer.startTag( NAMESPACE, "exists" ).text( activationFile.getExists() ).endTag( NAMESPACE, "exists" );
148        }
149        serializer.endTag( NAMESPACE, tagName );
150    } //-- void writeActivationFile( ActivationFile, String, XmlSerializer )
151
152    /**
153     * Method writeActivationOS.
154     * 
155     * @param activationOS
156     * @param serializer
157     * @param tagName
158     * @throws java.io.IOException
159     */
160    private void writeActivationOS( ActivationOS activationOS, String tagName, XmlSerializer serializer )
161        throws java.io.IOException
162    {
163        serializer.startTag( NAMESPACE, tagName );
164        if ( activationOS.getName() != null )
165        {
166            serializer.startTag( NAMESPACE, "name" ).text( activationOS.getName() ).endTag( NAMESPACE, "name" );
167        }
168        if ( activationOS.getFamily() != null )
169        {
170            serializer.startTag( NAMESPACE, "family" ).text( activationOS.getFamily() ).endTag( NAMESPACE, "family" );
171        }
172        if ( activationOS.getArch() != null )
173        {
174            serializer.startTag( NAMESPACE, "arch" ).text( activationOS.getArch() ).endTag( NAMESPACE, "arch" );
175        }
176        if ( activationOS.getVersion() != null )
177        {
178            serializer.startTag( NAMESPACE, "version" ).text( activationOS.getVersion() ).endTag( NAMESPACE, "version" );
179        }
180        serializer.endTag( NAMESPACE, tagName );
181    } //-- void writeActivationOS( ActivationOS, String, XmlSerializer )
182
183    /**
184     * Method writeActivationProperty.
185     * 
186     * @param activationProperty
187     * @param serializer
188     * @param tagName
189     * @throws java.io.IOException
190     */
191    private void writeActivationProperty( ActivationProperty activationProperty, String tagName, XmlSerializer serializer )
192        throws java.io.IOException
193    {
194        serializer.startTag( NAMESPACE, tagName );
195        if ( activationProperty.getName() != null )
196        {
197            serializer.startTag( NAMESPACE, "name" ).text( activationProperty.getName() ).endTag( NAMESPACE, "name" );
198        }
199        if ( activationProperty.getValue() != null )
200        {
201            serializer.startTag( NAMESPACE, "value" ).text( activationProperty.getValue() ).endTag( NAMESPACE, "value" );
202        }
203        serializer.endTag( NAMESPACE, tagName );
204    } //-- void writeActivationProperty( ActivationProperty, String, XmlSerializer )
205
206    /**
207     * Method writeIdentifiableBase.
208     * 
209     * @param identifiableBase
210     * @param serializer
211     * @param tagName
212     * @throws java.io.IOException
213     */
214    private void writeIdentifiableBase( IdentifiableBase identifiableBase, String tagName, XmlSerializer serializer )
215        throws java.io.IOException
216    {
217        serializer.startTag( NAMESPACE, tagName );
218        if ( ( identifiableBase.getId() != null ) && !identifiableBase.getId().equals( "default" ) )
219        {
220            serializer.startTag( NAMESPACE, "id" ).text( identifiableBase.getId() ).endTag( NAMESPACE, "id" );
221        }
222        serializer.endTag( NAMESPACE, tagName );
223    } //-- void writeIdentifiableBase( IdentifiableBase, String, XmlSerializer )
224
225    /**
226     * Method writeMirror.
227     * 
228     * @param mirror
229     * @param serializer
230     * @param tagName
231     * @throws java.io.IOException
232     */
233    private void writeMirror( Mirror mirror, String tagName, XmlSerializer serializer )
234        throws java.io.IOException
235    {
236        serializer.startTag( NAMESPACE, tagName );
237        if ( mirror.getMirrorOf() != null )
238        {
239            serializer.startTag( NAMESPACE, "mirrorOf" ).text( mirror.getMirrorOf() ).endTag( NAMESPACE, "mirrorOf" );
240        }
241        if ( mirror.getName() != null )
242        {
243            serializer.startTag( NAMESPACE, "name" ).text( mirror.getName() ).endTag( NAMESPACE, "name" );
244        }
245        if ( mirror.getUrl() != null )
246        {
247            serializer.startTag( NAMESPACE, "url" ).text( mirror.getUrl() ).endTag( NAMESPACE, "url" );
248        }
249        if ( ( mirror.getLayout() != null ) && !mirror.getLayout().equals( "default" ) )
250        {
251            serializer.startTag( NAMESPACE, "layout" ).text( mirror.getLayout() ).endTag( NAMESPACE, "layout" );
252        }
253        if ( ( mirror.getMirrorOfLayouts() != null ) && !mirror.getMirrorOfLayouts().equals( "default,legacy" ) )
254        {
255            serializer.startTag( NAMESPACE, "mirrorOfLayouts" ).text( mirror.getMirrorOfLayouts() ).endTag( NAMESPACE, "mirrorOfLayouts" );
256        }
257        if ( ( mirror.getId() != null ) && !mirror.getId().equals( "default" ) )
258        {
259            serializer.startTag( NAMESPACE, "id" ).text( mirror.getId() ).endTag( NAMESPACE, "id" );
260        }
261        serializer.endTag( NAMESPACE, tagName );
262    } //-- void writeMirror( Mirror, String, XmlSerializer )
263
264    /**
265     * Method writeProfile.
266     * 
267     * @param profile
268     * @param serializer
269     * @param tagName
270     * @throws java.io.IOException
271     */
272    private void writeProfile( Profile profile, String tagName, XmlSerializer serializer )
273        throws java.io.IOException
274    {
275        serializer.startTag( NAMESPACE, tagName );
276        if ( profile.getActivation() != null )
277        {
278            writeActivation( (Activation) profile.getActivation(), "activation", serializer );
279        }
280        if ( ( profile.getProperties() != null ) && ( profile.getProperties().size() > 0 ) )
281        {
282            serializer.startTag( NAMESPACE, "properties" );
283            for ( Iterator iter = profile.getProperties().keySet().iterator(); iter.hasNext(); )
284            {
285                String key = (String) iter.next();
286                String value = (String) profile.getProperties().get( key );
287                serializer.startTag( NAMESPACE, "" + key + "" ).text( value ).endTag( NAMESPACE, "" + key + "" );
288            }
289            serializer.endTag( NAMESPACE, "properties" );
290        }
291        if ( ( profile.getRepositories() != null ) && ( profile.getRepositories().size() > 0 ) )
292        {
293            serializer.startTag( NAMESPACE, "repositories" );
294            for ( Iterator iter = profile.getRepositories().iterator(); iter.hasNext(); )
295            {
296                Repository o = (Repository) iter.next();
297                writeRepository( o, "repository", serializer );
298            }
299            serializer.endTag( NAMESPACE, "repositories" );
300        }
301        if ( ( profile.getPluginRepositories() != null ) && ( profile.getPluginRepositories().size() > 0 ) )
302        {
303            serializer.startTag( NAMESPACE, "pluginRepositories" );
304            for ( Iterator iter = profile.getPluginRepositories().iterator(); iter.hasNext(); )
305            {
306                Repository o = (Repository) iter.next();
307                writeRepository( o, "pluginRepository", serializer );
308            }
309            serializer.endTag( NAMESPACE, "pluginRepositories" );
310        }
311        if ( ( profile.getId() != null ) && !profile.getId().equals( "default" ) )
312        {
313            serializer.startTag( NAMESPACE, "id" ).text( profile.getId() ).endTag( NAMESPACE, "id" );
314        }
315        serializer.endTag( NAMESPACE, tagName );
316    } //-- void writeProfile( Profile, String, XmlSerializer )
317
318    /**
319     * Method writeProxy.
320     * 
321     * @param proxy
322     * @param serializer
323     * @param tagName
324     * @throws java.io.IOException
325     */
326    private void writeProxy( Proxy proxy, String tagName, XmlSerializer serializer )
327        throws java.io.IOException
328    {
329        serializer.startTag( NAMESPACE, tagName );
330        if ( proxy.isActive() != true )
331        {
332            serializer.startTag( NAMESPACE, "active" ).text( String.valueOf( proxy.isActive() ) ).endTag( NAMESPACE, "active" );
333        }
334        if ( ( proxy.getProtocol() != null ) && !proxy.getProtocol().equals( "http" ) )
335        {
336            serializer.startTag( NAMESPACE, "protocol" ).text( proxy.getProtocol() ).endTag( NAMESPACE, "protocol" );
337        }
338        if ( proxy.getUsername() != null )
339        {
340            serializer.startTag( NAMESPACE, "username" ).text( proxy.getUsername() ).endTag( NAMESPACE, "username" );
341        }
342        if ( proxy.getPassword() != null )
343        {
344            serializer.startTag( NAMESPACE, "password" ).text( proxy.getPassword() ).endTag( NAMESPACE, "password" );
345        }
346        if ( proxy.getPort() != 8080 )
347        {
348            serializer.startTag( NAMESPACE, "port" ).text( String.valueOf( proxy.getPort() ) ).endTag( NAMESPACE, "port" );
349        }
350        if ( proxy.getHost() != null )
351        {
352            serializer.startTag( NAMESPACE, "host" ).text( proxy.getHost() ).endTag( NAMESPACE, "host" );
353        }
354        if ( proxy.getNonProxyHosts() != null )
355        {
356            serializer.startTag( NAMESPACE, "nonProxyHosts" ).text( proxy.getNonProxyHosts() ).endTag( NAMESPACE, "nonProxyHosts" );
357        }
358        if ( ( proxy.getId() != null ) && !proxy.getId().equals( "default" ) )
359        {
360            serializer.startTag( NAMESPACE, "id" ).text( proxy.getId() ).endTag( NAMESPACE, "id" );
361        }
362        serializer.endTag( NAMESPACE, tagName );
363    } //-- void writeProxy( Proxy, String, XmlSerializer )
364
365    /**
366     * Method writeRepository.
367     * 
368     * @param repository
369     * @param serializer
370     * @param tagName
371     * @throws java.io.IOException
372     */
373    private void writeRepository( Repository repository, String tagName, XmlSerializer serializer )
374        throws java.io.IOException
375    {
376        serializer.startTag( NAMESPACE, tagName );
377        if ( repository.getReleases() != null )
378        {
379            writeRepositoryPolicy( (RepositoryPolicy) repository.getReleases(), "releases", serializer );
380        }
381        if ( repository.getSnapshots() != null )
382        {
383            writeRepositoryPolicy( (RepositoryPolicy) repository.getSnapshots(), "snapshots", serializer );
384        }
385        if ( repository.getId() != null )
386        {
387            serializer.startTag( NAMESPACE, "id" ).text( repository.getId() ).endTag( NAMESPACE, "id" );
388        }
389        if ( repository.getName() != null )
390        {
391            serializer.startTag( NAMESPACE, "name" ).text( repository.getName() ).endTag( NAMESPACE, "name" );
392        }
393        if ( repository.getUrl() != null )
394        {
395            serializer.startTag( NAMESPACE, "url" ).text( repository.getUrl() ).endTag( NAMESPACE, "url" );
396        }
397        if ( ( repository.getLayout() != null ) && !repository.getLayout().equals( "default" ) )
398        {
399            serializer.startTag( NAMESPACE, "layout" ).text( repository.getLayout() ).endTag( NAMESPACE, "layout" );
400        }
401        serializer.endTag( NAMESPACE, tagName );
402    } //-- void writeRepository( Repository, String, XmlSerializer )
403
404    /**
405     * Method writeRepositoryBase.
406     * 
407     * @param repositoryBase
408     * @param serializer
409     * @param tagName
410     * @throws java.io.IOException
411     */
412    private void writeRepositoryBase( RepositoryBase repositoryBase, String tagName, XmlSerializer serializer )
413        throws java.io.IOException
414    {
415        serializer.startTag( NAMESPACE, tagName );
416        if ( repositoryBase.getId() != null )
417        {
418            serializer.startTag( NAMESPACE, "id" ).text( repositoryBase.getId() ).endTag( NAMESPACE, "id" );
419        }
420        if ( repositoryBase.getName() != null )
421        {
422            serializer.startTag( NAMESPACE, "name" ).text( repositoryBase.getName() ).endTag( NAMESPACE, "name" );
423        }
424        if ( repositoryBase.getUrl() != null )
425        {
426            serializer.startTag( NAMESPACE, "url" ).text( repositoryBase.getUrl() ).endTag( NAMESPACE, "url" );
427        }
428        if ( ( repositoryBase.getLayout() != null ) && !repositoryBase.getLayout().equals( "default" ) )
429        {
430            serializer.startTag( NAMESPACE, "layout" ).text( repositoryBase.getLayout() ).endTag( NAMESPACE, "layout" );
431        }
432        serializer.endTag( NAMESPACE, tagName );
433    } //-- void writeRepositoryBase( RepositoryBase, String, XmlSerializer )
434
435    /**
436     * Method writeRepositoryPolicy.
437     * 
438     * @param repositoryPolicy
439     * @param serializer
440     * @param tagName
441     * @throws java.io.IOException
442     */
443    private void writeRepositoryPolicy( RepositoryPolicy repositoryPolicy, String tagName, XmlSerializer serializer )
444        throws java.io.IOException
445    {
446        serializer.startTag( NAMESPACE, tagName );
447        if ( repositoryPolicy.isEnabled() != true )
448        {
449            serializer.startTag( NAMESPACE, "enabled" ).text( String.valueOf( repositoryPolicy.isEnabled() ) ).endTag( NAMESPACE, "enabled" );
450        }
451        if ( repositoryPolicy.getUpdatePolicy() != null )
452        {
453            serializer.startTag( NAMESPACE, "updatePolicy" ).text( repositoryPolicy.getUpdatePolicy() ).endTag( NAMESPACE, "updatePolicy" );
454        }
455        if ( repositoryPolicy.getChecksumPolicy() != null )
456        {
457            serializer.startTag( NAMESPACE, "checksumPolicy" ).text( repositoryPolicy.getChecksumPolicy() ).endTag( NAMESPACE, "checksumPolicy" );
458        }
459        serializer.endTag( NAMESPACE, tagName );
460    } //-- void writeRepositoryPolicy( RepositoryPolicy, String, XmlSerializer )
461
462    /**
463     * Method writeServer.
464     * 
465     * @param server
466     * @param serializer
467     * @param tagName
468     * @throws java.io.IOException
469     */
470    private void writeServer( Server server, String tagName, XmlSerializer serializer )
471        throws java.io.IOException
472    {
473        serializer.startTag( NAMESPACE, tagName );
474        if ( server.getUsername() != null )
475        {
476            serializer.startTag( NAMESPACE, "username" ).text( server.getUsername() ).endTag( NAMESPACE, "username" );
477        }
478        if ( server.getPassword() != null )
479        {
480            serializer.startTag( NAMESPACE, "password" ).text( server.getPassword() ).endTag( NAMESPACE, "password" );
481        }
482        if ( server.getPrivateKey() != null )
483        {
484            serializer.startTag( NAMESPACE, "privateKey" ).text( server.getPrivateKey() ).endTag( NAMESPACE, "privateKey" );
485        }
486        if ( server.getPassphrase() != null )
487        {
488            serializer.startTag( NAMESPACE, "passphrase" ).text( server.getPassphrase() ).endTag( NAMESPACE, "passphrase" );
489        }
490        if ( server.getFilePermissions() != null )
491        {
492            serializer.startTag( NAMESPACE, "filePermissions" ).text( server.getFilePermissions() ).endTag( NAMESPACE, "filePermissions" );
493        }
494        if ( server.getDirectoryPermissions() != null )
495        {
496            serializer.startTag( NAMESPACE, "directoryPermissions" ).text( server.getDirectoryPermissions() ).endTag( NAMESPACE, "directoryPermissions" );
497        }
498        if ( server.getConfiguration() != null )
499        {
500            ((Xpp3Dom) server.getConfiguration()).writeToSerializer( NAMESPACE, serializer );
501        }
502        if ( ( server.getId() != null ) && !server.getId().equals( "default" ) )
503        {
504            serializer.startTag( NAMESPACE, "id" ).text( server.getId() ).endTag( NAMESPACE, "id" );
505        }
506        serializer.endTag( NAMESPACE, tagName );
507    } //-- void writeServer( Server, String, XmlSerializer )
508
509    /**
510     * Method writeSettings.
511     * 
512     * @param settings
513     * @param serializer
514     * @param tagName
515     * @throws java.io.IOException
516     */
517    private void writeSettings( Settings settings, String tagName, XmlSerializer serializer )
518        throws java.io.IOException
519    {
520        serializer.setPrefix( "", "http://maven.apache.org/SETTINGS/1.1.0" );
521        serializer.setPrefix( "xsi", "http://www.w3.org/2001/XMLSchema-instance" );
522        serializer.startTag( NAMESPACE, tagName );
523        serializer.attribute( "", "xsi:schemaLocation", "http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd" );
524        if ( settings.getLocalRepository() != null )
525        {
526            serializer.startTag( NAMESPACE, "localRepository" ).text( settings.getLocalRepository() ).endTag( NAMESPACE, "localRepository" );
527        }
528        if ( settings.isInteractiveMode() != true )
529        {
530            serializer.startTag( NAMESPACE, "interactiveMode" ).text( String.valueOf( settings.isInteractiveMode() ) ).endTag( NAMESPACE, "interactiveMode" );
531        }
532        if ( settings.isUsePluginRegistry() != false )
533        {
534            serializer.startTag( NAMESPACE, "usePluginRegistry" ).text( String.valueOf( settings.isUsePluginRegistry() ) ).endTag( NAMESPACE, "usePluginRegistry" );
535        }
536        if ( settings.isOffline() != false )
537        {
538            serializer.startTag( NAMESPACE, "offline" ).text( String.valueOf( settings.isOffline() ) ).endTag( NAMESPACE, "offline" );
539        }
540        if ( ( settings.getProxies() != null ) && ( settings.getProxies().size() > 0 ) )
541        {
542            serializer.startTag( NAMESPACE, "proxies" );
543            for ( Iterator iter = settings.getProxies().iterator(); iter.hasNext(); )
544            {
545                Proxy o = (Proxy) iter.next();
546                writeProxy( o, "proxy", serializer );
547            }
548            serializer.endTag( NAMESPACE, "proxies" );
549        }
550        if ( ( settings.getServers() != null ) && ( settings.getServers().size() > 0 ) )
551        {
552            serializer.startTag( NAMESPACE, "servers" );
553            for ( Iterator iter = settings.getServers().iterator(); iter.hasNext(); )
554            {
555                Server o = (Server) iter.next();
556                writeServer( o, "server", serializer );
557            }
558            serializer.endTag( NAMESPACE, "servers" );
559        }
560        if ( ( settings.getMirrors() != null ) && ( settings.getMirrors().size() > 0 ) )
561        {
562            serializer.startTag( NAMESPACE, "mirrors" );
563            for ( Iterator iter = settings.getMirrors().iterator(); iter.hasNext(); )
564            {
565                Mirror o = (Mirror) iter.next();
566                writeMirror( o, "mirror", serializer );
567            }
568            serializer.endTag( NAMESPACE, "mirrors" );
569        }
570        if ( ( settings.getProfiles() != null ) && ( settings.getProfiles().size() > 0 ) )
571        {
572            serializer.startTag( NAMESPACE, "profiles" );
573            for ( Iterator iter = settings.getProfiles().iterator(); iter.hasNext(); )
574            {
575                Profile o = (Profile) iter.next();
576                writeProfile( o, "profile", serializer );
577            }
578            serializer.endTag( NAMESPACE, "profiles" );
579        }
580        if ( ( settings.getActiveProfiles() != null ) && ( settings.getActiveProfiles().size() > 0 ) )
581        {
582            serializer.startTag( NAMESPACE, "activeProfiles" );
583            for ( Iterator iter = settings.getActiveProfiles().iterator(); iter.hasNext(); )
584            {
585                String activeProfile = (String) iter.next();
586                serializer.startTag( NAMESPACE, "activeProfile" ).text( activeProfile ).endTag( NAMESPACE, "activeProfile" );
587            }
588            serializer.endTag( NAMESPACE, "activeProfiles" );
589        }
590        if ( ( settings.getPluginGroups() != null ) && ( settings.getPluginGroups().size() > 0 ) )
591        {
592            serializer.startTag( NAMESPACE, "pluginGroups" );
593            for ( Iterator iter = settings.getPluginGroups().iterator(); iter.hasNext(); )
594            {
595                String pluginGroup = (String) iter.next();
596                serializer.startTag( NAMESPACE, "pluginGroup" ).text( pluginGroup ).endTag( NAMESPACE, "pluginGroup" );
597            }
598            serializer.endTag( NAMESPACE, "pluginGroups" );
599        }
600        serializer.endTag( NAMESPACE, tagName );
601    } //-- void writeSettings( Settings, String, XmlSerializer )
602
603    /**
604     * Method writeTrackableBase.
605     * 
606     * @param trackableBase
607     * @param serializer
608     * @param tagName
609     * @throws java.io.IOException
610     */
611    private void writeTrackableBase( TrackableBase trackableBase, String tagName, XmlSerializer serializer )
612        throws java.io.IOException
613    {
614        serializer.startTag( NAMESPACE, tagName );
615        serializer.endTag( NAMESPACE, tagName );
616    } //-- void writeTrackableBase( TrackableBase, String, XmlSerializer )
617
618}