Coverage Report - fr.paris.lutece.plugins.releaser.business.Site
 
Classes in this File Line Coverage Branch Coverage Complexity
Site
60 %
36/60
N/A
1
 
 1  
 /*
 2  
  * Copyright (c) 2002-2017, Mairie de Paris
 3  
  * All rights reserved.
 4  
  *
 5  
  * Redistribution and use in source and binary forms, with or without
 6  
  * modification, are permitted provided that the following conditions
 7  
  * are met:
 8  
  *
 9  
  *  1. Redistributions of source code must retain the above copyright notice
 10  
  *     and the following disclaimer.
 11  
  *
 12  
  *  2. Redistributions in binary form must reproduce the above copyright notice
 13  
  *     and the following disclaimer in the documentation and/or other materials
 14  
  *     provided with the distribution.
 15  
  *
 16  
  *  3. Neither the name of 'Mairie de Paris' nor 'Lutece' nor the names of its
 17  
  *     contributors may be used to endorse or promote products derived from
 18  
  *     this software without specific prior written permission.
 19  
  *
 20  
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 21  
  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 22  
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 23  
  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
 24  
  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 25  
  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 26  
  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 27  
  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 28  
  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 29  
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 30  
  * POSSIBILITY OF SUCH DAMAGE.
 31  
  *
 32  
  * License 1.0
 33  
  */
 34  
 package fr.paris.lutece.plugins.releaser.business;
 35  
 
 36  
 import javax.validation.constraints.*;
 37  
 import org.hibernate.validator.constraints.*;
 38  
 import java.io.Serializable;
 39  
 import java.util.ArrayList;
 40  
 import java.util.List;
 41  
 
 42  
 /**
 43  
  * This is the business class for the object Site
 44  
  */
 45  17
 public class Site implements Serializable
 46  
 {
 47  
     private static final long serialVersionUID = 1L;
 48  
 
 49  
     // Variables declarations
 50  
     private int _nId;
 51  
 
 52  
     @NotEmpty( message = "#i18n{releaser.validation.site.ArtifactId.notEmpty}" )
 53  
     @Size( max = 50, message = "#i18n{releaser.validation.site.ArtifactId.size}" )
 54  
     private String _strArtifactId;
 55  
    
 56  
     private int _nIdCluster;
 57  
     @URL( message = "#i18n{portal.validation.message.url}" )
 58  
     @NotEmpty( message = "#i18n{releaser.validation.site.ScmUrl.notEmpty}" )
 59  
     @Size( max = 255, message = "#i18n{releaser.validation.site.ScmUrl.size}" )
 60  
     private String _strScmUrl;
 61  
 
 62  
     @NotEmpty( message = "#i18n{releaser.validation.site.Name.notEmpty}" )
 63  
     @Size( max = 50, message = "#i18n{releaser.validation.site.Name.size}" )
 64  
     private String _strName;
 65  
 
 66  
     @NotEmpty( message = "#i18n{releaser.validation.site.Description.notEmpty}" )
 67  
     @Size( max = 255, message = "#i18n{releaser.validation.site.Description.size}" )
 68  
     private String _strDescription;
 69  
 
 70  
     @Size( max = 50, message = "#i18n{releaser.validation.site.JiraKey.size}" )
 71  
     private String _strJiraKey;
 72  
     
 73  
     private String _strTagInformation;
 74  
     
 75  
     private String _strCluster;
 76  
 
 77  17
     private List<Dependency> _listCurrentDependencies = new ArrayList<>( );
 78  17
     private List<Component> _listComponents = new ArrayList<>( );
 79  
     
 80  
     private String _strCurrentVersion;
 81  
     private String _strLastReleaseVersion;
 82  
     private String _strNextReleaseVersion;
 83  
     private List<String> _listTargetVersions;
 84  
     private int _nTargetVersionIndex;
 85  
     private String _strNextSnapshotVersion;
 86  
     private String _strGroupId;
 87  
     private boolean _bTheme;
 88  
 
 89  
 
 90  
     /**
 91  
      * Returns the Id
 92  
      * 
 93  
      * @return The Id
 94  
      */
 95  
     public int getId( )
 96  
     {
 97  7
         return _nId;
 98  
     }
 99  
 
 100  
     /**
 101  
      * Sets the Id
 102  
      * 
 103  
      * @param nId
 104  
      *            The Id
 105  
      */
 106  
     public void setId( int nId )
 107  
     {
 108  16
         _nId = nId;
 109  16
     }
 110  
 
 111  
     /**
 112  
      * Returns the ArtifactId
 113  
      * 
 114  
      * @return The ArtifactId
 115  
      */
 116  
     public String getArtifactId( )
 117  
     {
 118  6
         return _strArtifactId;
 119  
     }
 120  
 
 121  
     /**
 122  
      * Sets the ArtifactId
 123  
      * 
 124  
      * @param strArtifactId
 125  
      *            The ArtifactId
 126  
      */
 127  
     public void setArtifactId( String strArtifactId )
 128  
     {
 129  18
         _strArtifactId = strArtifactId;
 130  18
     }
 131  
 
 132  
     /**
 133  
      * Returns the IdCluster
 134  
      * 
 135  
      * @return The IdCluster
 136  
      */
 137  
     public int getIdCluster( )
 138  
     {
 139  6
         return _nIdCluster;
 140  
     }
 141  
 
 142  
     /**
 143  
      * Sets the IdCluster
 144  
      * 
 145  
      * @param nIdCluster
 146  
      *            The IdCluster
 147  
      */
 148  
     public void setIdCluster( int nIdCluster )
 149  
     {
 150  17
         _nIdCluster = nIdCluster;
 151  17
     }
 152  
 
 153  
     /**
 154  
      * Returns the ScmUrl
 155  
      * 
 156  
      * @return The ScmUrl
 157  
      */
 158  
     public String getScmUrl( )
 159  
     {
 160  6
         return _strScmUrl;
 161  
     }
 162  
 
 163  
     /**
 164  
      * Sets the ScmUrl
 165  
      * 
 166  
      * @param strScmUrl
 167  
      *            The ScmUrl
 168  
      */
 169  
     public void setScmUrl( String strScmUrl )
 170  
     {
 171  17
         _strScmUrl = strScmUrl;
 172  17
     }
 173  
 
 174  
     /**
 175  
      * Returns the Name
 176  
      * 
 177  
      * @return The Name
 178  
      */
 179  
     public String getName( )
 180  
     {
 181  6
         return _strName;
 182  
     }
 183  
 
 184  
     /**
 185  
      * Sets the Name
 186  
      * 
 187  
      * @param strName
 188  
      *            The Name
 189  
      */
 190  
     public void setName( String strName )
 191  
     {
 192  17
         _strName = strName;
 193  17
     }
 194  
 
 195  
     /**
 196  
      * Returns the Description
 197  
      * 
 198  
      * @return The Description
 199  
      */
 200  
     public String getDescription( )
 201  
     {
 202  6
         return _strDescription;
 203  
     }
 204  
 
 205  
     /**
 206  
      * Sets the Description
 207  
      * 
 208  
      * @param strDescription
 209  
      *            The Description
 210  
      */
 211  
     public void setDescription( String strDescription )
 212  
     {
 213  17
         _strDescription = strDescription;
 214  17
     }
 215  
 
 216  
     /**
 217  
      * Returns the JiraKey
 218  
      * 
 219  
      * @return The JiraKey
 220  
      */
 221  
     public String getJiraKey( )
 222  
     {
 223  6
         return _strJiraKey;
 224  
     }
 225  
 
 226  
     /**
 227  
      * Sets the JiraKey
 228  
      * 
 229  
      * @param strJiraKey
 230  
      *            The JiraKey
 231  
      */
 232  
     public void setJiraKey( String strJiraKey )
 233  
     {
 234  17
         _strJiraKey = strJiraKey;
 235  17
     }
 236  
 
 237  
     public void addCurrentDependency( Dependency dependency )
 238  
     {
 239  28
         _listCurrentDependencies.add( dependency );
 240  28
     }
 241  
 
 242  
     public List<Dependency> getCurrentDependencies( )
 243  
     {
 244  1
         return _listCurrentDependencies;
 245  
     }
 246  
 
 247  
     public void addComponent( Component component )
 248  
     {
 249  0
         _listComponents.add( component );
 250  0
     }
 251  
 
 252  
     public List<Component> getComponents( )
 253  
     {
 254  0
         return _listComponents;
 255  
     }
 256  
 
 257  
     /**
 258  
      * Returns the Version
 259  
      * 
 260  
      * @return The Version
 261  
      */
 262  
     public String getVersion( )
 263  
     {
 264  0
         return _strCurrentVersion;
 265  
     }
 266  
 
 267  
     /**
 268  
      * Sets the Version
 269  
      * 
 270  
      * @param strVersion
 271  
      *            The Version
 272  
      */
 273  
     public void setVersion( String strVersion )
 274  
     {
 275  1
         _strCurrentVersion = strVersion;
 276  1
     }
 277  
 
 278  
     /**
 279  
      * Returns the Cluster
 280  
      * 
 281  
      * @return The Cluster
 282  
      */
 283  
     public String getCluster( )
 284  
     {
 285  0
         return _strCluster;
 286  
     }
 287  
 
 288  
     /**
 289  
      * Sets the Cluster
 290  
      * 
 291  
      * @param strCluster
 292  
      *            The Cluster
 293  
      */
 294  
     public void setCluster( String strCluster )
 295  
     {
 296  15
         _strCluster = strCluster;
 297  15
     }
 298  
 
 299  
     /**
 300  
      * Returns the Last Release Version
 301  
      * 
 302  
      * @return The Release Version
 303  
      */
 304  
     public String getLastReleaseVersion( )
 305  
     {
 306  0
         return _strLastReleaseVersion;
 307  
     }
 308  
 
 309  
     /**
 310  
      * Sets the Last Release Version
 311  
      * 
 312  
      * @param strLastReleaseVersion
 313  
      *            The Release Version
 314  
      */
 315  
     public void setLastReleaseVersion( String strLastReleaseVersion )
 316  
     {
 317  0
         _strLastReleaseVersion = strLastReleaseVersion;
 318  0
     }
 319  
 
 320  
     /**
 321  
      * Returns the Next Release Version
 322  
      * 
 323  
      * @return The Release Version
 324  
      */
 325  
     public String getNextReleaseVersion( )
 326  
     {
 327  0
         return _strNextReleaseVersion;
 328  
     }
 329  
 
 330  
     /**
 331  
      * Sets the Next Release Version
 332  
      * 
 333  
      * @param strNextReleaseVersion
 334  
      *            The Release Version
 335  
      */
 336  
     public void setNextReleaseVersion( String strNextReleaseVersion )
 337  
     {
 338  0
         _strNextReleaseVersion = strNextReleaseVersion;
 339  0
     }
 340  
 
 341  
     /**
 342  
      * Returns the NextSnapshotVersion
 343  
      * 
 344  
      * @return The NextSnapshotVersion
 345  
      */
 346  
     public String getNextSnapshotVersion( )
 347  
     {
 348  0
         return _strNextSnapshotVersion;
 349  
     }
 350  
 
 351  
     /**
 352  
      * Sets the NextSnapshotVersion
 353  
      * 
 354  
      * @param strNextSnapshotVersion
 355  
      *            The NextSnapshotVersion
 356  
      */
 357  
     public void setNextSnapshotVersion( String strNextSnapshotVersion )
 358  
     {
 359  0
         _strNextSnapshotVersion = strNextSnapshotVersion;
 360  0
     }
 361  
 
 362  
     /**
 363  
      * Set target versions list
 364  
      * @param listTargetVersions The target versions list 
 365  
      */
 366  
     public void setTargetVersions( List<String> listTargetVersions )
 367  
     {
 368  0
         _listTargetVersions = listTargetVersions;
 369  0
     }
 370  
     
 371  
     /**
 372  
      * Gets the target versions list
 373  
      * @return the target versions list
 374  
      */
 375  
     public List<String> getTargetVersions()
 376  
     {
 377  0
         return _listTargetVersions;
 378  
     }
 379  
     
 380  
     /**
 381  
      * Set the target version index
 382  
      * @param nIndex the target version index
 383  
      */
 384  
     public void setTargetVersionIndex( int nIndex )
 385  
     {
 386  0
         _nTargetVersionIndex = nIndex;
 387  0
     }
 388  
     
 389  
     /**
 390  
      * Get the target version index
 391  
      * @return the target version index 
 392  
      */
 393  
     public int getTargetVersionIndex()
 394  
     {
 395  0
         return _nTargetVersionIndex;
 396  
     }
 397  
 
 398  
     public String getTagInformation( )
 399  
     {
 400  0
         return _strTagInformation;
 401  
     }
 402  
 
 403  
     public void setTagInformation( String _strTagInfotmation )
 404  
     {
 405  0
         this._strTagInformation = _strTagInfotmation;
 406  0
     }
 407  
 
 408  
     public String getGroupId( )
 409  
     {
 410  0
         return _strGroupId;
 411  
     }
 412  
 
 413  
     public void setGroupId( String _strGroupId )
 414  
     {
 415  1
         this._strGroupId = _strGroupId;
 416  1
     }
 417  
 
 418  
     public boolean isTheme( )
 419  
     {
 420  2
         return _bTheme;
 421  
     }
 422  
 
 423  
     public void setTheme( boolean _bTheme )
 424  
     {
 425  15
         this._bTheme = _bTheme;
 426  15
     }
 427  
     
 428  
     
 429  
 
 430  
     
 431  
     
 432  
 }