diff --git a/build-appjar.xml b/build-appjar.xml index a26f195..90fa58f 100644 --- a/build-appjar.xml +++ b/build-appjar.xml @@ -57,6 +57,8 @@ + + diff --git a/src/fr/devinsy/statoolinfos/app/StatoolInfosApp.java b/src/fr/devinsy/statoolinfos/app/StatoolInfosApp.java index 53d8a94..277a0b7 100644 --- a/src/fr/devinsy/statoolinfos/app/StatoolInfosApp.java +++ b/src/fr/devinsy/statoolinfos/app/StatoolInfosApp.java @@ -598,6 +598,8 @@ public class StatoolInfosApp * * @param source * the source + * @param filter + * the filter */ public static void listUserAgents(final Files source, final BotFilter filter) { @@ -705,6 +707,8 @@ public class StatoolInfosApp * * @param source * the source + * @param filter + * the filter */ public static void listVisitors(final Files source, final BotFilter filter) { @@ -749,10 +753,12 @@ public class StatoolInfosApp } /** - * Stat. + * Probe. * * @param configurationFile * the configuration file + * @param dayCountFilter + * the day count filter * @throws StatoolInfosException * the statool infos exception * @throws IOException @@ -828,6 +834,8 @@ public class StatoolInfosApp * * @param source * the source + * @param filter + * the filter */ public static void statIps(final Files source, final BotFilter filter) { @@ -937,6 +945,8 @@ public class StatoolInfosApp * * @param source * the source + * @param filter + * the filter */ public static void statUserAgents(final Files source, final BotFilter filter) { @@ -1049,6 +1059,8 @@ public class StatoolInfosApp * * @param source * the source + * @param filter + * the filter */ public static void statVisitors(final Files source, final BotFilter filter) { diff --git a/src/fr/devinsy/statoolinfos/checker/PropertyCheck.java b/src/fr/devinsy/statoolinfos/checker/PropertyCheck.java index e8ad152..bb34d7d 100644 --- a/src/fr/devinsy/statoolinfos/checker/PropertyCheck.java +++ b/src/fr/devinsy/statoolinfos/checker/PropertyCheck.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Christian Pierre MOMON + * Copyright (C) 2020-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -80,51 +80,106 @@ public class PropertyCheck this.comment = comment; } + /** + * Gets the comment. + * + * @return the comment + */ public String getComment() { return this.comment; } + /** + * Gets the file name. + * + * @return the file name + */ public String getFileName() { return this.fileName; } + /** + * Gets the index. + * + * @return the index + */ public long getIndex() { return this.index; } + /** + * Gets the line. + * + * @return the line + */ public String getLine() { return this.line; } + /** + * Gets the status. + * + * @return the status + */ public Status getStatus() { return this.status; } + /** + * Sets the comment. + * + * @param comment + * the new comment + */ public void setComment(final String comment) { this.comment = comment; } + /** + * Sets the file name. + * + * @param fileName + * the new file name + */ public void setFileName(final String fileName) { this.fileName = fileName; } + /** + * Sets the index. + * + * @param index + * the new index + */ public void setIndex(final long index) { this.index = index; } + /** + * Sets the line. + * + * @param line + * the new line + */ public void setLine(final String line) { this.line = line; } + /** + * Sets the status. + * + * @param status + * the new status + */ public void setStatus(final Status status) { this.status = status; diff --git a/src/fr/devinsy/statoolinfos/checker/PropertyRule.java b/src/fr/devinsy/statoolinfos/checker/PropertyRule.java index 67fd001..ba951ea 100644 --- a/src/fr/devinsy/statoolinfos/checker/PropertyRule.java +++ b/src/fr/devinsy/statoolinfos/checker/PropertyRule.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Christian Pierre MOMON + * Copyright (C) 2020-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -76,8 +76,11 @@ public class PropertyRule } /** + * Check path. + * * @param value - * @return + * the value + * @return true, if successful */ public boolean checkPath(final String value) { @@ -108,11 +111,21 @@ public class PropertyRule return result; } + /** + * Gets the label. + * + * @return the label + */ public String getLabel() { return this.label; } + /** + * Gets the mode. + * + * @return the mode + */ public PropertyMode getMode() { return this.mode; @@ -214,6 +227,12 @@ public class PropertyRule return result; } + /** + * Sets the mode. + * + * @param mode + * the new mode + */ public void setMode(final PropertyMode mode) { this.mode = mode; diff --git a/src/fr/devinsy/statoolinfos/core/Organization.java b/src/fr/devinsy/statoolinfos/core/Organization.java index e21eb87..1134d7a 100644 --- a/src/fr/devinsy/statoolinfos/core/Organization.java +++ b/src/fr/devinsy/statoolinfos/core/Organization.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2022 Christian Pierre MOMON + * Copyright (C) 2020-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -1399,21 +1399,45 @@ public class Organization extends PathPropertyList return result; } + /** + * Sets the federation. + * + * @param federation + * the new federation + */ public void setFederation(final Federation federation) { this.federation = federation; } + /** + * Sets the input file. + * + * @param inputFile + * the new input file + */ public void setInputFile(final File inputFile) { this.inputFile = inputFile; } + /** + * Sets the input URL. + * + * @param inputURL + * the new input URL + */ public void setInputURL(final URL inputURL) { this.inputURL = inputURL; } + /** + * Sets the logo file name. + * + * @param logoFileName + * the new logo file name + */ public void setLogoFileName(final String logoFileName) { this.logoFileName = logoFileName; diff --git a/src/fr/devinsy/statoolinfos/core/Service.java b/src/fr/devinsy/statoolinfos/core/Service.java index fb301b8..e70264e 100644 --- a/src/fr/devinsy/statoolinfos/core/Service.java +++ b/src/fr/devinsy/statoolinfos/core/Service.java @@ -219,6 +219,11 @@ public class Service extends PathPropertyList return result; } + /** + * Gets the crawl journal. + * + * @return the crawl journal + */ public CrawlJournal getCrawlJournal() { return this.crawlJournal; @@ -386,6 +391,11 @@ public class Service extends PathPropertyList return result; } + /** + * Gets the input checks. + * + * @return the input checks + */ public PropertyChecks getInputChecks() { return this.inputChecks; @@ -413,11 +423,21 @@ public class Service extends PathPropertyList return result; } + /** + * Gets the input file. + * + * @return the input file + */ public File getInputFile() { return this.inputFile; } + /** + * Gets the input URL. + * + * @return the input URL + */ public URL getInputURL() { return this.inputURL; @@ -505,6 +525,11 @@ public class Service extends PathPropertyList return result; } + /** + * Gets the metrics. + * + * @return the metrics + */ public MetricsList getMetrics() { return this.metricsList; @@ -1262,21 +1287,45 @@ public class Service extends PathPropertyList return result; } + /** + * Sets the input file. + * + * @param inputFile + * the new input file + */ public void setInputFile(final File inputFile) { this.inputFile = inputFile; } + /** + * Sets the input URL. + * + * @param inputURL + * the new input URL + */ public void setInputURL(final URL inputURL) { this.inputURL = inputURL; } + /** + * Sets the logo file name. + * + * @param logoFileName + * the new logo file name + */ public void setLogoFileName(final String logoFileName) { this.logoFileName = logoFileName; } + /** + * Sets the organization. + * + * @param organization + * the new organization + */ public void setOrganization(final Organization organization) { this.organization = organization; diff --git a/src/fr/devinsy/statoolinfos/core/Software.java b/src/fr/devinsy/statoolinfos/core/Software.java index 198b03b..327e59b 100644 --- a/src/fr/devinsy/statoolinfos/core/Software.java +++ b/src/fr/devinsy/statoolinfos/core/Software.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Christian Pierre MOMON + * Copyright (C) 2020-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -72,16 +72,31 @@ public class Software this.aliases = new StringList(softwares); } + /** + * Gets the aliases. + * + * @return the aliases + */ public StringList getAliases() { return this.aliases; } + /** + * Gets the description. + * + * @return the description + */ public String getDescription() { return this.description; } + /** + * Gets the name. + * + * @return the name + */ public String getName() { return this.name; @@ -102,20 +117,30 @@ public class Software return result; } + /** + * Sets the description. + * + * @param description + * the new description + */ public void setDescription(final String description) { this.description = description; } + /** + * Sets the name. + * + * @param name + * the new name + */ public void setName(final String name) { this.name = name; } - /** - * To string. - * - * @return the string + /* + * {@inheritDoc} */ @Override public String toString() diff --git a/src/fr/devinsy/statoolinfos/core/StatoolInfosContext.java b/src/fr/devinsy/statoolinfos/core/StatoolInfosContext.java index 1495234..cbd3ee3 100644 --- a/src/fr/devinsy/statoolinfos/core/StatoolInfosContext.java +++ b/src/fr/devinsy/statoolinfos/core/StatoolInfosContext.java @@ -42,10 +42,14 @@ public class StatoolInfosContext private UptimeJournal uptimeJournal; /** - * Instantiates a new manager. - * - * @throws IOException + * Instantiates a new statool infos context. + * + * @param configurationFile + * the configuration file * @throws StatoolInfosException + * the statool infos exception + * @throws IOException + * Signals that an I/O exception has occurred. */ public StatoolInfosContext(final File configurationFile) throws StatoolInfosException, IOException { @@ -57,8 +61,10 @@ public class StatoolInfosContext * * @param configurationFile * the configuration file - * @throws IOException * @throws StatoolInfosException + * the statool infos exception + * @throws IOException + * Signals that an I/O exception has occurred. */ public void configure(final File configurationFile) throws StatoolInfosException, IOException { diff --git a/src/fr/devinsy/statoolinfos/core/StatoolInfosUtils.java b/src/fr/devinsy/statoolinfos/core/StatoolInfosUtils.java index ce4cbe6..03f6db0 100644 --- a/src/fr/devinsy/statoolinfos/core/StatoolInfosUtils.java +++ b/src/fr/devinsy/statoolinfos/core/StatoolInfosUtils.java @@ -607,6 +607,13 @@ public class StatoolInfosUtils return result; } + /** + * To integer. + * + * @param value + * the value + * @return the integer + */ public static Integer toInteger(final String value) { Integer result; @@ -817,6 +824,7 @@ public class StatoolInfosUtils * the url * @return the local date time * @throws IOException + * Signals that an I/O exception has occurred. */ public static LocalDateTime urlLastModified(final URL url) throws IOException { diff --git a/src/fr/devinsy/statoolinfos/io/ODSFile.java b/src/fr/devinsy/statoolinfos/io/ODSFile.java index 05e6342..afbe4da 100644 --- a/src/fr/devinsy/statoolinfos/io/ODSFile.java +++ b/src/fr/devinsy/statoolinfos/io/ODSFile.java @@ -45,6 +45,8 @@ public class ODSFile * the file * @param source * the source + * @throws IOException + * Signals that an I/O exception has occurred. */ public static void save(final File file, final Organizations source) throws IOException { diff --git a/src/fr/devinsy/statoolinfos/io/ODSWriter.java b/src/fr/devinsy/statoolinfos/io/ODSWriter.java index 5590509..c893923 100644 --- a/src/fr/devinsy/statoolinfos/io/ODSWriter.java +++ b/src/fr/devinsy/statoolinfos/io/ODSWriter.java @@ -62,10 +62,11 @@ public class ODSWriter implements SpreadsheetWriter /** * Close. - * - * @throws IOException - * + * * @throws FileNotFoundException + * the file not found exception + * @throws IOException + * Signals that an I/O exception has occurred. */ @Override public void close() throws FileNotFoundException, IOException diff --git a/src/fr/devinsy/statoolinfos/metrics/PathCounter.java b/src/fr/devinsy/statoolinfos/metrics/PathCounter.java index 3d6c19e..ae33126 100644 --- a/src/fr/devinsy/statoolinfos/metrics/PathCounter.java +++ b/src/fr/devinsy/statoolinfos/metrics/PathCounter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Christian Pierre MOMON + * Copyright (C) 2020-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -42,16 +42,31 @@ public class PathCounter this.counter = 0; } + /** + * Gets the counter. + * + * @return the counter + */ public long getCounter() { return this.counter; } + /** + * Gets the path. + * + * @return the path + */ public String getPath() { return this.path; } + /** + * Gets the time mark. + * + * @return the time mark + */ public String getTimeMark() { return this.timeMark; @@ -65,6 +80,12 @@ public class PathCounter this.counter += 1; } + /** + * Inc. + * + * @param value + * the value + */ public void inc(final long value) { this.counter += value; @@ -130,16 +151,34 @@ public class PathCounter return result; } + /** + * Sets the counter. + * + * @param counter + * the new counter + */ public void setCounter(final long counter) { this.counter = counter; } + /** + * Sets the path. + * + * @param path + * the new path + */ public void setPath(final String path) { this.path = path; } + /** + * Sets the time mark. + * + * @param timeMark + * the new time mark + */ public void setTimeMark(final String timeMark) { this.timeMark = timeMark; diff --git a/src/fr/devinsy/statoolinfos/metrics/Prober.java b/src/fr/devinsy/statoolinfos/metrics/Prober.java index a92423e..37ad6ae 100644 --- a/src/fr/devinsy/statoolinfos/metrics/Prober.java +++ b/src/fr/devinsy/statoolinfos/metrics/Prober.java @@ -188,12 +188,16 @@ public class Prober } /** - * Stat. + * Probe. * * @param configurationFile * the configuration file - * @throws IOException + * @param dayCountFilter + * the day count filter * @throws StatoolInfosException + * the statool infos exception + * @throws IOException + * Signals that an I/O exception has occurred. */ public static void probe(final File configurationFile, final int dayCountFilter) throws StatoolInfosException, IOException { diff --git a/src/fr/devinsy/statoolinfos/metrics/StringCounter.java b/src/fr/devinsy/statoolinfos/metrics/StringCounter.java index 4cfb2c7..f99c70c 100644 --- a/src/fr/devinsy/statoolinfos/metrics/StringCounter.java +++ b/src/fr/devinsy/statoolinfos/metrics/StringCounter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -38,11 +38,21 @@ public class StringCounter this.counter = 0; } + /** + * Gets the counter. + * + * @return the counter + */ public long getCounter() { return this.counter; } + /** + * Gets the string. + * + * @return the string + */ public String getString() { return this.string; @@ -56,11 +66,23 @@ public class StringCounter this.counter += 1; } + /** + * Sets the counter. + * + * @param counter + * the new counter + */ public void setCounter(final long counter) { this.counter = counter; } + /** + * Sets the string. + * + * @param string + * the new string + */ public void setString(final String string) { this.string = string; diff --git a/src/fr/devinsy/statoolinfos/metrics/TimeMark.java b/src/fr/devinsy/statoolinfos/metrics/TimeMark.java index 10c0d1e..4c4eea3 100644 --- a/src/fr/devinsy/statoolinfos/metrics/TimeMark.java +++ b/src/fr/devinsy/statoolinfos/metrics/TimeMark.java @@ -161,6 +161,12 @@ public class TimeMark return result; } + /** + * Sets the value. + * + * @param value + * the new value + */ public void setValue(final String value) { this.value = value; diff --git a/src/fr/devinsy/statoolinfos/metrics/UserCounters.java b/src/fr/devinsy/statoolinfos/metrics/UserCounters.java index 71d1726..53154ad 100644 --- a/src/fr/devinsy/statoolinfos/metrics/UserCounters.java +++ b/src/fr/devinsy/statoolinfos/metrics/UserCounters.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -59,6 +59,8 @@ public class UserCounters extends HashMap /** * Gets the counters. * + * @param prefix + * the prefix * @return the counters */ public PathCounters getCounters(final String prefix) diff --git a/src/fr/devinsy/statoolinfos/metrics/mumble/MumbleLog.java b/src/fr/devinsy/statoolinfos/metrics/mumble/MumbleLog.java index efd254f..df2a52d 100644 --- a/src/fr/devinsy/statoolinfos/metrics/mumble/MumbleLog.java +++ b/src/fr/devinsy/statoolinfos/metrics/mumble/MumbleLog.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2022 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -244,25 +244,41 @@ public class MumbleLog return result; } + /** + * Sets the level. + * + * @param level + * the new level + */ public void setLevel(final MumbleLogLevel level) { this.level = level; } + /** + * Sets the message. + * + * @param message + * the new message + */ public void setMessage(final String message) { this.message = message; } + /** + * Sets the time. + * + * @param time + * the new time + */ public void setTime(final LocalDateTime time) { this.time = time; } /** - * To string. - * - * @return the string + * {@inheritDoc} */ @Override public String toString() diff --git a/src/fr/devinsy/statoolinfos/metrics/privatebin/PrivatebinPatchLog.java b/src/fr/devinsy/statoolinfos/metrics/privatebin/PrivatebinPatchLog.java index 9a5186b..fa102ed 100644 --- a/src/fr/devinsy/statoolinfos/metrics/privatebin/PrivatebinPatchLog.java +++ b/src/fr/devinsy/statoolinfos/metrics/privatebin/PrivatebinPatchLog.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Christian Pierre MOMON + * Copyright (C) 2022-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -43,6 +43,11 @@ public class PrivatebinPatchLog this.id = null; } + /** + * Gets the action. + * + * @return the action + */ public PrivatebinLogAction getAction() { return this.action; @@ -63,11 +68,21 @@ public class PrivatebinPatchLog return result; } + /** + * Gets the id. + * + * @return the id + */ public String getId() { return this.id; } + /** + * Gets the time. + * + * @return the time + */ public LocalDateTime getTime() { return this.time; @@ -136,16 +151,34 @@ public class PrivatebinPatchLog return result; } + /** + * Sets the action. + * + * @param action + * the new action + */ public void setAction(final PrivatebinLogAction action) { this.action = action; } + /** + * Sets the id. + * + * @param id + * the new id + */ public void setId(final String id) { this.id = id; } + /** + * Sets the time. + * + * @param time + * the new time + */ public void setTime(final LocalDateTime time) { this.time = time; diff --git a/src/fr/devinsy/statoolinfos/metrics/privatebin/PrivatebinPatchLogProber.java b/src/fr/devinsy/statoolinfos/metrics/privatebin/PrivatebinPatchLogProber.java index c560d7c..09061b2 100644 --- a/src/fr/devinsy/statoolinfos/metrics/privatebin/PrivatebinPatchLogProber.java +++ b/src/fr/devinsy/statoolinfos/metrics/privatebin/PrivatebinPatchLogProber.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Christian Pierre MOMON + * Copyright (C) 2022-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -84,6 +84,8 @@ public class PrivatebinPatchLogProber * @param file * the file * @return the path counters + * @throws IOException + * Signals that an I/O exception has occurred. */ public static PathCounters probe(final File file) throws IOException { diff --git a/src/fr/devinsy/statoolinfos/properties/PathProperties.java b/src/fr/devinsy/statoolinfos/properties/PathProperties.java index a3c528e..1c75a73 100644 --- a/src/fr/devinsy/statoolinfos/properties/PathProperties.java +++ b/src/fr/devinsy/statoolinfos/properties/PathProperties.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Christian Pierre MOMON + * Copyright (C) 2020-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -29,8 +29,22 @@ import fr.devinsy.strings.StringSet; */ public interface PathProperties extends Iterable { + + /** + * Adds the. + * + * @param source + * the source + */ void add(PathProperties source); + /** + * Adds the. + * + * @param property + * the property + * @return true, if successful + */ boolean add(PathProperty property); /** diff --git a/src/fr/devinsy/statoolinfos/properties/PathProperty.java b/src/fr/devinsy/statoolinfos/properties/PathProperty.java index 7defa59..d9bb67c 100644 --- a/src/fr/devinsy/statoolinfos/properties/PathProperty.java +++ b/src/fr/devinsy/statoolinfos/properties/PathProperty.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Christian Pierre MOMON + * Copyright (C) 2020-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -216,16 +216,33 @@ public class PathProperty return result; } + /** + * Gets the value. + * + * @return the value + */ public String getValue() { return this.value; } + /** + * Sets the path. + * + * @param path + * the new path + */ public void setPath(final String path) { this.path = path; } + /** + * Sets the value. + * + * @param value + * the new value + */ public void setValue(final String value) { this.value = value; diff --git a/src/fr/devinsy/statoolinfos/properties/WeekValues.java b/src/fr/devinsy/statoolinfos/properties/WeekValues.java index b9c7d92..b624de8 100644 --- a/src/fr/devinsy/statoolinfos/properties/WeekValues.java +++ b/src/fr/devinsy/statoolinfos/properties/WeekValues.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -30,6 +30,7 @@ import fr.devinsy.strings.StringList; public class WeekValues extends HashMap { private static final long serialVersionUID = -211990850389225574L; + private String label; private String description; @@ -127,11 +128,21 @@ public class WeekValues extends HashMap return result; } + /** + * Gets the description. + * + * @return the description + */ public String getDescription() { return this.description; } + /** + * Gets the label. + * + * @return the label + */ public String getLabel() { return this.label; @@ -270,11 +281,23 @@ public class WeekValues extends HashMap return result; } + /** + * Sets the description. + * + * @param description + * the new description + */ public void setDescription(final String description) { this.description = description; } + /** + * Sets the label. + * + * @param label + * the new label + */ public void setLabel(final String label) { this.label = label; diff --git a/src/fr/devinsy/statoolinfos/properties/YearValues.java b/src/fr/devinsy/statoolinfos/properties/YearValues.java index e2cc54a..5b45739 100644 --- a/src/fr/devinsy/statoolinfos/properties/YearValues.java +++ b/src/fr/devinsy/statoolinfos/properties/YearValues.java @@ -29,6 +29,7 @@ import fr.devinsy.strings.StringList; public class YearValues extends HashMap { private static final long serialVersionUID = -3584379965186135356L; + private String label; private String description; diff --git a/src/fr/devinsy/statoolinfos/stats/StatAgent.java b/src/fr/devinsy/statoolinfos/stats/StatAgent.java index 98f191e..c33b989 100644 --- a/src/fr/devinsy/statoolinfos/stats/StatAgent.java +++ b/src/fr/devinsy/statoolinfos/stats/StatAgent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2022 Christian Pierre MOMON + * Copyright (C) 2020-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -148,9 +148,13 @@ public class StatAgent * * @param federation * the federation + * @param cache + * the cache * @return the properties file stats - * @throws IOException * @throws MalformedURLException + * the malformed URL exception + * @throws IOException + * Signals that an I/O exception has occurred. */ public static PropertiesFileStats statAllPropertiesFiles(final Federation federation, final CrawlCache cache) throws MalformedURLException, IOException { @@ -182,6 +186,8 @@ public class StatAgent * * @param federation * the federation + * @param categories + * the categories * @return the software stats */ public static SoftwareStats statAllSoftwares(final Federation federation, final Categories categories) @@ -468,8 +474,11 @@ public class StatAgent } /** + * Stat services properties. + * * @param services - * @return + * the services + * @return the property stats */ public static PropertyStats statServicesProperties(final Services services) { diff --git a/src/fr/devinsy/statoolinfos/stats/organizations/OrganizationTurnoutStats.java b/src/fr/devinsy/statoolinfos/stats/organizations/OrganizationTurnoutStats.java index a356caf..0ca209c 100644 --- a/src/fr/devinsy/statoolinfos/stats/organizations/OrganizationTurnoutStats.java +++ b/src/fr/devinsy/statoolinfos/stats/organizations/OrganizationTurnoutStats.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Christian Pierre MOMON + * Copyright (C) 2020-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -35,6 +35,11 @@ public class OrganizationTurnoutStats { } + /** + * Gets the passive count. + * + * @return the passive count + */ public long getPassiveCount() { return this.passiveCount; @@ -55,41 +60,74 @@ public class OrganizationTurnoutStats return result; } + /** + * Gets the with self file count. + * + * @return the with self file count + */ public long getWithSelfFileCount() { return this.withSelfFileCount; } + /** + * Gets the with service file count. + * + * @return the with service file count + */ public long getWithServiceFileCount() { return this.withServiceFileCount; } + /** + * Gets the with service metric count. + * + * @return the with service metric count + */ public long getWithServiceMetricCount() { return this.withServiceMetricCount; } + /** + * Inc passive count. + */ public void incPassiveCount() { this.passiveCount += 1; } + /** + * Inc with self file count. + */ public void incWithSelfFileCount() { this.withSelfFileCount += 1; } + /** + * Inc with service file count. + */ public void incWithServiceFileCount() { this.withServiceFileCount += 1; } + /** + * Inc with service metric count. + */ public void incWithServiceMetricCount() { this.withServiceMetricCount += 1; } + /** + * Sets the passive count. + * + * @param passiveCount + * the new passive count + */ public void setPassiveCount(final long passiveCount) { this.passiveCount = passiveCount; diff --git a/src/fr/devinsy/statoolinfos/stats/organizations/OrganizationTypeStats.java b/src/fr/devinsy/statoolinfos/stats/organizations/OrganizationTypeStats.java index 44fcf34..770bd98 100644 --- a/src/fr/devinsy/statoolinfos/stats/organizations/OrganizationTypeStats.java +++ b/src/fr/devinsy/statoolinfos/stats/organizations/OrganizationTypeStats.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Christian Pierre MOMON + * Copyright (C) 2022-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -49,41 +49,81 @@ public class OrganizationTypeStats this.unknownCount = 0; } + /** + * Gets the association count. + * + * @return the association count + */ public long getAssociationCount() { return this.associationCount; } + /** + * Gets the company count. + * + * @return the company count + */ public long getCompanyCount() { return this.companyCount; } + /** + * Gets the cooperative count. + * + * @return the cooperative count + */ public long getCooperativeCount() { return this.cooperativeCount; } + /** + * Gets the individual count. + * + * @return the individual count + */ public long getIndividualCount() { return this.individualCount; } + /** + * Gets the informal count. + * + * @return the informal count + */ public long getInformalCount() { return this.informalCount; } + /** + * Gets the microcompany count. + * + * @return the microcompany count + */ public long getMicrocompanyCount() { return this.microcompanyCount; } + /** + * Gets the other count. + * + * @return the other count + */ public long getOtherCount() { return this.otherCount; } + /** + * Gets the unknown count. + * + * @return the unknown count + */ public long getUnknownCount() { return this.unknownCount; diff --git a/src/fr/devinsy/statoolinfos/stats/properties/PropertyStat.java b/src/fr/devinsy/statoolinfos/stats/properties/PropertyStat.java index 7a072c1..c829127 100644 --- a/src/fr/devinsy/statoolinfos/stats/properties/PropertyStat.java +++ b/src/fr/devinsy/statoolinfos/stats/properties/PropertyStat.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Christian Pierre MOMON + * Copyright (C) 2020-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -46,16 +46,31 @@ public class PropertyStat } } + /** + * Gets the blank count. + * + * @return the blank count + */ public int getBlankCount() { return this.blankCount; } + /** + * Gets the filled count. + * + * @return the filled count + */ public int getFilledCount() { return this.filledCount; } + /** + * Gets the path. + * + * @return the path + */ public String getPath() { return this.path; @@ -77,11 +92,23 @@ public class PropertyStat this.filledCount += 1; } + /** + * Sets the blank count. + * + * @param blankCount + * the new blank count + */ public void setBlankCount(final int blankCount) { this.blankCount = blankCount; } + /** + * Sets the filled count. + * + * @param filledCount + * the new filled count + */ public void setFilledCount(final int filledCount) { this.filledCount = filledCount; diff --git a/src/fr/devinsy/statoolinfos/stats/properties/PropertyStats.java b/src/fr/devinsy/statoolinfos/stats/properties/PropertyStats.java index 053e04a..a6a3d9a 100644 --- a/src/fr/devinsy/statoolinfos/stats/properties/PropertyStats.java +++ b/src/fr/devinsy/statoolinfos/stats/properties/PropertyStats.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Christian Pierre MOMON + * Copyright (C) 2020-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -91,7 +91,9 @@ public class PropertyStats } /** - * @return + * Gets the list. + * + * @return the list */ public PropertyStatList getList() { @@ -131,6 +133,11 @@ public class PropertyStats return result; } + /** + * Gets the property count. + * + * @return the property count + */ public int getPropertyCount() { return this.stats.size(); @@ -178,5 +185,4 @@ public class PropertyStats this.stats.put(stat); } } - } diff --git a/src/fr/devinsy/statoolinfos/stats/propertyfiles/PropertiesFileStat.java b/src/fr/devinsy/statoolinfos/stats/propertyfiles/PropertiesFileStat.java index e398239..3127a19 100644 --- a/src/fr/devinsy/statoolinfos/stats/propertyfiles/PropertiesFileStat.java +++ b/src/fr/devinsy/statoolinfos/stats/propertyfiles/PropertiesFileStat.java @@ -50,176 +50,348 @@ public class PropertiesFileStat { } + /** + * Gets the active line count. + * + * @return the active line count + */ public int getActiveLineCount() { return this.activeLineCount; } + /** + * Gets the alert count. + * + * @return the alert count + */ public int getAlertCount() { return this.alertCount; } + /** + * Gets the blank property count. + * + * @return the blank property count + */ public int getBlankPropertyCount() { return this.blankPropertyCount; } + /** + * Gets the error count. + * + * @return the error count + */ public int getErrorCount() { return this.errorCount; } + /** + * Gets the filled property count. + * + * @return the filled property count + */ public int getFilledPropertyCount() { return this.filledPropertyCount; } + /** + * Gets the line count. + * + * @return the line count + */ public int getLineCount() { return this.lineCount; } + /** + * Gets the organization. + * + * @return the organization + */ public Organization getOrganization() { return this.organization; } + /** + * Gets the property count. + * + * @return the property count + */ public int getPropertyCount() { return this.activeLineCount; } + /** + * Gets the service. + * + * @return the service + */ public Service getService() { return this.service; } + /** + * Gets the update date. + * + * @return the update date + */ public LocalDateTime getUpdateDate() { return this.updateDate; } + /** + * Gets the url. + * + * @return the url + */ public URL getURL() { return this.url; } + /** + * Gets the URL name. + * + * @return the URL name + */ public String getURLName() { return this.urlName; } + /** + * Gets the void count. + * + * @return the void count + */ public int getVoidCount() { return this.voidCount; } + /** + * Gets the warning count. + * + * @return the warning count + */ public int getWarningCount() { return this.warningCount; } + /** + * Inc active line count. + */ public void incActiveLineCount() { this.activeLineCount += 1; } + /** + * Inc alert count. + */ public void incAlertCount() { this.alertCount += 1; } + /** + * Inc blank property count. + */ public void incBlankPropertyCount() { this.blankPropertyCount += 1; } + /** + * Inc error count. + */ public void incErrorCount() { this.errorCount += 1; } + /** + * Inc filled property count. + */ public void incFilledPropertyCount() { this.filledPropertyCount += 1; } + /** + * Inc line count. + */ public void incLineCount() { this.lineCount += 1; } + /** + * Inc void count. + */ public void incVoidCount() { this.voidCount += 1; } + /** + * Inc warning count. + */ public void incWarningCount() { this.warningCount += 1; } + /** + * Sets the active line count. + * + * @param activeLineCount + * the new active line count + */ public void setActiveLineCount(final int activeLineCount) { this.activeLineCount = activeLineCount; } + /** + * Sets the alert count. + * + * @param alertCount + * the new alert count + */ public void setAlertCount(final int alertCount) { this.alertCount = alertCount; } + /** + * Sets the blank property count. + * + * @param blankPropertyCount + * the new blank property count + */ public void setBlankPropertyCount(final int blankPropertyCount) { this.blankPropertyCount = blankPropertyCount; } + /** + * Sets the error count. + * + * @param errorCount + * the new error count + */ public void setErrorCount(final int errorCount) { this.errorCount = errorCount; } + /** + * Sets the filled property count. + * + * @param filledPropertyCount + * the new filled property count + */ public void setFilledPropertyCount(final int filledPropertyCount) { this.filledPropertyCount = filledPropertyCount; } + /** + * Sets the line count. + * + * @param lineCount + * the new line count + */ public void setLineCount(final int lineCount) { this.lineCount = lineCount; } + /** + * Sets the organization. + * + * @param organization + * the new organization + */ public void setOrganization(final Organization organization) { this.organization = organization; } + /** + * Sets the service. + * + * @param service + * the new service + */ public void setService(final Service service) { this.service = service; } + /** + * Sets the update date. + * + * @param updateDate + * the new update date + */ public void setUpdateDate(final LocalDateTime updateDate) { this.updateDate = updateDate; } + /** + * Sets the url. + * + * @param url + * the new url + */ public void setURL(final URL url) { this.url = url; } + /** + * Sets the URL name. + * + * @param localName + * the new URL name + */ public void setURLName(final String localName) { this.urlName = localName; } + /** + * Sets the void count. + * + * @param voidCount + * the new void count + */ public void setVoidCount(final int voidCount) { this.voidCount = voidCount; } + /** + * Sets the warning count. + * + * @param warningCount + * the new warning count + */ public void setWarningCount(final int warningCount) { this.warningCount = warningCount; diff --git a/src/fr/devinsy/statoolinfos/stats/propertyfiles/PropertiesFileStatComparator.java b/src/fr/devinsy/statoolinfos/stats/propertyfiles/PropertiesFileStatComparator.java index d6d9760..d09b1ee 100644 --- a/src/fr/devinsy/statoolinfos/stats/propertyfiles/PropertiesFileStatComparator.java +++ b/src/fr/devinsy/statoolinfos/stats/propertyfiles/PropertiesFileStatComparator.java @@ -226,6 +226,13 @@ public class PropertiesFileStatComparator implements Comparator return result; } + /** + * Gets the error count. + * + * @return the error count + */ public long getErrorCount() { long result; @@ -271,6 +276,8 @@ public class PropertiesFileStats extends ArrayList * * @param metrics * the metrics + * @param organization + * the organization * @throws IOException * Signals that an I/O exception has occurred. */ diff --git a/src/fr/devinsy/statoolinfos/stats/services/RegistrationStats.java b/src/fr/devinsy/statoolinfos/stats/services/RegistrationStats.java index aab3f54..7ec934a 100644 --- a/src/fr/devinsy/statoolinfos/stats/services/RegistrationStats.java +++ b/src/fr/devinsy/statoolinfos/stats/services/RegistrationStats.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Christian Pierre MOMON + * Copyright (C) 2020-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -43,6 +43,11 @@ public class RegistrationStats this.unknownCount = 0; } + /** + * Gets the client count. + * + * @return the client count + */ public long getClientCount() { return this.clientCount; @@ -63,21 +68,41 @@ public class RegistrationStats return result; } + /** + * Gets the free count. + * + * @return the free count + */ public long getFreeCount() { return this.freeCount; } + /** + * Gets the member count. + * + * @return the member count + */ public long getMemberCount() { return this.memberCount; } + /** + * Gets the none count. + * + * @return the none count + */ public long getNoneCount() { return this.noneCount; } + /** + * Gets the unknown count. + * + * @return the unknown count + */ public long getUnknownCount() { return this.unknownCount; diff --git a/src/fr/devinsy/statoolinfos/stats/services/ServiceInstallTypeStats.java b/src/fr/devinsy/statoolinfos/stats/services/ServiceInstallTypeStats.java index 303269d..05565c6 100644 --- a/src/fr/devinsy/statoolinfos/stats/services/ServiceInstallTypeStats.java +++ b/src/fr/devinsy/statoolinfos/stats/services/ServiceInstallTypeStats.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -51,46 +51,91 @@ public class ServiceInstallTypeStats this.unknownCount = 0; } + /** + * Gets the archive count. + * + * @return the archive count + */ public long getArchiveCount() { return this.archiveCount; } + /** + * Gets the clonerepo count. + * + * @return the clonerepo count + */ public long getClonerepoCount() { return this.clonerepoCount; } + /** + * Gets the container count. + * + * @return the container count + */ public long getContainerCount() { return this.containerCount; } + /** + * Gets the distribution count. + * + * @return the distribution count + */ public long getDistributionCount() { return this.distributionCount; } + /** + * Gets the package count. + * + * @return the package count + */ public long getPackageCount() { return this.packageCount; } + /** + * Gets the provider count. + * + * @return the provider count + */ public long getProviderCount() { return this.providerCount; } + /** + * Gets the sources count. + * + * @return the sources count + */ public long getSourcesCount() { return this.sourcesCount; } + /** + * Gets the tooling count. + * + * @return the tooling count + */ public long getToolingCount() { return this.toolingCount; } + /** + * Gets the unknown count. + * + * @return the unknown count + */ public long getUnknownCount() { return this.unknownCount; diff --git a/src/fr/devinsy/statoolinfos/stats/softwares/SoftwareStat.java b/src/fr/devinsy/statoolinfos/stats/softwares/SoftwareStat.java index f081840..d81b3a5 100644 --- a/src/fr/devinsy/statoolinfos/stats/softwares/SoftwareStat.java +++ b/src/fr/devinsy/statoolinfos/stats/softwares/SoftwareStat.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2022 Christian Pierre MOMON + * Copyright (C) 2020-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -50,21 +50,41 @@ public class SoftwareStat this.userCount = 0; } + /** + * Gets the categories. + * + * @return the categories + */ public Categories getCategories() { return this.categories; } + /** + * Gets the name. + * + * @return the name + */ public String getName() { return this.name; } + /** + * Gets the organization count. + * + * @return the organization count + */ public int getOrganizationCount() { return this.organizationCount; } + /** + * Gets the service count. + * + * @return the service count + */ public int getServiceCount() { return this.serviceCount; @@ -85,11 +105,21 @@ public class SoftwareStat return result; } + /** + * Gets the user count. + * + * @return the user count + */ public int getUserCount() { return this.userCount; } + /** + * Gets the visit count. + * + * @return the visit count + */ public int getVisitCount() { return this.visitCount; @@ -141,26 +171,56 @@ public class SoftwareStat this.visitCount += value; } + /** + * Sets the name. + * + * @param name + * the new name + */ public void setName(final String name) { this.name = name; } + /** + * Sets the organization count. + * + * @param organizationCount + * the new organization count + */ public void setOrganizationCount(final int organizationCount) { this.organizationCount = organizationCount; } + /** + * Sets the service count. + * + * @param serviceCount + * the new service count + */ public void setServiceCount(final int serviceCount) { this.serviceCount = serviceCount; } + /** + * Sets the user count. + * + * @param userCount + * the new user count + */ public void setUserCount(final int userCount) { this.userCount = userCount; } + /** + * Sets the visit count. + * + * @param visitCount + * the new visit count + */ public void setVisitCount(final int visitCount) { this.visitCount = visitCount; diff --git a/src/fr/devinsy/statoolinfos/stats/useragent/UserAgentStat.java b/src/fr/devinsy/statoolinfos/stats/useragent/UserAgentStat.java index bd57817..8c174ee 100644 --- a/src/fr/devinsy/statoolinfos/stats/useragent/UserAgentStat.java +++ b/src/fr/devinsy/statoolinfos/stats/useragent/UserAgentStat.java @@ -47,16 +47,31 @@ public final class UserAgentStat this.visitors = new VisitorStatSet(); } + /** + * Gets the ip count. + * + * @return the ip count + */ public long getIpCount() { return this.ips.size(); } + /** + * Gets the log count. + * + * @return the log count + */ public long getLogCount() { return this.logCount; } + /** + * Gets the user agent. + * + * @return the user agent + */ public String getUserAgent() { return this.userAgent; @@ -77,6 +92,9 @@ public final class UserAgentStat return result; } + /** + * Inc log count. + */ public void incLogCount() { this.logCount += 1; diff --git a/src/fr/devinsy/statoolinfos/stats/useragent/UserAgentStator.java b/src/fr/devinsy/statoolinfos/stats/useragent/UserAgentStator.java index 5cd84f0..86d2c9c 100644 --- a/src/fr/devinsy/statoolinfos/stats/useragent/UserAgentStator.java +++ b/src/fr/devinsy/statoolinfos/stats/useragent/UserAgentStator.java @@ -37,6 +37,11 @@ public final class UserAgentStator this.userAgents = new UserAgentStatSet(); } + /** + * Gets the log count. + * + * @return the log count + */ public long getLogCount() { return this.logCount; diff --git a/src/fr/devinsy/statoolinfos/stats/visitor/VisitorStat.java b/src/fr/devinsy/statoolinfos/stats/visitor/VisitorStat.java index 758dd7f..1539845 100644 --- a/src/fr/devinsy/statoolinfos/stats/visitor/VisitorStat.java +++ b/src/fr/devinsy/statoolinfos/stats/visitor/VisitorStat.java @@ -46,16 +46,31 @@ public final class VisitorStat this.visits = new Visits(); } + /** + * Gets the ip. + * + * @return the ip + */ public String getIp() { return this.ip; } + /** + * Gets the log count. + * + * @return the log count + */ public long getLogCount() { return this.logCount; } + /** + * Gets the user agent. + * + * @return the user agent + */ public String getUserAgent() { return this.userAgent; @@ -76,11 +91,19 @@ public final class VisitorStat return result; } + /** + * Gets the visits. + * + * @return the visits + */ public Visits getVisits() { return this.visits; } + /** + * Inc. + */ public void inc() { this.logCount += 1; diff --git a/src/fr/devinsy/statoolinfos/stats/visitor/VisitorStatSet.java b/src/fr/devinsy/statoolinfos/stats/visitor/VisitorStatSet.java index 74d2f7a..33e38a7 100644 --- a/src/fr/devinsy/statoolinfos/stats/visitor/VisitorStatSet.java +++ b/src/fr/devinsy/statoolinfos/stats/visitor/VisitorStatSet.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -79,8 +79,11 @@ public final class VisitorStatSet extends HashMap /** * Put. * + * @param ip + * the ip * @param userAgent * the user agent + * @return the visitor stat */ public VisitorStat put(final String ip, final String userAgent) { @@ -104,6 +107,8 @@ public final class VisitorStatSet extends HashMap /** * Put. * + * @param ip + * the ip * @param userAgent * the user agent */ diff --git a/src/fr/devinsy/statoolinfos/uptime/ServiceUptime.java b/src/fr/devinsy/statoolinfos/uptime/ServiceUptime.java index f69165a..da3d13f 100644 --- a/src/fr/devinsy/statoolinfos/uptime/ServiceUptime.java +++ b/src/fr/devinsy/statoolinfos/uptime/ServiceUptime.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -43,6 +43,11 @@ public class ServiceUptime extends Uptime this.service = service; } + /** + * Gets the service. + * + * @return the service + */ public Service getService() { return this.service; diff --git a/src/fr/devinsy/statoolinfos/uptime/Uptime.java b/src/fr/devinsy/statoolinfos/uptime/Uptime.java index ab2ea26..0509434 100644 --- a/src/fr/devinsy/statoolinfos/uptime/Uptime.java +++ b/src/fr/devinsy/statoolinfos/uptime/Uptime.java @@ -67,21 +67,41 @@ public class Uptime this.status = status; } + /** + * Gets the code. + * + * @return the code + */ public int getCode() { return this.code; } + /** + * Gets the date time. + * + * @return the date time + */ public LocalDateTime getDateTime() { return this.datetime; } + /** + * Gets the status. + * + * @return the status + */ public UptimeStatus getStatus() { return this.status; } + /** + * Gets the url. + * + * @return the url + */ public URL getURL() { return this.url; diff --git a/src/fr/devinsy/statoolinfos/uptime/UptimeStat.java b/src/fr/devinsy/statoolinfos/uptime/UptimeStat.java index a9db3c8..d6b776c 100644 --- a/src/fr/devinsy/statoolinfos/uptime/UptimeStat.java +++ b/src/fr/devinsy/statoolinfos/uptime/UptimeStat.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -50,16 +50,31 @@ public class UptimeStat return this.alertCount; } + /** + * Gets the count. + * + * @return the count + */ public int getCount() { return this.count; } + /** + * Gets the error count. + * + * @return the error count + */ public int getErrorCount() { return this.errorCount; } + /** + * Gets the ok count. + * + * @return the ok count + */ public int getOkCount() { return this.okCount; @@ -117,46 +132,77 @@ public class UptimeStat return result; } + /** + * Gets the void count. + * + * @return the void count + */ public int getVoidCount() { return this.voidCount; } + /** + * Gets the warning count. + * + * @return the warning count + */ public int getWarningCount() { return this.warningCount; } + /** + * Inc alert. + */ public void incAlert() { this.count += 1; this.alertCount += 1; } + /** + * Inc error. + */ public void incError() { this.count += 1; this.errorCount += 1; } + /** + * Inc ok. + */ public void incOk() { this.count += 1; this.okCount += 1; } + /** + * Inc void. + */ public void incVoid() { this.count += 1; this.voidCount += 1; } + /** + * Inc warning. + */ public void incWarning() { this.count += 1; this.warningCount += 1; } + /** + * Sets the status. + * + * @param status + * the new status + */ public void setStatus(final UptimeStatus status) { this.last = status;