-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TEIIDDES-1518: Create interfaces for TeiidConnectionInfo and subclasses
* TeiidConnectionInfo * TeiidAdminInfo * TeiidJdbcInfo * Makes the codebase more flexible and easier to create a common spi
- Loading branch information
Paul Richardson
committed
Nov 15, 2012
1 parent
5583a06
commit 0807d48
Showing
19 changed files
with
248 additions
and
106 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
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
28 changes: 28 additions & 0 deletions
28
plugins/org.teiid.designer.dqp/src/org/teiid/designer/runtime/ITeiidAdminInfo.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,28 @@ | ||
/* | ||
* JBoss, Home of Professional Open Source. | ||
* | ||
* See the LEGAL.txt file distributed with this work for information regarding copyright ownership and licensing. | ||
* | ||
* See the AUTHORS.txt file distributed with this work for a full listing of individual contributors. | ||
*/ | ||
package org.teiid.designer.runtime; | ||
|
||
/** | ||
* @since 8.0 | ||
*/ | ||
public interface ITeiidAdminInfo extends ITeiidConnectionInfo { | ||
|
||
/** | ||
* The default Teiid Admin persist password flag. Value is {@value} . | ||
*/ | ||
public static final boolean DEFAULT_PERSIST_PASSWORD = true; | ||
/** | ||
* The default Teiid Admin port number. Value is {@value} . | ||
*/ | ||
public static final String DEFAULT_PORT = "9999"; //$NON-NLS-1$ | ||
/** | ||
* The default Teiid Admin secure protocol flag. Value is {@value} . | ||
*/ | ||
public static final boolean DEFAULT_SECURE = true; | ||
|
||
} |
113 changes: 113 additions & 0 deletions
113
plugins/org.teiid.designer.dqp/src/org/teiid/designer/runtime/ITeiidConnectionInfo.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,113 @@ | ||
/* | ||
* JBoss, Home of Professional Open Source. | ||
* | ||
* See the LEGAL.txt file distributed with this work for information regarding copyright ownership and licensing. | ||
* | ||
* See the AUTHORS.txt file distributed with this work for a full listing of individual contributors. | ||
*/ | ||
package org.teiid.designer.runtime; | ||
|
||
import org.eclipse.core.runtime.IStatus; | ||
import org.teiid.datatools.connectivity.security.ISecureStorageProvider; | ||
|
||
/** | ||
* @since 8.0 | ||
*/ | ||
public interface ITeiidConnectionInfo { | ||
|
||
/** | ||
* Protocol address prefix for secure server connections | ||
*/ | ||
public static final String MMS = "mms://"; //$NON-NLS-1$ | ||
/** | ||
* Protocol address prefix for server connections | ||
*/ | ||
public static final String MM = "mm://"; //$NON-NLS-1$ | ||
|
||
/** | ||
* @return the password (can be <code>null</code> or empty) | ||
*/ | ||
String getPassword(); | ||
|
||
/** | ||
* @return the port (can be <code>null</code> or empty) | ||
*/ | ||
String getPort(); | ||
|
||
/** | ||
* @return the port number | ||
*/ | ||
|
||
int getPortNumber(); | ||
|
||
/** | ||
* @return the connection type (never <code>null</code>) | ||
*/ | ||
String getType(); | ||
|
||
/** | ||
* @return the host provider (never <code>null</code>) | ||
*/ | ||
HostProvider getHostProvider(); | ||
|
||
/** | ||
* @return the secureStorageProvider | ||
*/ | ||
ISecureStorageProvider getSecureStorageProvider(); | ||
|
||
/** | ||
* @return the URL (never <code>null</code>) | ||
*/ | ||
String getUrl(); | ||
|
||
/** | ||
* @return the user name (can be <code>null</code> or empty) | ||
*/ | ||
String getUsername(); | ||
|
||
/** | ||
* @return <code>true</code> if a secure connection protocol is being used | ||
*/ | ||
boolean isSecure(); | ||
|
||
/** | ||
* The port, password, user name, persisting password, secure protocol, and host provider are set. | ||
* | ||
* @param info the connection properties whose values are being used to update state | ||
*/ | ||
void setAll(ITeiidConnectionInfo info); | ||
|
||
/** | ||
* @param hostProvider the new value for host provider (never <code>null</code>) | ||
* @throws IllegalArgumentException if hostProvider is <code>null</code> | ||
*/ | ||
void setHostProvider(HostProvider hostProvider); | ||
|
||
/** | ||
* @param password the new value for password (can be empty or <code>null</code>) | ||
*/ | ||
void setPassword(String password); | ||
|
||
/** | ||
* @param port the new value for port (never empty or <code>null</code>) | ||
* @see #validate() | ||
*/ | ||
void setPort(String port); | ||
|
||
/** | ||
* @param secure the new value for if a secure connection protocol should be used | ||
*/ | ||
void setSecure(boolean secure); | ||
|
||
/** | ||
* @param username the new value for user name | ||
* @see #validate() | ||
*/ | ||
void setUsername(String username); | ||
|
||
/** | ||
* @return a status indicating if the connection info is in a validate state (never <code>null</code>) | ||
*/ | ||
IStatus validate(); | ||
|
||
} |
32 changes: 32 additions & 0 deletions
32
plugins/org.teiid.designer.dqp/src/org/teiid/designer/runtime/ITeiidJdbcInfo.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,32 @@ | ||
/* | ||
* JBoss, Home of Professional Open Source. | ||
* | ||
* See the LEGAL.txt file distributed with this work for information regarding copyright ownership and licensing. | ||
* | ||
* See the AUTHORS.txt file distributed with this work for a full listing of individual contributors. | ||
*/ | ||
package org.teiid.designer.runtime; | ||
|
||
/** | ||
* @since 8.0 | ||
*/ | ||
public interface ITeiidJdbcInfo extends ITeiidConnectionInfo { | ||
|
||
/** | ||
* The default Teiid JDBC port number. Value is {@value} . | ||
*/ | ||
public static final String DEFAULT_PORT = "31000"; //$NON-NLS-1$ | ||
/** | ||
* The default Teiid Admin secure protocol flag. Value is {@value} . | ||
*/ | ||
public static final boolean DEFAULT_SECURE = false; | ||
/** | ||
* The default username for the teiid server | ||
*/ | ||
public static final String DEFAULT_JDBC_USERNAME = "user"; //$NON-NLS-1$ | ||
/** | ||
* The default password for the teiid server | ||
*/ | ||
public static final String DEFAULT_JDBC_PASSWORD = "user"; //$NON-NLS-1$ | ||
|
||
} |
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
Oops, something went wrong.