Commit e9f0ea94 authored by OUGHDI's avatar OUGHDI
Browse files

RELEASER-18 : Format code and update license

parent 790d58e1
/*
* Copyright (c) 2002-2021, City of Paris
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright notice
* and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice
* and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* 3. Neither the name of 'Mairie de Paris' nor 'Lutece' nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* License 1.0
*/
package fr.paris.lutece.plugins.releaser.business;
import org.apache.commons.lang.StringUtils;
......@@ -11,8 +44,9 @@ public abstract class AbstractReleaserResource implements IReleaserResource
private String _strReleaseComment;
/** {@inheritDoc}
*/
/**
* {@inheritDoc}
*/
@Override
public RepositoryType getRepoType( )
{
......
/*
* Copyright (c) 2002-2017, Mairie de Paris
* Copyright (c) 2002-2021, City of Paris
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
......@@ -47,7 +47,7 @@ public class Cluster implements RBACResource, Serializable
{
private static final long serialVersionUID = 1L;
// RBAC management
// RBAC management
public static final String RESOURCE_TYPE = "cluster";
// Cluster permissions
......@@ -57,7 +57,7 @@ public class Cluster implements RBACResource, Serializable
public static final String PERMISSION_ADD_SITES_TO_CLUSTER = "addSitesToClusterPermission";
private HashMap<String, Boolean> permissions;
// Variables declarations
private int _nId;
......@@ -155,22 +155,26 @@ public class Cluster implements RBACResource, Serializable
_listSites = listSites;
}
@Override
public String getResourceTypeCode() {
@Override
public String getResourceTypeCode( )
{
return RESOURCE_TYPE;
}
}
@Override
public String getResourceId() {
@Override
public String getResourceId( )
{
return String.valueOf( _nId );
}
}
public HashMap<String, Boolean> getPermissions() {
return permissions;
}
public HashMap<String, Boolean> getPermissions( )
{
return permissions;
}
public void setPermissions(HashMap<String, Boolean> permissions) {
this.permissions = permissions;
}
public void setPermissions( HashMap<String, Boolean> permissions )
{
this.permissions = permissions;
}
}
/*
* Copyright (c) 2002-2017, Mairie de Paris
* Copyright (c) 2002-2021, City of Paris
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
......@@ -31,7 +31,6 @@
*
* License 1.0
*/
package fr.paris.lutece.plugins.releaser.business;
import fr.paris.lutece.portal.service.plugin.Plugin;
......
/*
* Copyright (c) 2002-2017, Mairie de Paris
* Copyright (c) 2002-2021, City of Paris
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
......@@ -134,7 +134,6 @@ public final class ClusterHome
return _dao.selectClustersList( _plugin );
}
/**
* Load the id of all the cluster objects and returns them as a list
*
......
/*
* Copyright (c) 2002-2017, Mairie de Paris
* Copyright (c) 2002-2021, City of Paris
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
......@@ -43,85 +43,85 @@ import fr.paris.lutece.portal.service.rbac.RBACResource;
/**
* This is the business class for the object Component.
*/
public class Component extends AbstractReleaserResource implements RBACResource
public class Component extends AbstractReleaserResource implements RBACResource
{
// RBAC management
// RBAC management
public static final String RESOURCE_TYPE = "component";
// Component permissions
public static final String PERMISSION_SEARCH_COMPONENT = "searchComponentPermission";
private HashMap<String, Boolean> permissions;
/** The str artifact id. */
// Variables declarations
private String _strArtifactId;
/** The str group id. */
private String _strGroupId;
/** The str type. */
private String _strType;
/** The str current version. */
private String _strCurrentVersion;
/** The str target version. */
private String _strTargetVersion;
/** The str last available version. */
private String _strLastAvailableVersion;
/** The str last available snapshot version. */
private String _strLastAvailableSnapshotVersion;
/** The str next snapshot version. */
private String _strNextSnapshotVersion;
/** The str description. */
private String _strDescription;
/** The b is project. */
private boolean _bIsProject;
/** The str jira code. */
private String _strJiraCode;
/** The str jira roadmap url. */
private String _strJiraRoadmapUrl;
/** The n jira current version closed issues. */
private int _nJiraCurrentVersionClosedIssues;
/** The n jira current version opened issues. */
private int _nJiraCurrentVersionOpenedIssues;
/** The list target versions. */
private List<String> _listTargetVersions;
/** The n target version index. */
private int _nTargetVersionIndex;
/** The b downgrade. */
private boolean _bDowngrade;
/** The b upgrade. */
private boolean _bUpgrade;
/** The b error last release. */
private boolean _bErrorLastRelease;
/** The str name. */
private String _strName;
/** The str clone url. */
private String _strCloneUrl;
/** The str full name. */
private String _strFullName;
/** The str tweet message. */
private String _strTweetMessage;
/** The str scm developer connection. */
private String _strScmDeveloperConnection;
......@@ -138,7 +138,8 @@ public class Component extends AbstractReleaserResource implements RBACResource
/**
* Sets the ArtifactId.
*
* @param strArtifactId The ArtifactId
* @param strArtifactId
* The ArtifactId
*/
public void setArtifactId( String strArtifactId )
{
......@@ -158,7 +159,8 @@ public class Component extends AbstractReleaserResource implements RBACResource
/**
* Sets the GroupId.
*
* @param strGroupId The GroupId
* @param strGroupId
* The GroupId
*/
public void setGroupId( String strGroupId )
{
......@@ -178,7 +180,8 @@ public class Component extends AbstractReleaserResource implements RBACResource
/**
* Sets the Type.
*
* @param strType The Type
* @param strType
* The Type
*/
public void setType( String strType )
{
......@@ -198,7 +201,8 @@ public class Component extends AbstractReleaserResource implements RBACResource
/**
* Sets the CurrentVersion.
*
* @param strCurrentVersion The CurrentVersion
* @param strCurrentVersion
* The CurrentVersion
*/
public void setCurrentVersion( String strCurrentVersion )
{
......@@ -218,7 +222,8 @@ public class Component extends AbstractReleaserResource implements RBACResource
/**
* Sets the TargetVersion.
*
* @param strTargetVersion The TargetVersion
* @param strTargetVersion
* The TargetVersion
*/
public void setTargetVersion( String strTargetVersion )
{
......@@ -238,7 +243,8 @@ public class Component extends AbstractReleaserResource implements RBACResource
/**
* Sets the IsProject.
*
* @param bIsProject The IsProject
* @param bIsProject
* The IsProject
*/
public void setIsProject( boolean bIsProject )
{
......@@ -258,7 +264,8 @@ public class Component extends AbstractReleaserResource implements RBACResource
/**
* Sets the LastAvailableVersion.
*
* @param strLastAvailableVersion The LastAvailableVersion
* @param strLastAvailableVersion
* The LastAvailableVersion
*/
public void setLastAvailableVersion( String strLastAvailableVersion )
{
......@@ -278,7 +285,8 @@ public class Component extends AbstractReleaserResource implements RBACResource
/**
* Sets the NextSnapshotVersion.
*
* @param strNextSnapshotVersion The NextSnapshotVersion
* @param strNextSnapshotVersion
* The NextSnapshotVersion
*/
public void setNextSnapshotVersion( String strNextSnapshotVersion )
{
......@@ -298,7 +306,8 @@ public class Component extends AbstractReleaserResource implements RBACResource
/**
* Sets the JiraCode.
*
* @param strJiraCode The JiraCode
* @param strJiraCode
* The JiraCode
*/
public void setJiraCode( String strJiraCode )
{
......@@ -318,7 +327,8 @@ public class Component extends AbstractReleaserResource implements RBACResource
/**
* Sets the JiraRoadmapUrl.
*
* @param strJiraRoadmapUrl The JiraRoadmapUrl
* @param strJiraRoadmapUrl
* The JiraRoadmapUrl
*/
public void setJiraRoadmapUrl( String strJiraRoadmapUrl )
{
......@@ -338,7 +348,8 @@ public class Component extends AbstractReleaserResource implements RBACResource
/**
* Sets the JiraCurrentVersionClosedIssues.
*
* @param nJiraCurrentVersionClosedIssues The JiraCurrentVersionClosedIssues
* @param nJiraCurrentVersionClosedIssues
* The JiraCurrentVersionClosedIssues
*/
public void setJiraCurrentVersionClosedIssues( int nJiraCurrentVersionClosedIssues )
{
......@@ -358,7 +369,8 @@ public class Component extends AbstractReleaserResource implements RBACResource
/**
* Sets the JiraCurrentVersionOpenedIssues.
*
* @param nJiraCurrentVersionOpenedIssues The JiraCurrentVersionOpenedIssues
* @param nJiraCurrentVersionOpenedIssues
* The JiraCurrentVersionOpenedIssues
*/
public void setJiraCurrentVersionOpenedIssues( int nJiraCurrentVersionOpenedIssues )
{
......@@ -368,7 +380,8 @@ public class Component extends AbstractReleaserResource implements RBACResource
/**
* Set target versions list.
*
* @param listTargetVersions The target versions list
* @param listTargetVersions
* The target versions list
*/
public void setTargetVersions( List<String> listTargetVersions )
{
......@@ -388,7 +401,8 @@ public class Component extends AbstractReleaserResource implements RBACResource
/**
* Set the target version index.
*
* @param nIndex the target version index
* @param nIndex
* the target version index
*/
public void setTargetVersionIndex( int nIndex )
{
......@@ -434,7 +448,8 @@ public class Component extends AbstractReleaserResource implements RBACResource
/**
* Sets the scm developer connection.
*
* @param _strScmDeveloperConnection scm developer connection url
* @param _strScmDeveloperConnection
* scm developer connection url
*/
public void setScmDeveloperConnection( String _strScmDeveloperConnection )
{
......@@ -464,7 +479,8 @@ public class Component extends AbstractReleaserResource implements RBACResource
/**
* Sets the upgrade.
*
* @param _bUpgrade the new upgrade
* @param _bUpgrade
* the new upgrade
*/
public void setUpgrade( boolean _bUpgrade )
{
......@@ -484,7 +500,8 @@ public class Component extends AbstractReleaserResource implements RBACResource
/**
* Sets the downgrade.
*
* @param _bDowngrade the new downgrade
* @param _bDowngrade
* the new downgrade
*/
public void setDowngrade( boolean _bDowngrade )
{
......@@ -514,7 +531,8 @@ public class Component extends AbstractReleaserResource implements RBACResource
/**
* Sets the last available snapshot version.
*
* @param _strLastAvailableSnapshotVersion the new last available snapshot version
* @param _strLastAvailableSnapshotVersion
* the new last available snapshot version
*/
public void setLastAvailableSnapshotVersion( String _strLastAvailableSnapshotVersion )
{
......@@ -534,7 +552,8 @@ public class Component extends AbstractReleaserResource implements RBACResource
/**
* Sets the error last release.
*
* @param _bErrorLastRelease the new error last release
* @param _bErrorLastRelease
* the new error last release
*/
public void setErrorLastRelease( boolean _bErrorLastRelease )
{
......@@ -554,7 +573,8 @@ public class Component extends AbstractReleaserResource implements RBACResource
/**
* Sets the name.
*
* @param _strName the new name
* @param _strName
* the new name
*/
public void setName( String _strName )
{
......@@ -574,7 +594,8 @@ public class Component extends AbstractReleaserResource implements RBACResource
/**
* Sets the clone url.
*
* @param _strCloneUrl the new clone url
* @param _strCloneUrl
* the new clone url
*/
public void setCloneUrl( String _strCloneUrl )
{
......@@ -594,7 +615,8 @@ public class Component extends AbstractReleaserResource implements RBACResource
/**
* Sets the full name.
*
* @param strFullName the new full name
* @param strFullName
* the new full name
*/
public void setFullName( String strFullName )
{
......@@ -614,7 +636,8 @@ public class Component extends AbstractReleaserResource implements RBACResource
/**
* Sets the tweet message.
*
* @param _strTweetMessage the new tweet message
* @param _strTweetMessage
* the new tweet message
*/
public void setTweetMessage( String _strTweetMessage )
{
......@@ -633,22 +656,26 @@ public class Component extends AbstractReleaserResource implements RBACResource
return getScmDeveloperConnection( );
}
@Override
public String getResourceTypeCode() {
@Override
public String getResourceTypeCode( )
{
return RESOURCE_TYPE;
}
}
@Override
public String getResourceId() {
@Override
public String getResourceId( )
{
return _strArtifactId;
}
}
public HashMap<String, Boolean> getPermissions() {
return permissions;
}
public HashMap<String, Boolean> getPermissions( )
{
return permissions;
}
public void setPermissions(HashMap<String, Boolean> permissions) {
this.permissions = permissions;
}
public void setPermissions( HashMap<String, Boolean> permissions )
{
this.permissions = permissions;
}
}
/*
* Copyright (c) 2002-2015, Mairie de Paris
* Copyright (c) 2002-2021, City of Paris
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
......@@ -31,7 +31,6 @@
*
* License 1.0
*/
package fr.paris.lutece.plugins.releaser.business;
/**
......
/*
* Copyright (c) 2002-2017, Mairie de Paris
* Copyright (c) 2002-2021, City of Paris
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
......@@ -31,7 +31,6 @@
*
* License 1.0
*/
package fr.paris.lutece.plugins.releaser.business;
import fr.paris.lutece.portal.service.plugin.Plugin;
......
/*
* Copyright (c) 2002-2021, City of Paris
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright notice
* and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice
* and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* 3. Neither the name of 'Mairie de Paris' nor 'Lutece' nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* License 1.0
*/
package fr.paris.lutece.plugins.releaser.business;
import org.apache.commons.lang.StringUtils;
/**
*
*IReleaserResource
* IReleaserResource
*
*/
public interface IReleaserResource
{
/**
*
* @return scm url
*/
String getScmUrl( );
/**
*
* @return scm url
*/
String getScmUrl( );
/**
*
* @return artifact Id
*/
/**
*
* @return artifact Id
*/
String getArtifactId( );
/**
......