Browse Source

Made a code review.

master
Christian P. MOMON 2 years ago
parent
commit
4d8d0f4fda
  1. 2
      build.num
  2. 30
      src/org/april/agirstatool/cli/SQLUtils.java
  3. 16
      src/org/april/agirstatool/core/AgirStatool.java
  4. 6
      src/org/april/agirstatool/core/AgirStatoolUtils.java
  5. 4
      src/org/april/agirstatool/core/Project.java
  6. 32
      src/org/april/agirstatool/core/ProjectComparator.java
  7. 10
      src/org/april/agirstatool/core/pages/ChartBarView.java
  8. 10
      src/org/april/agirstatool/core/pages/ChartPolarView.java
  9. 15
      src/org/april/agirstatool/core/pages/CreatedConcludedCountChartView.java
  10. 12
      src/org/april/agirstatool/core/pages/IssueStatChartView.java
  11. 4
      src/org/april/agirstatool/core/pages/ProjectPage.java
  12. 4
      src/org/april/agirstatool/core/pages/ProjectsGroupedView.java
  13. 4
      src/org/april/agirstatool/core/pages/ProjectsRawView.java
  14. 16
      src/org/april/agirstatool/core/pages/UnassignedPolarChartView.java

2
build.num

@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit!
#Wed Jan 22 19:29:14 CET 2020
#Wed Jan 22 19:36:44 CET 2020
build.number=4

30
src/org/april/agirstatool/cli/SQLUtils.java

