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

org.apache.archiva.model.ProjectReference Maven / Gradle / Ivy

There is a newer version: 2.2.10
Show newest version
// =================== DO NOT EDIT THIS FILE ====================
// Generated by Modello 1.7,
// any modifications will be overwritten.
// ==============================================================

package org.apache.archiva.model;

/**
 * A reference to another (unversioned) Project.
 * 
 * @version $Revision$ $Date$
 */
@SuppressWarnings( "all" )
public class ProjectReference
    implements java.io.Serializable
{

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

    /**
     * 
     *             The Group ID of the project reference.
     *           
     */
    private String groupId;

    /**
     * 
     *             The Artifact ID of the project reference.
     *           
     */
    private String artifactId;


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

    /**
     * Get the Artifact ID of the project reference.
     * 
     * @return String
     */
    public String getArtifactId()
    {
        return this.artifactId;
    } //-- String getArtifactId()

    /**
     * Get the Group ID of the project reference.
     * 
     * @return String
     */
    public String getGroupId()
    {
        return this.groupId;
    } //-- String getGroupId()

    /**
     * Set the Artifact ID of the project reference.
     * 
     * @param artifactId
     */
    public void setArtifactId( String artifactId )
    {
        this.artifactId = artifactId;
    } //-- void setArtifactId( String )

    /**
     * Set the Group ID of the project reference.
     * 
     * @param groupId
     */
    public void setGroupId( String groupId )
    {
        this.groupId = groupId;
    } //-- void setGroupId( String )

    
    private static final long serialVersionUID = 8947981859537138991L;
          
    
    private static String defaultString( String value )
    {
        if ( value == null )
        {
            return "";
        }
        
        return value.trim();
    }
          
    public static String toKey( ProjectReference reference )
    {
        StringBuilder key = new StringBuilder();

        key.append( defaultString( reference.getGroupId() ) ).append( ":" );
        key.append( defaultString( reference.getArtifactId() ) );

        return key.toString();
    }
          
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy