<commit_before>/*
 * HeadsUp Agile
 * Copyright 2009-2013 Heads Up Development Ltd.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.headsupdev.agile.app.ci.event;

import org.headsupdev.agile.storage.ci.Build;
import org.headsupdev.agile.web.AbstractEvent;
import org.headsupdev.support.java.StringUtil;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import java.util.Date;

/**
 * An event fired when an application is deployed to the repository
 *
 * @author <NAME>
 * @version $Id$
 * @since 1.0
 */
@Entity
@DiscriminatorValue( "uploadapplication" )
public class UploadApplicationEvent
    extends AbstractEvent
{
    public UploadApplicationEvent()
    {
    }

    public UploadApplicationEvent( Build build, String version, String type, String repoName, String path )
    {
        this( build.getProject().getName(), version, repoName, path, build, type + " Application" );
    }

    protected UploadApplicationEvent( String name, String version, String repoName, String path, Build build,
                                   String type )
    {
        super( getTitleForBuildEvent( name, version, build, type ),
            getVersionTitle( version ) + type.toLowerCase() + " " + name + " was deployed to the " +
                    repoName + " repository<br /><a href=\"" + path + "\">Install</a>" +
                    "<img src=\"/qrcode.png?path=" + path + "\" style=\"margin-top: -108px;height: 150px;float:right;\">", new Date() );<commit_msg>Use project alias in upload events<commit_after>/*
 * HeadsUp Agile
 * Copyright 2009-2013 Heads Up Development Ltd.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.headsupdev.agile.app.ci.event;

import org.headsupdev.agile.storage.ci.Build;
import org.headsupdev.agile.web.AbstractEvent;
import org.headsupdev.support.java.StringUtil;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import java.util.Date;

/**
 * An event fired when an application is deployed to the repository
 *
 * @author <NAME>
 * @version $Id$
 * @since 1.0
 */
@Entity
@DiscriminatorValue( "uploadapplication" )
public class UploadApplicationEvent
    extends AbstractEvent
{
    public UploadApplicationEvent()
    {
    }

    public UploadApplicationEvent( Build build, String version, String type, String repoName, String path )
    {
        this( build.getProject().getAlias(), version, repoName, path, build, type + " Application" );
    }

    protected UploadApplicationEvent( String name, String version, String repoName, String path, Build build,
                                   String type )
    {
        super( getTitleForBuildEvent( name, version, build, type ),
            getVersionTitle( version ) + type.toLowerCase() + " " + name + " was deployed to the " +
                    repoName + " repository<br /><a href=\"" + path + "\">Install</a>" +
                    "<img src=\"/qrcode.png?path=" + path + "\" style=\"margin-top: -108px;height: 150px;float:right;\">", new Date() );
{'fraction_non_alphanumeric': 0.10130718954248366, 'fraction_numerical': 0.007936507936507936, 'mean_word_length': 3.3022088353413657, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3026625', 'n_tokens_mistral': 1185, 'n_tokens_neox': 1152, 'n_words': 433}