Skip to content

Commit

Permalink
[Minor] Optimize imports
Browse files Browse the repository at this point in the history
  • Loading branch information
eitch committed Oct 19, 2024
1 parent 659891c commit 6927076
Show file tree
Hide file tree
Showing 101 changed files with 372 additions and 399 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
*/
package li.strolch.agent.api;

import java.util.List;
import java.util.Set;

import li.strolch.model.audit.Audit;
import li.strolch.persistence.api.StrolchTransaction;
import li.strolch.utils.collections.DateRange;

import java.util.List;
import java.util.Set;

/**
* @author Robert von Burg <[email protected]>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@
*/
package li.strolch.agent.api;

import static java.text.MessageFormat.*;
import static li.strolch.model.Tags.Json.*;
import com.google.gson.JsonObject;

import java.text.MessageFormat;
import java.util.Properties;

import com.google.gson.JsonObject;
import static java.text.MessageFormat.format;
import static li.strolch.model.Tags.Json.COMPONENT_NAME;

/**
* @author Robert von Burg <[email protected]>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
*/
package li.strolch.agent.api;

import java.util.List;
import java.util.Set;
import java.util.stream.Stream;

import li.strolch.exception.StrolchException;
import li.strolch.model.StrolchModelConstants;
import li.strolch.model.StrolchRootElement;
Expand All @@ -29,6 +25,10 @@
import li.strolch.persistence.api.StrolchPersistenceException;
import li.strolch.persistence.api.StrolchTransaction;

import java.util.List;
import java.util.Set;
import java.util.stream.Stream;

/**
* <p>
* The {@link ElementMap} is the entry point to the Strolch model. Any access to Strolch objects is done using the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
*/
package li.strolch.agent.api;

import java.util.List;

import li.strolch.model.StrolchRootElement;

import java.util.List;

public interface Observer {

default void add(String key, List<StrolchRootElement> elements) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package li.strolch.agent.api;

import static java.util.stream.Collectors.groupingBy;
import static java.util.stream.Collectors.joining;
import li.strolch.model.StrolchElement;
import li.strolch.model.StrolchRootElement;
import li.strolch.utils.collections.MapOfLists;

import java.util.List;
import java.util.Map;

import li.strolch.model.StrolchElement;
import li.strolch.model.StrolchRootElement;
import li.strolch.utils.collections.MapOfLists;
import static java.util.stream.Collectors.groupingBy;
import static java.util.stream.Collectors.joining;

public class ObserverEvent {
public final MapOfLists<String, StrolchRootElement> added = new MapOfLists<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
*/
package li.strolch.agent.api;

import java.util.Set;

import li.strolch.exception.StrolchException;
import li.strolch.runtime.StrolchConstants;

import java.util.Set;

/**
* @author Robert von Burg <[email protected]>
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
package li.strolch.agent.api;

import static java.util.Objects.requireNonNull;

import java.io.File;
import java.io.InputStream;
import java.text.MessageFormat;
import java.util.Arrays;
import java.util.Properties;

import li.strolch.runtime.configuration.ConfigurationParser;
import li.strolch.runtime.configuration.StrolchConfigurationException;
import li.strolch.runtime.configuration.StrolchEnvironment;
Expand All @@ -20,6 +12,14 @@
import org.xml.sax.Attributes;
import org.xml.sax.helpers.DefaultHandler;

import java.io.File;
import java.io.InputStream;
import java.text.MessageFormat;
import java.util.Arrays;
import java.util.Properties;

import static java.util.Objects.requireNonNull;

public class StrolchBootstrapper extends DefaultHandler {

private static final Logger logger = LoggerFactory.getLogger(StrolchBootstrapper.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
*/
package li.strolch.agent.api;

import java.util.Locale;

import li.strolch.exception.StrolchException;
import li.strolch.utils.I18nMessage;

import java.util.Locale;

/**
* @author Robert von Burg <[email protected]>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
*/
package li.strolch.agent.impl;

import java.util.*;

import li.strolch.agent.api.AuditTrail;
import li.strolch.model.audit.Audit;
import li.strolch.persistence.api.StrolchTransaction;
import li.strolch.utils.collections.DateRange;
import li.strolch.utils.dbc.DBC;

import java.util.*;

/**
* <p>
* This {@link AuditTrail} facade registers all actions performed i.e. it registers which {@link Audit Audits} are
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@
*/
package li.strolch.agent.impl;

import static java.util.Collections.emptyMap;
import static java.util.Collections.emptySet;

import java.util.*;
import java.util.stream.Stream;

import li.strolch.agent.api.AuditTrail;
import li.strolch.agent.api.ElementMap;
import li.strolch.exception.StrolchException;
Expand All @@ -30,6 +24,12 @@
import li.strolch.persistence.api.StrolchTransaction;
import li.strolch.utils.dbc.DBC;

import java.util.*;
import java.util.stream.Stream;

import static java.util.Collections.emptyMap;
import static java.util.Collections.emptySet;

/**
* <p>
* This {@link AuditTrail} facade registers all actions performed i.e. it registers which
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
*/
package li.strolch.agent.impl;

import static li.strolch.model.StrolchModelConstants.INTERPRETATION_ACTIVITY_REF;

import li.strolch.agent.api.ActivityMap;
import li.strolch.agent.api.StrolchRealm;
import li.strolch.model.activity.Activity;
import li.strolch.model.parameter.Parameter;
import li.strolch.persistence.api.ActivityDao;
import li.strolch.persistence.api.StrolchTransaction;

import static li.strolch.model.StrolchModelConstants.INTERPRETATION_ACTIVITY_REF;

public class CachedActivityMap extends CachedElementMap<Activity> implements ActivityMap {

public CachedActivityMap(StrolchRealm realm) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,15 @@
*/
package li.strolch.agent.impl;

import java.text.MessageFormat;
import java.util.List;

import li.strolch.model.audit.Audit;
import li.strolch.persistence.api.AuditDao;
import li.strolch.persistence.api.StrolchTransaction;
import li.strolch.utils.collections.DateRange;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.List;

/**
* @author Robert von Burg <[email protected]>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
*/
package li.strolch.agent.impl;

import java.text.MessageFormat;
import java.util.List;

import li.strolch.agent.api.StrolchRealm;
import li.strolch.exception.StrolchException;
import li.strolch.model.StrolchRootElement;
Expand All @@ -27,6 +24,9 @@
import li.strolch.persistence.api.StrolchPersistenceException;
import li.strolch.persistence.api.StrolchTransaction;

import java.text.MessageFormat;
import java.util.List;

/**
* @author Robert von Burg <[email protected]>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
*/
package li.strolch.agent.impl;

import static li.strolch.model.StrolchModelConstants.INTERPRETATION_ORDER_REF;

import java.time.ZonedDateTime;

import li.strolch.agent.api.OrderMap;
import li.strolch.agent.api.StrolchRealm;
import li.strolch.model.Order;
import li.strolch.model.parameter.Parameter;
import li.strolch.persistence.api.OrderDao;
import li.strolch.persistence.api.StrolchTransaction;

import java.time.ZonedDateTime;

import static li.strolch.model.StrolchModelConstants.INTERPRETATION_ORDER_REF;

public class CachedOrderMap extends CachedElementMap<Order> implements OrderMap {

public CachedOrderMap(StrolchRealm realm) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
package li.strolch.agent.impl;

import static java.lang.Integer.MAX_VALUE;
import static java.util.concurrent.CompletableFuture.allOf;
import static java.util.concurrent.CompletableFuture.supplyAsync;
import static java.util.concurrent.TimeUnit.SECONDS;

import java.text.MessageFormat;
import java.util.*;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.atomic.AtomicLong;
import java.util.function.Function;
import java.util.function.Supplier;

import li.strolch.model.StrolchRootElement;
import li.strolch.persistence.api.PersistenceHandler;
import li.strolch.persistence.api.StrolchDao;
Expand All @@ -23,6 +11,17 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.*;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.atomic.AtomicLong;
import java.util.function.Function;
import java.util.function.Supplier;

import static java.lang.Integer.MAX_VALUE;
import static java.util.concurrent.CompletableFuture.allOf;
import static java.util.concurrent.CompletableFuture.supplyAsync;
import static java.util.concurrent.TimeUnit.SECONDS;

public class CachedRealmLoader {

private static final Logger logger = LoggerFactory.getLogger(CachedRealmLoader.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
*/
package li.strolch.agent.impl;

import static li.strolch.model.StrolchModelConstants.INTERPRETATION_RESOURCE_REF;

import li.strolch.agent.api.ResourceMap;
import li.strolch.agent.api.StrolchRealm;
import li.strolch.model.Resource;
import li.strolch.model.parameter.Parameter;
import li.strolch.persistence.api.ResourceDao;
import li.strolch.persistence.api.StrolchTransaction;

import static li.strolch.model.StrolchModelConstants.INTERPRETATION_RESOURCE_REF;

public class CachedResourceMap extends CachedElementMap<Resource> implements ResourceMap {

public CachedResourceMap(StrolchRealm realm) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,18 @@
*/
package li.strolch.agent.impl;

import static li.strolch.utils.helper.StringHelper.formatNanoDuration;

import java.text.MessageFormat;
import java.util.Set;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import li.strolch.agent.api.ComponentState;
import li.strolch.agent.api.StrolchComponent;
import li.strolch.exception.StrolchException;
import li.strolch.runtime.configuration.ComponentConfiguration;
import li.strolch.runtime.configuration.StrolchConfiguration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.text.MessageFormat;
import java.util.Set;

import static li.strolch.utils.helper.StringHelper.formatNanoDuration;

/**
* @author Robert von Burg <[email protected]>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
*/
package li.strolch.agent.impl;

import java.text.MessageFormat;
import java.util.HashSet;
import java.util.Set;

import li.strolch.agent.api.ComponentState;
import li.strolch.agent.api.StrolchComponent;
import li.strolch.runtime.configuration.StrolchConfigurationException;

import java.text.MessageFormat;
import java.util.HashSet;
import java.util.Set;

public class ComponentController {

private final StrolchComponent component;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,18 @@
*/
package li.strolch.agent.impl;

import java.text.MessageFormat;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import li.strolch.runtime.configuration.ComponentConfiguration;
import li.strolch.runtime.configuration.StrolchConfiguration;
import li.strolch.runtime.configuration.StrolchConfigurationException;
import li.strolch.utils.dbc.DBC;
import li.strolch.utils.helper.StringHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.text.MessageFormat;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

public class ComponentDependencyAnalyzer {

Expand Down
Loading

0 comments on commit 6927076

Please sign in to comment.