Skip to content

Commit

Permalink
- New Feature: AutoConnect
Browse files Browse the repository at this point in the history
  connections can be set to auto-connect and will then connect on startup (if possible)
- Version number is read from Maven POM and used in Window title
- Copyright adjusted to 2014
- removed unused imports
  • Loading branch information
bahellma committed Feb 13, 2014
1 parent a8f915f commit 351b12c
Show file tree
Hide file tree
Showing 69 changed files with 240 additions and 212 deletions.
13 changes: 10 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<!-- general project information -->
<groupId>de.hshannover.f4.trust</groupId>
<artifactId>irongui</artifactId>
<version>0.4.2</version>
<version>0.4.3</version>
<packaging>jar</packaging>
<name>irongui</name>
<url>http://trust.f4.hs-hannover.de</url>
Expand Down Expand Up @@ -107,16 +107,23 @@
<licenseName>apache_v2</licenseName>
<canUpdateDescription>true</canUpdateDescription>
<addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
<canUpdateCopyright>false</canUpdateCopyright>
<descriptionTemplate>${basedir}/src/license/description_template.ftl</descriptionTemplate>
<roots>
<root>src/main/java</root>
<root>src/test/java</root>
</roots>
</configuration>

</plugin>

</plugins>
<resources>
<resource>
<directory>src/main/java</directory>
<filtering>true</filtering>
<targetPath>../filtered-source/java</targetPath>
</resource>
</resources>
<sourceDirectory>target/filtered-source/java</sourceDirectory>
</build>

<repositories>
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/de/hshannover/f4/trust/irongui/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
* Email: [email protected]
* Website: http://trust.f4.hs-hannover.de/
*
* This file is part of irongui, version 0.4.2,
* This file is part of irongui, version 0.4.3,
* implemented by the Trust@HsH research group at the Hochschule Hannover.
* %%
* Copyright (C) 2010 - 2013 Trust@HsH
* Copyright (C) 2010 - 2014 Trust@HsH
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -56,6 +56,8 @@

public class Client {

public static final String VERSION = "${project.version}";

private final ViewController mViewController;
private final IfmapFacade mIfmapFacade;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
* Email: [email protected]
* Website: http://trust.f4.hs-hannover.de/
*
* This file is part of irongui, version 0.4.2,
* This file is part of irongui, version 0.4.3,
* implemented by the Trust@HsH research group at the Hochschule Hannover.
* %%
* Copyright (C) 2010 - 2013 Trust@HsH
* Copyright (C) 2010 - 2014 Trust@HsH
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -57,15 +57,15 @@
import java.util.concurrent.Future;
import java.util.concurrent.Semaphore;

import de.hshannover.f4.trust.ifmapj.exception.IfmapErrorResult;
import de.hshannover.f4.trust.ifmapj.exception.IfmapException;
import de.hshannover.f4.trust.ifmapj.identifier.Identifier;
import de.hshannover.f4.trust.ifmapj.messages.PollResult;
import de.hshannover.f4.trust.irongui.control.IfmapFacade;
import de.hshannover.f4.trust.irongui.datastructure.IdentifierData;
import de.hshannover.f4.trust.irongui.datastructure.PollResultContainer;
import de.hshannover.f4.trust.irongui.datastructure.SubscriptionRepository;
import de.hshannover.f4.trust.irongui.util.CryptoUtil;
import de.hshannover.f4.trust.ifmapj.exception.IfmapErrorResult;
import de.hshannover.f4.trust.ifmapj.exception.IfmapException;
import de.hshannover.f4.trust.ifmapj.identifier.Identifier;
import de.hshannover.f4.trust.ifmapj.messages.PollResult;

public class Connection {

Expand Down Expand Up @@ -232,7 +232,8 @@ private ConnectionParameter cloneConnectionParameter(ConnectionParameter tmp) {
params.setBasicAuthEnabled(tmp.isBasicAuthEnabled());
params.setBasicauthUser(tmp.getBasicauthUser());
params.setBasicauthPass(tmp.getBasicauthPass());
params.setAutoSubscribe(tmp.isAutoSubscribe());
params.setDump(tmp.isDump());
params.setAutoConnect(tmp.isAutoConnect());
params.setMaxPollSize(tmp.getMaxPollSize());
return params;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
* Email: [email protected]
* Website: http://trust.f4.hs-hannover.de/
*
* This file is part of irongui, version 0.4.2,
* This file is part of irongui, version 0.4.3,
* implemented by the Trust@HsH research group at the Hochschule Hannover.
* %%
* Copyright (C) 2010 - 2013 Trust@HsH
* Copyright (C) 2010 - 2014 Trust@HsH
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -58,7 +58,7 @@ public static Connection createConnection(ConnectionParameter params)
params.getKeystorePass(), params.getTruststore(),
params.getTruststorePass(), params.isBasicAuthEnabled(),
params.getBasicauthUser(), params.getBasicauthPass(),
params.isAutoSubscribe(), params.getMaxPollSize());
params.isDump(), params.isAutoConnect(), params.getMaxPollSize());
return new Connection(tmp);
}

Expand All @@ -72,7 +72,7 @@ public static ConnectionParameter createConnectionParameter(String name)
public static ConnectionParameter createConnectionParameter(String name,
String url, String keyPath, String keyPass, String trustPath,
String trustPass, boolean enableBasicAuth, String basicUser,
String basicPass, boolean autoSubscribe, int maxPoll)
String basicPass, boolean dump, boolean autoConnect, int maxPoll)
throws ConnectionCreationException {
/**
* @TODO do checks here (null, path, passwords)
Expand All @@ -87,7 +87,8 @@ public static ConnectionParameter createConnectionParameter(String name,
params.setBasicAuthEnabled(enableBasicAuth);
params.setBasicauthUser(basicUser);
params.setBasicauthPass(basicPass);
params.setAutoSubscribe(autoSubscribe);
params.setDump(dump);
params.setAutoConnect(autoConnect);
params.setMaxPollSize(maxPoll);
return params;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
* Email: [email protected]
* Website: http://trust.f4.hs-hannover.de/
*
* This file is part of irongui, version 0.4.2,
* This file is part of irongui, version 0.4.3,
* implemented by the Trust@HsH research group at the Hochschule Hannover.
* %%
* Copyright (C) 2010 - 2013 Trust@HsH
* Copyright (C) 2010 - 2014 Trust@HsH
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -130,12 +130,20 @@ public void setDumpFilter(String dumpFilter) {
this.dumpFilter = dumpFilter;
}

public boolean isAutoSubscribe() {
return autoSubscribe;
public boolean isDump() {
return dump;
}

public boolean isAutoConnect() {
return autoConnect;
}

public void setAutoSubscribe(boolean autoSubscribe) {
this.autoSubscribe = autoSubscribe;
public void setDump(boolean dump) {
this.dump = dump;
}

public void setAutoConnect(boolean autoConnect) {
this.autoConnect = autoConnect;
}

public int getMaxPollSize() {
Expand All @@ -154,7 +162,8 @@ public ConnectionParameter clone() {
param.setKeystorePass(getKeystorePass());
param.setTruststore(getTruststore());
param.setTruststorePass(getTruststorePass());
param.setAutoSubscribe(isAutoSubscribe());
param.setDump(isDump());
param.setAutoConnect(isAutoConnect());
param.setBasicAuthEnabled(isBasicAuthEnabled());
param.setBasicauthUser(getBasicauthUser());
param.setBasicauthPass(getBasicauthPass());
Expand All @@ -178,7 +187,8 @@ public String toString() {
private String basicauthUser;
private String basicauthPass;
private String dumpFilter;
private boolean autoSubscribe;
private boolean dump;
private boolean autoConnect;
private int maxPollSize;

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
* Email: [email protected]
* Website: http://trust.f4.hs-hannover.de/
*
* This file is part of irongui, version 0.4.2,
* This file is part of irongui, version 0.4.3,
* implemented by the Trust@HsH research group at the Hochschule Hannover.
* %%
* Copyright (C) 2010 - 2013 Trust@HsH
* Copyright (C) 2010 - 2014 Trust@HsH
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
* Email: [email protected]
* Website: http://trust.f4.hs-hannover.de/
*
* This file is part of irongui, version 0.4.2,
* This file is part of irongui, version 0.4.3,
* implemented by the Trust@HsH research group at the Hochschule Hannover.
* %%
* Copyright (C) 2010 - 2013 Trust@HsH
* Copyright (C) 2010 - 2014 Trust@HsH
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
* Email: [email protected]
* Website: http://trust.f4.hs-hannover.de/
*
* This file is part of irongui, version 0.4.2,
* This file is part of irongui, version 0.4.3,
* implemented by the Trust@HsH research group at the Hochschule Hannover.
* %%
* Copyright (C) 2010 - 2013 Trust@HsH
* Copyright (C) 2010 - 2014 Trust@HsH
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
* Email: [email protected]
* Website: http://trust.f4.hs-hannover.de/
*
* This file is part of irongui, version 0.4.2,
* This file is part of irongui, version 0.4.3,
* implemented by the Trust@HsH research group at the Hochschule Hannover.
* %%
* Copyright (C) 2010 - 2013 Trust@HsH
* Copyright (C) 2010 - 2014 Trust@HsH
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
* Email: [email protected]
* Website: http://trust.f4.hs-hannover.de/
*
* This file is part of irongui, version 0.4.2,
* This file is part of irongui, version 0.4.3,
* implemented by the Trust@HsH research group at the Hochschule Hannover.
* %%
* Copyright (C) 2010 - 2013 Trust@HsH
* Copyright (C) 2010 - 2014 Trust@HsH
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
* Email: [email protected]
* Website: http://trust.f4.hs-hannover.de/
*
* This file is part of irongui, version 0.4.2,
* This file is part of irongui, version 0.4.3,
* implemented by the Trust@HsH research group at the Hochschule Hannover.
* %%
* Copyright (C) 2010 - 2013 Trust@HsH
* Copyright (C) 2010 - 2014 Trust@HsH
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -55,6 +55,10 @@
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

import de.hshannover.f4.trust.ifmapj.identifier.Identifier;
import de.hshannover.f4.trust.ifmapj.messages.PollResult;
import de.hshannover.f4.trust.ifmapj.messages.ResultItem;
import de.hshannover.f4.trust.ifmapj.messages.SearchResult;
import de.hshannover.f4.trust.irongui.datastructure.IdentifierData;
import de.hshannover.f4.trust.irongui.datastructure.IfmapDataType;
import de.hshannover.f4.trust.irongui.datastructure.Link;
Expand All @@ -64,10 +68,6 @@
import de.hshannover.f4.trust.irongui.datastructure.SubscriptionRepository;
import de.hshannover.f4.trust.irongui.exception.LinkConstructionException;
import de.hshannover.f4.trust.irongui.exception.NoValidIdentifierTypeException;
import de.hshannover.f4.trust.ifmapj.identifier.Identifier;
import de.hshannover.f4.trust.ifmapj.messages.PollResult;
import de.hshannover.f4.trust.ifmapj.messages.ResultItem;
import de.hshannover.f4.trust.ifmapj.messages.SearchResult;

public class IfmapMarshaller {

Expand Down Expand Up @@ -147,7 +147,7 @@ public static PollResultContainer filterPollResult(Connection con,
} else {
id1 = (IdentifierData) delData;
}
if(con.getConnectionParameters().isAutoSubscribe()) {
if(con.getConnectionParameters().isDump()) {
if (data.equals(id1) || (id2 != null && data.equals(id2))) {
deleteResult.add(delData);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
* Email: [email protected]
* Website: http://trust.f4.hs-hannover.de/
*
* This file is part of irongui, version 0.4.2,
* This file is part of irongui, version 0.4.3,
* implemented by the Trust@HsH research group at the Hochschule Hannover.
* %%
* Copyright (C) 2010 - 2013 Trust@HsH
* Copyright (C) 2010 - 2014 Trust@HsH
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -48,6 +48,9 @@
import java.io.IOException;
import java.util.HashMap;

import de.hshannover.f4.trust.ifmapj.exception.IfmapErrorResult;
import de.hshannover.f4.trust.ifmapj.exception.IfmapException;
import de.hshannover.f4.trust.ifmapj.identifier.Identifier;
import de.hshannover.f4.trust.irongui.communication.Connection;
import de.hshannover.f4.trust.irongui.datastructure.PollResultContainer;
import de.hshannover.f4.trust.irongui.event.EventService;
Expand All @@ -56,10 +59,6 @@
import de.hshannover.f4.trust.irongui.exception.ConnectionCreationException;
import de.hshannover.f4.trust.irongui.exception.PropertiesNotFoundException;
import de.hshannover.f4.trust.irongui.properties.SynchronisationService;
import de.hshannover.f4.trust.irongui.view.component.GraphPanel;
import de.hshannover.f4.trust.ifmapj.exception.IfmapErrorResult;
import de.hshannover.f4.trust.ifmapj.exception.IfmapException;
import de.hshannover.f4.trust.ifmapj.identifier.Identifier;

public final class IfmapFacade {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
* Email: [email protected]
* Website: http://trust.f4.hs-hannover.de/
*
* This file is part of irongui, version 0.4.2,
* This file is part of irongui, version 0.4.3,
* implemented by the Trust@HsH research group at the Hochschule Hannover.
* %%
* Copyright (C) 2010 - 2013 Trust@HsH
* Copyright (C) 2010 - 2014 Trust@HsH
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
* Email: [email protected]
* Website: http://trust.f4.hs-hannover.de/
*
* This file is part of irongui, version 0.4.2,
* This file is part of irongui, version 0.4.3,
* implemented by the Trust@HsH research group at the Hochschule Hannover.
* %%
* Copyright (C) 2010 - 2013 Trust@HsH
* Copyright (C) 2010 - 2014 Trust@HsH
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -48,13 +48,13 @@
import java.util.Hashtable;
import java.util.Map;

import de.hshannover.f4.trust.irongui.datastructure.IdentifierConstants.IdentifierType;
import de.hshannover.f4.trust.ifmapj.identifier.AccessRequest;
import de.hshannover.f4.trust.ifmapj.identifier.Device;
import de.hshannover.f4.trust.ifmapj.identifier.Identifier;
import de.hshannover.f4.trust.ifmapj.identifier.Identity;
import de.hshannover.f4.trust.ifmapj.identifier.IpAddress;
import de.hshannover.f4.trust.ifmapj.identifier.MacAddress;
import de.hshannover.f4.trust.irongui.datastructure.IdentifierConstants.IdentifierType;

/**
* Represents an IdentifierData
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
* Email: [email protected]
* Website: http://trust.f4.hs-hannover.de/
*
* This file is part of irongui, version 0.4.2,
* This file is part of irongui, version 0.4.3,
* implemented by the Trust@HsH research group at the Hochschule Hannover.
* %%
* Copyright (C) 2010 - 2013 Trust@HsH
* Copyright (C) 2010 - 2014 Trust@HsH
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit 351b12c

Please sign in to comment.