-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Marco Boeck
committed
Jun 5, 2019
1 parent
3a2da3e
commit 869802f
Showing
499 changed files
with
30,909 additions
and
4,489 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
version=9.2.0 | ||
version=9.3.0 | ||
group=com.rapidminer.studio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
src/main/java/com/rapidminer/connection/ConnectionHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/** | ||
* Copyright (C) 2001-2019 by RapidMiner and the contributors | ||
* | ||
* Complete list of developers available at our web site: | ||
* | ||
* http://rapidminer.com | ||
* | ||
* This program is free software: you can redistribute it and/or modify it under the terms of the | ||
* GNU Affero General Public License as published by the Free Software Foundation, either version 3 | ||
* of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without | ||
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License along with this program. | ||
* If not, see http://www.gnu.org/licenses/. | ||
*/ | ||
package com.rapidminer.connection; | ||
|
||
import java.util.Collections; | ||
import java.util.Map; | ||
|
||
import com.rapidminer.connection.util.GenericHandler; | ||
|
||
|
||
/** | ||
* An interface for handler/factory for {@link ConnectionInformation ConnectionInformations}. Implementations provide | ||
* the possibility to create new {@link ConnectionInformation ConnectionInformations}. They can be registered using | ||
* {@link ConnectionHandlerRegistry#registerHandler(GenericHandler) ConnectionHandlerRegistry.registerHandler}. | ||
* Additionally implementations can provide a set of additional actions for the connections. | ||
* | ||
* @author Jan Czogalla | ||
* @since 9.3 | ||
* @see com.rapidminer.tools.config.ConfigurableConnectionHandler ConfigurableConnectionHandler | ||
*/ | ||
public interface ConnectionHandler extends GenericHandler<ConnectionInformation> { | ||
|
||
/** | ||
* Creates a new instance of {@link ConnectionInformation} with the given name, this handler's type | ||
* and an implementation dependent id. | ||
* | ||
* @param name | ||
* the name of the new connection; must not be {@code null} | ||
* @see ConnectionInformationBuilder | ||
*/ | ||
ConnectionInformation createNewConnectionInformation(String name); | ||
|
||
/** | ||
* A map of name or key/runnable pairs, representing additional actions | ||
* | ||
* @return an empty map by default | ||
*/ | ||
default Map<String, Runnable> getAdditionalActions() { | ||
return Collections.emptyMap(); | ||
} | ||
} |
63 changes: 63 additions & 0 deletions
63
src/main/java/com/rapidminer/connection/ConnectionHandlerRegistry.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/** | ||
* Copyright (C) 2001-2019 by RapidMiner and the contributors | ||
* | ||
* Complete list of developers available at our web site: | ||
* | ||
* http://rapidminer.com | ||
* | ||
* This program is free software: you can redistribute it and/or modify it under the terms of the | ||
* GNU Affero General Public License as published by the Free Software Foundation, either version 3 | ||
* of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without | ||
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License along with this program. | ||
* If not, see http://www.gnu.org/licenses/. | ||
*/ | ||
package com.rapidminer.connection; | ||
|
||
import com.rapidminer.connection.util.GenericHandlerRegistry; | ||
import com.rapidminer.connection.util.GenericRegistrationEventListener; | ||
import com.rapidminer.operator.OperatorVersion; | ||
|
||
|
||
/** | ||
* Registry for {@link ConnectionHandler ConnectionHandlers}. Handlers can be registered and unregistered, | ||
* searched by type and (un)registrations can be observed. See {@link GenericHandlerRegistry} for further details. | ||
* | ||
* @author Jan Czogalla | ||
* @since 9.3 | ||
*/ | ||
public final class ConnectionHandlerRegistry extends GenericHandlerRegistry<ConnectionHandler> { | ||
|
||
public static final OperatorVersion BEFORE_NEW_CONNECTION_MANAGEMENT = new OperatorVersion(9, 2, 1); | ||
|
||
private static final ConnectionHandlerRegistry INSTANCE = new ConnectionHandlerRegistry(); | ||
|
||
/** | ||
* Singleton class, no instantiation allowed except for internal purpose | ||
*/ | ||
private ConnectionHandlerRegistry() { | ||
} | ||
|
||
/** | ||
* Get the instance of this singleton | ||
*/ | ||
public static ConnectionHandlerRegistry getInstance() { | ||
return INSTANCE; | ||
} | ||
|
||
@Override | ||
@SuppressWarnings("unchecked") | ||
protected <G extends GenericRegistrationEventListener<ConnectionHandler>, L extends G> Class<G> getListenerClass(L listener) { | ||
return (Class<G>) (listener == null || listener instanceof ConnectionHandlerRegistryListener ? | ||
ConnectionHandlerRegistryListener.class : listener.getClass()); | ||
} | ||
|
||
@Override | ||
protected String getRegistryType() { | ||
return "connection"; | ||
} | ||
} |
Oops, something went wrong.