001// =================== DO NOT EDIT THIS FILE ====================
002// Generated by Modello 1.8.1,
003// any modifications will be overwritten.
004// ==============================================================
005
006package org.apache.maven.model;
007
008/**
009 * This is the file specification used to activate the profile. The
010 * <code>missing</code> value
011 *         is the location of a file that needs to exist, and if it
012 * doesn't, the profile will be
013 *         activated. On the other hand, <code>exists</code> will
014 * test for the existence of the file and if it is
015 *         there, the profile will be activated.<br/>
016 *         Variable interpolation for these file specifications is
017 * limited to <code>${basedir}</code>,
018 *         System properties and request properties.
019 * 
020 * @version $Revision$ $Date$
021 */
022@SuppressWarnings( "all" )
023public class ActivationFile
024    implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
025{
026
027      //--------------------------/
028     //- Class/Member Variables -/
029    //--------------------------/
030
031    /**
032     * The name of the file that must be missing to activate the
033     *           profile.
034     */
035    private String missing;
036
037    /**
038     * The name of the file that must exist to activate the profile.
039     */
040    private String exists;
041
042    /**
043     * Field locations.
044     */
045    private java.util.Map<Object, InputLocation> locations;
046
047
048      //-----------/
049     //- Methods -/
050    //-----------/
051
052    /**
053     * Method clone.
054     * 
055     * @return ActivationFile
056     */
057    public ActivationFile clone()
058    {
059        try
060        {
061            ActivationFile copy = (ActivationFile) super.clone();
062
063            if ( copy.locations != null )
064            {
065                copy.locations = new java.util.LinkedHashMap( copy.locations );
066            }
067
068            return copy;
069        }
070        catch ( java.lang.Exception ex )
071        {
072            throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
073                + " does not support clone()" ).initCause( ex );
074        }
075    } //-- ActivationFile clone()
076
077    /**
078     * Get the name of the file that must exist to activate the
079     * profile.
080     * 
081     * @return String
082     */
083    public String getExists()
084    {
085        return this.exists;
086    } //-- String getExists()
087
088    /**
089     * 
090     * 
091     * @param key
092     * @return InputLocation
093     */
094    public InputLocation getLocation( Object key )
095    {
096        return ( locations != null ) ? locations.get( key ) : null;
097    } //-- InputLocation getLocation( Object )
098
099    /**
100     * Get the name of the file that must be missing to activate
101     * the
102     *           profile.
103     * 
104     * @return String
105     */
106    public String getMissing()
107    {
108        return this.missing;
109    } //-- String getMissing()
110
111    /**
112     * Set the name of the file that must exist to activate the
113     * profile.
114     * 
115     * @param exists
116     */
117    public void setExists( String exists )
118    {
119        this.exists = exists;
120    } //-- void setExists( String )
121
122    /**
123     * 
124     * 
125     * @param key
126     * @param location
127     */
128    public void setLocation( Object key, InputLocation location )
129    {
130        if ( location != null )
131        {
132            if ( this.locations == null )
133            {
134                this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
135            }
136            this.locations.put( key, location );
137        }
138    } //-- void setLocation( Object, InputLocation )
139
140    /**
141     * Set the name of the file that must be missing to activate
142     * the
143     *           profile.
144     * 
145     * @param missing
146     */
147    public void setMissing( String missing )
148    {
149        this.missing = missing;
150    } //-- void setMissing( String )
151
152}