Package com.mks.api
Interface IntegrationPoint
-
- All Superinterfaces:
IntegrationVersionRequest
public interface IntegrationPoint extends IntegrationVersionRequest
Interface used to model the point of entry for an integration. TheIntegrationPoint
is an abstract model used to define what you want to connect to (Windchill RV&S Client or Windchill RV&S Server) and execute commands against.An
IntegrationPoint
can be obtained from theIntegrationPointFactory
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Session
createNamedSession(java.lang.String integrationID, VersionNumber overrideRequestVersion)
Creates a newSession
object.Session
createNamedSession(java.lang.String integrationID, VersionNumber overrideRequestVersion, java.lang.String username, java.lang.String password)
Creates a newSession
object.Session
createSession()
Deprecated.replaced bycreateNamedSession(String, VersionNumber)
.Session
createSession(java.lang.String username, java.lang.String password)
Deprecated.Session
createSession(java.lang.String username, java.lang.String password, int apiMajorVersion, int apiMinorVersion)
Deprecated.boolean
getAutoStartIntegrityClient()
Retrieves the flag indicating if theIntegrationPoint
should attempt to automatically start the Windchill RV&S Client.Session
getCommonSession()
Retrieves the commonSession
.Session
getCommonSession(java.lang.String username, java.lang.String password)
Retrieves the commonSession
.java.lang.String
getHostname()
Retrieves the host name property for theIntegrationPoint
.int
getPort()
Retrieves the port property for theIntegrationPoint
.java.util.Iterator<Session>
getSessions()
Retrieves anIterator
over theSession
s that have been created for theIntegrationPoint
.boolean
isClientIntegrationPoint()
Indicates whether the integration point is to an IntegrityClient daemon.boolean
isSecure()
Checks to see if secure communication will be used to connect to theIntegrationPoint
.void
release()
Releases anIntegrationPoint
object after it has completed its purpose.void
setAutoStartIntegrityClient(boolean autoStartIC)
Sets the flag indicating if theIntegrationPoint
should attempt to automatically start the Windchill RV&S Client.-
Methods inherited from interface com.mks.api.IntegrationVersionRequest
getAPIRequestVersion
-
-
-
-
Method Detail
-
getHostname
java.lang.String getHostname()
Retrieves the host name property for theIntegrationPoint
.- Returns:
- The host name for the
IntegrationPoint
.
-
getPort
int getPort()
Retrieves the port property for theIntegrationPoint
. If theIntegrationPoint
was created using one of theIntegrationPointFactory.createLocalIntegrationPoint()
methods, then this method will return 0 until aCmdRunner
has been created from aSession
created by theIntegrationPoint
and a command has been executed by theCmdRunner
.- Returns:
- The port to connect to for the
IntegrationPoint
. - See Also:
IntegrationPointFactory.createLocalIntegrationPoint(int, int)
-
isClientIntegrationPoint
boolean isClientIntegrationPoint()
Indicates whether the integration point is to an IntegrityClient daemon. At present, the integration point does not physically identify itself, so the implementation of this method is based on heuristics. The assumption is that any integration point where the port needs to be pre-specified is more likely to NOT be an IntegrityClient than not.- Returns:
true
if theIntegrationPoint
believes it is connected to an IntegrityClient;false
otherwise.
-
isSecure
boolean isSecure()
Checks to see if secure communication will be used to connect to theIntegrationPoint
.- Returns:
true
if theIntegrationPoint
will use a secure communication protocol for communication;false
otherwise.
-
createSession
@Deprecated Session createSession() throws APIException
Deprecated.replaced bycreateNamedSession(String, VersionNumber)
. When creating a session for use by an integration, it is expected/recommended that the integration identify itself.Creates a newSession
object.- Returns:
- A
Session
used to run commands on. - Throws:
APIException
- IfisSecure()
returnstrue
.- See Also:
Session
-
createNamedSession
Session createNamedSession(java.lang.String integrationID, VersionNumber overrideRequestVersion) throws APIException
Creates a newSession
object.- Parameters:
integrationID
- An identifier for the integration to which this session belongs. A null value is considered to correspond to an unidentified integration session.overrideRequestVersion
- Used to override the API request version that commands executed under this session will use. May be null, in which case it defaults to the API request version from the IntegrationPointIntegrationVersionRequest.getAPIRequestVersion()
- Returns:
- A
Session
used to run commands on. - Throws:
APIException
- IfisSecure()
returnstrue
.- Since:
- 10.8
Only Integrity 10.8 or higher will recognize the integration identifier. This method can safely be used on older releases, but the integration identifier will be not be reflected in Windchill RV&S. - See Also:
Session
-
createSession
@Deprecated Session createSession(java.lang.String username, java.lang.String password) throws APIException
Deprecated.replaced bycreateNamedSession(String, VersionNumber, String, String)
. When creating a session for use by an integration, it is expected/recommended that the integration identify itself.Creates a newSession
object. Use this method when theIntegrationPoint
has an authentication policy of AuthenticatedSessionPolicy.- Parameters:
username
- The username used when authenticating with theIntegrationPoint
to create theSession
.password
- The password used when authenticating with theIntegrationPoint
to create theSession
.- Returns:
- A
Session
used to run commands on. - Throws:
APIException
- If there was a problem creating aSession
object.- See Also:
Session
-
createNamedSession
Session createNamedSession(java.lang.String integrationID, VersionNumber overrideRequestVersion, java.lang.String username, java.lang.String password) throws APIException
Creates a newSession
object. Use this method when theIntegrationPoint
has an authentication policy of AuthenticatedSessionPolicy.- Parameters:
integrationID
- An identifier for the integration to which this session belongs.overrideRequestVersion
- Used to override the API request version that commands executed under this session will use. May be null, in which case it defaults to the API request version from the IntegrationPointIntegrationVersionRequest.getAPIRequestVersion()
username
- The username used when authenticating with theIntegrationPoint
to create theSession
. May be null in which case the session is unauthenticated.password
- The password used when authenticating with theIntegrationPoint
to create theSession
. Should only be null if the username parameter is null.- Returns:
- A
Session
used to run commands on. - Throws:
APIException
- If there was a problem creating aSession
object.- Since:
- 10.8
Only Integrity 10.8 or higher will recognize the integration identifier. This method can safely be used on older releases, but the integration identifier will be not be reflected in Windchill RV&S. - See Also:
Session
-
createSession
@Deprecated Session createSession(java.lang.String username, java.lang.String password, int apiMajorVersion, int apiMinorVersion) throws APIException
Deprecated.replaced bycreateNamedSession(String, VersionNumber, String, String)
. When creating a session for use by an integration, it is expected/recommended that the integration identify itself.Creates a newSession
object. Use this method when theIntegrationPoint
has an authentication policy of AuthenticatedSessionPolicy. In particular, this method is used when one wishes to establish a session that uses an API request version that is explicitly distinct from the version being using by the IntegrationPoint.- Parameters:
username
- The username used when authenticating with theIntegrationPoint
to create theSession
.password
- The password used when authenticating with theIntegrationPoint
to create theSession
.apiMajorVersion
- major version for the API requestsapiMinorVersion
- minor version for the API requests- Returns:
- A
Session
used to run commands on. - Throws:
APIException
- If there was a problem creating aSession
object.- See Also:
Session
-
getCommonSession
Session getCommonSession() throws APIException
Retrieves the commonSession
. The commonSession
is a single session that is shared across all instances of theSession
(that is, there is only one available). This method will only be successful if theIntegrationPoint
is Windchill RV&S Client.- Returns:
- An annonymous
Session
used to run commands on. - Throws:
APIException
- If there was a problem creating aSession
object.- See Also:
Session
-
getCommonSession
Session getCommonSession(java.lang.String username, java.lang.String password) throws APIException
Retrieves the commonSession
. The commonSession
is a single session that is shared across all instances of theSession
, i.e. there is only one available. This method will only be successful if theIntegrationPoint
is Windchill RV&S Client. Use this method when theIntegrationPoint
has an authentication policy of AuthenticatedSessionPolicy.- Parameters:
username
- The username associated with theSession
.password
- The password associated with theSession
.- Returns:
- An annonymous
Session
used to run commands on. - Throws:
APIException
- If there was a problem creating aSession
object.- See Also:
Session
-
getSessions
java.util.Iterator<Session> getSessions()
Retrieves anIterator
over theSession
s that have been created for theIntegrationPoint
.- Returns:
- A list of
Session
s that have been created.
-
getAutoStartIntegrityClient
boolean getAutoStartIntegrityClient()
Retrieves the flag indicating if theIntegrationPoint
should attempt to automatically start the Windchill RV&S Client. This is only valid forIntegrationPoint
s that point to Windchill RV&S Client that is local to where the API is being executed from.- Returns:
true
if the Windchill RV&S Client will be automatically started;false
otherwise.
-
setAutoStartIntegrityClient
void setAutoStartIntegrityClient(boolean autoStartIC)
Sets the flag indicating if theIntegrationPoint
should attempt to automatically start the Windchill RV&S Client. This is only valid forIntegrationPoint
s that point to Windchill RV&S Client that is local to where the API is being executed from. The default value isfalse
(that is, do not automatically start the Windchill RV&S Client).- Parameters:
autoStartIC
-true
if the Windchill RV&S Client will be automatically started;false
otherwise.
-
release
void release()
Releases anIntegrationPoint
object after it has completed its purpose.
-
-