@ -38,7 +38,7 @@ public final class SQLUtils
private static Logger logger = LoggerFactory.getLogger(SQLUtils.class);
/**
* Instantiates a new connector.
* Instantiates a new SQL utils.
*/
private SQLUtils()
{
@ -155,12 +155,19 @@ public final class SQLUtils
}
/**
*
* This method launch CLI.
*
* @param args
* necessary arguments
* Gets the connexion.
*
* @param serverUrl
* the server url
* @param databaseName
* the database name
* @param login
* the login
* @param password
* the password
* @return the connexion
* @throws AgirStatoolException
* the agir statool exception
*/
public static Connection getConnexion(final String serverUrl, final String databaseName, final String login, final String password) throws AgirStatoolException
{
@ -207,6 +214,17 @@ public final class SQLUtils
return result;
}
/**
* Gets the nullable long.
*
* @param resultSet
* the result set
* @param index
* the index
* @return the nullable long
* @throws SQLException
* the SQL exception
*/
public static Long getNullableLong(final ResultSet resultSet, final int index) throws SQLException
{
Long result;

16
src/org/april/agirstatool/core/AgirStatool.java

@ -224,13 +224,9 @@ public class AgirStatool
/**
* Fetch week concluded count.
*
* In Redmine database: closed_on when resolved, rejected or closed.
*
* @param project
* the project
* @param consolidated
* the consolidated
* @return the date count map
* @throws AgirStatoolException
* the agir statool exception
@ -311,8 +307,6 @@ public class AgirStatool
*
* @param project
* the project
* @param consolidated
* the consolidated
* @return the date count map
* @throws AgirStatoolException
* the agir statool exception
@ -389,9 +383,9 @@ public class AgirStatool
}
/**
* Gets the project all.
* Gets the root project.
*
* @return the project all
* @return the root project
* @throws AgirStatoolException
* the agir statool exception
*/
@ -693,10 +687,10 @@ public class AgirStatool
}
/**
* List projects.
* List projects with stats.
*
* @param consolidated
* the consolidated
* @param type
* the type
* @return the projects
* @throws AgirStatoolException
* the agir statool exception

6
src/org/april/agirstatool/core/AgirStatoolUtils.java

@ -286,9 +286,13 @@ public class AgirStatoolUtils
}
/**
* To human short.
*
* @param value
* the value
* @param defaultValue
* @return
* the default value
* @return the string
*/
public static String toHumanShort(final LocalDateTime value, final String defaultValue)
{

4
src/org/april/agirstatool/core/Project.java

@ -141,7 +141,9 @@ public class Project
}
/**
* @return
* Checks for issue.
*
* @return true, if successful
*/
public boolean hasIssue()
{

32
src/org/april/agirstatool/core/ProjectComparator.java

@ -17,8 +17,10 @@ public class ProjectComparator implements Comparator<Project>
private Sorting sorting;
/**
*
* Instantiates a new project comparator.
*
* @param sorting
* the sorting
*/
public ProjectComparator(final Sorting sorting)
{
@ -41,7 +43,15 @@ public class ProjectComparator implements Comparator<Project>
}
/**
*
* Compare.
*
* @param alpha
* the alpha
* @param bravo
* the bravo
* @param sorting
* the sorting
* @return the int
*/
public static int compare(final Project alpha, final Project bravo, final Sorting sorting)
{
@ -74,9 +84,11 @@ public class ProjectComparator implements Comparator<Project>
}
/**
*
* Gets the id.
*
* @param source
* @return
* the source
* @return the id
*/
public static Long getId(final Project source)
{
@ -96,9 +108,11 @@ public class ProjectComparator implements Comparator<Project>
}
/**
*
* Gets the identifier.
*
* @param source
* @return
* the source
* @return the identifier
*/
public static String getIdentifier(final Project source)
{
@ -118,9 +132,11 @@ public class ProjectComparator implements Comparator<Project>
}
/**
*
* Gets the name.
*
* @param source
* @return
* the source
* @return the name
*/
public static String getName(final Project source)
{

10
src/org/april/agirstatool/core/pages/ChartBarView.java

@ -40,8 +40,14 @@ public class ChartBarView
/**
* Builds the.
*
* @param projects
* the projects
* @param title
* the title
* @param labelTitle
* the label title
* @param labels
* the labels
* @param values
* the values
* @return the string
* @throws AgirStatoolException
* the agir statool exception

10
src/org/april/agirstatool/core/pages/ChartPolarView.java

@ -40,8 +40,14 @@ public class ChartPolarView
/**
* Builds the.
*
* @param projects
* the projects
* @param title
* the title
* @param labelTitle
* the label title
* @param labels
* the labels
* @param values
* the values
* @return the string
* @throws AgirStatoolException
* the agir statool exception

15
src/org/april/agirstatool/core/pages/CreatedConcludedCountChartView.java

@ -97,10 +97,12 @@ public class CreatedConcludedCountChartView
}
/**
* Builds the.
* Builds the full.
*
* @param projects
* the projects
* @param title
* the title
* @param project
* the project
* @return the string
* @throws AgirStatoolException
* the agir statool exception
@ -167,10 +169,15 @@ public class CreatedConcludedCountChartView
}
/**
* Builds the previous year.
*
* @param title
* the title
* @param project
* @return
* the project
* @return the string
* @throws AgirStatoolException
* the agir statool exception
*/
public static String buildPreviousYear(final String title, final Project project) throws AgirStatoolException
{

12
src/org/april/agirstatool/core/pages/IssueStatChartView.java

@ -35,8 +35,10 @@ public class IssueStatChartView
/**
* Builds the.
*
* @param projects
* the projects
* @param title
* the title
* @param project
* the project
* @return the string
* @throws AgirStatoolException
* the agir statool exception
@ -64,8 +66,10 @@ public class IssueStatChartView
/**
* Builds the grouped.
*
* @param stats
* the stats
* @param title
* the title
* @param project
* the project
* @return the string
* @throws AgirStatoolException
* the agir statool exception

4
src/org/april/agirstatool/core/pages/ProjectPage.java

@ -39,8 +39,8 @@ public class ProjectPage
/**
* Builds the.
*
* @param projects
* the projects
* @param project
* the project
* @return the string
* @throws AgirStatoolException
* the agir statool exception

4
src/org/april/agirstatool/core/pages/ProjectsGroupedView.java

@ -42,8 +42,8 @@ public class ProjectsGroupedView
/**
* Builds the.
*
* @param projects
* the projects
* @param project
* the project
* @return the string
* @throws AgirStatoolException
* the agir statool exception

4
src/org/april/agirstatool/core/pages/ProjectsRawView.java

@ -40,8 +40,8 @@ public class ProjectsRawView
/**
* Builds the.
*
* @param projects
* the projects
* @param project
* the project
* @return the string
* @throws AgirStatoolException
* the agir statool exception

16
src/org/april/agirstatool/core/pages/UnassignedPolarChartView.java

@ -34,10 +34,12 @@ public class UnassignedPolarChartView
private static Logger logger = LoggerFactory.getLogger(UnassignedPolarChartView.class);
/**
* Builds the grouped.
* Builds the.
*
* @param stats
* the stats
* @param title
* the title
* @param project
* the project
* @return the string
* @throws AgirStatoolException
* the agir statool exception
@ -64,10 +66,12 @@ public class UnassignedPolarChartView
}
/**
* Builds the.
* Builds the grouped.
*
* @param projects
* the projects
* @param title
* the title
* @param project
* the project
* @return the string
* @throws AgirStatoolException
* the agir statool exception

Loading…
Cancel
Save