Improved code.

This commit is contained in:
Christian P. MOMON 2021-04-15 03:55:18 +02:00
parent a18fab99dc
commit cfc1b78c99
3 changed files with 40 additions and 3 deletions

View file

@ -132,7 +132,7 @@ public class Builder
{ {
File file = new File(configuration.getBuildDirectory(), configuration.getBuildInput().getName()); File file = new File(configuration.getBuildDirectory(), configuration.getBuildInput().getName());
if ((file.isFile()) && (StringUtils.endsWithAny(file.getName(), ".properties"))) if ((file.isFile()) && (StringUtils.endsWith(file.getName(), ".properties")))
{ {
logger.info("BUILDER : Deleting {}", file.getAbsolutePath()); logger.info("BUILDER : Deleting {}", file.getAbsolutePath());
file.delete(); file.delete();

View file

@ -212,7 +212,7 @@ public final class StatoolInfosCLI
} }
}); });
logger.info("{} StatoolInfos call: {}", LocalDateTime.now(), new StringList(args).toStringSeparatedBy(" ")); logger.debug("{} StatoolInfos call: {}", LocalDateTime.now(), new StringList(args).toStringSeparatedBy(" "));
if (isMatching(args)) if (isMatching(args))
{ {

View file

@ -277,7 +277,7 @@ public class Organization extends PathPropertyList
{ {
URL result; URL result;
String path = get("organization.logo"); String path = getLogoURLValue();
if ((StringUtils.isBlank(path)) || (!StringUtils.startsWith(path, "http"))) if ((StringUtils.isBlank(path)) || (!StringUtils.startsWith(path, "http")))
{ {
result = null; result = null;
@ -291,6 +291,21 @@ public class Organization extends PathPropertyList
return result; return result;
} }
/**
* Gets the logo URL value.
*
* @return the logo URL value
*/
public String getLogoURLValue()
{
String result;
result = get("organization.logo");
//
return result;
}
/** /**
* Gets the mastodon page. * Gets the mastodon page.
* *
@ -596,6 +611,28 @@ public class Organization extends PathPropertyList
return result; return result;
} }
/**
* Checks if is default.
*
* @return true, if is default
*/
public boolean isDefault()
{
boolean result;
if ((getServiceCount() == 0) && (getLogoURLValue() == null) && (getStartDate() == null))
{
result = true;
}
else
{
result = false;
}
//
return result;
}
/** /**
* Checks if is valid. * Checks if is valid.
* *