All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.maven.plugin.registry.TrackableBase Maven / Gradle / Ivy

Go to download

Statistical sampling library for use in virtdata libraries, based on apache commons math 4

There is a newer version: 5.17.0
Show newest version
/*
 =================== DO NOT EDIT THIS FILE ====================
 Generated by Modello 1.0.1 on 2009-08-06 15:14:41,
 any modifications will be overwritten.
 ==============================================================
 */

package org.apache.maven.plugin.registry;

/**
 * common base class that contains code to track the source for
 * this instance (USER|GLOBAL).
 * 
 * @version $Revision$ $Date$
 */
public class TrackableBase
    implements java.io.Serializable
{

    public static final String USER_LEVEL = "user-level";
    public static final String GLOBAL_LEVEL = "global-level";

    private String sourceLevel = USER_LEVEL;
    private boolean sourceLevelSet = false;

    public void setSourceLevel( String sourceLevel )
    {
        if ( sourceLevelSet )
        {
            throw new IllegalStateException( "Cannot reset sourceLevel attribute; it is already set to: " + sourceLevel );
        }
        else if ( !( USER_LEVEL.equals( sourceLevel ) || GLOBAL_LEVEL.equals( sourceLevel ) ) )
        {
            throw new IllegalArgumentException( "sourceLevel must be one of: {" + USER_LEVEL + "," + GLOBAL_LEVEL + "}" );
        }
        else
        {
            this.sourceLevel = sourceLevel;
            this.sourceLevelSet = true;
        }
    }

    public String getSourceLevel()
    {
        return sourceLevel;
    }
          
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy