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

org.apache.maven.continuum.xmlrpc.project.ProjectNotifier Maven / Gradle / Ivy

The newest version!
/*
 =================== DO NOT EDIT THIS FILE ====================
 Generated by Modello
 any modifications will be overwritten.
 ==============================================================
 */

package org.apache.maven.continuum.xmlrpc.project;

  //---------------------------------/
 //- Imported classes and packages -/
//---------------------------------/

import org.apache.continuum.xmlrpc.release.ContinuumReleaseResult;
import org.apache.continuum.xmlrpc.repository.AbstractPurgeConfiguration;
import org.apache.continuum.xmlrpc.repository.DirectoryPurgeConfiguration;
import org.apache.continuum.xmlrpc.repository.LocalRepository;
import org.apache.continuum.xmlrpc.repository.RepositoryPurgeConfiguration;
import org.apache.continuum.xmlrpc.utils.BuildTrigger;
import org.apache.maven.continuum.xmlrpc.scm.ChangeFile;
import org.apache.maven.continuum.xmlrpc.scm.ChangeSet;
import org.apache.maven.continuum.xmlrpc.scm.ScmResult;
import org.apache.maven.continuum.xmlrpc.system.Installation;
import org.apache.maven.continuum.xmlrpc.system.Profile;
import org.apache.maven.continuum.xmlrpc.system.SystemConfiguration;

/**
 * 
 *         Configures one method for notifying users/developers
 * when a build breaks.
 *       
 * 
 * @version $Revision$ $Date$
 */
@SuppressWarnings( "all" )
public class ProjectNotifier
    implements java.io.Serializable
{

      //--------------------------/
     //- Class/Member Variables -/
    //--------------------------/

    /**
     * Field id.
     */
    private int id = 0;

    /**
     * The mechanism used to deliver notifications.
     */
    private String type = "mail";

    /**
     * The origin of the notifier (pom or user).
     */
    private int from = 0;

    /**
     * Field enabled.
     */
    private boolean enabled = true;

    /**
     * Field recipientType.
     */
    private int recipientType = 0;

    /**
     * Field sendOnSuccess.
     */
    private boolean sendOnSuccess = true;

    /**
     * Field sendOnFailure.
     */
    private boolean sendOnFailure = true;

    /**
     * Field sendOnError.
     */
    private boolean sendOnError = true;

    /**
     * Field sendOnWarning.
     */
    private boolean sendOnWarning = true;

    /**
     * Field configuration.
     */
    private java.util.Map configuration;


      //-----------/
     //- Methods -/
    //-----------/

    /**
     * Method addConfiguration.
     * 
     * @param key
     * @param value
     */
    public void addConfiguration( Object key, String value )
    {
        getConfiguration().put( key, value );
    } //-- void addConfiguration( Object, String )

    /**
     * Method equals.
     * 
     * @param other
     * @return boolean
     */
    public boolean equals( Object other )
    {
        if ( this == other )
        {
            return true;
        }

        if ( !( other instanceof ProjectNotifier ) )
        {
            return false;
        }

        ProjectNotifier that = (ProjectNotifier) other;
        boolean result = true;

        result = result && id == that.id;

        return result;
    } //-- boolean equals( Object )

    /**
     * Method getConfiguration.
     * 
     * @return Map
     */
    public java.util.Map getConfiguration()
    {
        if ( this.configuration == null )
        {
            this.configuration = new java.util.HashMap();
        }

        return this.configuration;
    } //-- java.util.Map getConfiguration()

    /**
     * Get the origin of the notifier (pom or user).
     * 
     * @return int
     */
    public int getFrom()
    {
        return this.from;
    } //-- int getFrom()

    /**
     * Get the id field.
     * 
     * @return int
     */
    public int getId()
    {
        return this.id;
    } //-- int getId()

    /**
     * Get the recipientType field.
     * 
     * @return int
     */
    public int getRecipientType()
    {
        return this.recipientType;
    } //-- int getRecipientType()

    /**
     * Get the mechanism used to deliver notifications.
     * 
     * @return String
     */
    public String getType()
    {
        return this.type;
    } //-- String getType()

    /**
     * Method hashCode.
     * 
     * @return int
     */
    public int hashCode()
    {
        int result = 17;

        result = 37 * result + (int) id;

        return result;
    } //-- int hashCode()

    /**
     * Get the enabled field.
     * 
     * @return boolean
     */
    public boolean isEnabled()
    {
        return this.enabled;
    } //-- boolean isEnabled()

    /**
     * Get the sendOnError field.
     * 
     * @return boolean
     */
    public boolean isSendOnError()
    {
        return this.sendOnError;
    } //-- boolean isSendOnError()

    /**
     * Get the sendOnFailure field.
     * 
     * @return boolean
     */
    public boolean isSendOnFailure()
    {
        return this.sendOnFailure;
    } //-- boolean isSendOnFailure()

    /**
     * Get the sendOnSuccess field.
     * 
     * @return boolean
     */
    public boolean isSendOnSuccess()
    {
        return this.sendOnSuccess;
    } //-- boolean isSendOnSuccess()

    /**
     * Get the sendOnWarning field.
     * 
     * @return boolean
     */
    public boolean isSendOnWarning()
    {
        return this.sendOnWarning;
    } //-- boolean isSendOnWarning()

    /**
     * Set extended configuration specific to this notifier goes
     * here.
     * 
     * @param configuration
     */
    public void setConfiguration( java.util.Map configuration )
    {
        this.configuration = configuration;
    } //-- void setConfiguration( java.util.Map )

    /**
     * Set the enabled field.
     * 
     * @param enabled
     */
    public void setEnabled( boolean enabled )
    {
        this.enabled = enabled;
    } //-- void setEnabled( boolean )

    /**
     * Set the origin of the notifier (pom or user).
     * 
     * @param from
     */
    public void setFrom( int from )
    {
        this.from = from;
    } //-- void setFrom( int )

    /**
     * Set the id field.
     * 
     * @param id
     */
    public void setId( int id )
    {
        this.id = id;
    } //-- void setId( int )

    /**
     * Set the recipientType field.
     * 
     * @param recipientType
     */
    public void setRecipientType( int recipientType )
    {
        this.recipientType = recipientType;
    } //-- void setRecipientType( int )

    /**
     * Set the sendOnError field.
     * 
     * @param sendOnError
     */
    public void setSendOnError( boolean sendOnError )
    {
        this.sendOnError = sendOnError;
    } //-- void setSendOnError( boolean )

    /**
     * Set the sendOnFailure field.
     * 
     * @param sendOnFailure
     */
    public void setSendOnFailure( boolean sendOnFailure )
    {
        this.sendOnFailure = sendOnFailure;
    } //-- void setSendOnFailure( boolean )

    /**
     * Set the sendOnSuccess field.
     * 
     * @param sendOnSuccess
     */
    public void setSendOnSuccess( boolean sendOnSuccess )
    {
        this.sendOnSuccess = sendOnSuccess;
    } //-- void setSendOnSuccess( boolean )

    /**
     * Set the sendOnWarning field.
     * 
     * @param sendOnWarning
     */
    public void setSendOnWarning( boolean sendOnWarning )
    {
        this.sendOnWarning = sendOnWarning;
    } //-- void setSendOnWarning( boolean )

    /**
     * Set the mechanism used to deliver notifications.
     * 
     * @param type
     */
    public void setType( String type )
    {
        this.type = type;
    } //-- void setType( String )

    /**
     * Method toString.
     * 
     * @return String
     */
    public java.lang.String toString()
    {
        StringBuilder buf = new StringBuilder( 128 );

        buf.append( "id = '" );
        buf.append( getId() );
        buf.append( "'" );

        return buf.toString();
    } //-- java.lang.String toString()

    

              public static final int FROM_PROJECT = 1;

              public static final int FROM_USER = 2;

              public boolean isFromProject()
              {
                  return from == FROM_PROJECT;
              }

              public boolean isFromUser()
              {
                  return from == FROM_USER;
              }
          
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy