com.wm.app.tn.profile
Class Destination

java.lang.Object
  extended by com.wm.app.tn.util.TNFixedData
      extended by com.wm.app.tn.profile.Destination
All Implemented Interfaces:
FieldGroup, com.wm.data.IData, java.lang.Cloneable

public class Destination
extends TNFixedData
implements FieldGroup

A partner's destination that can be used to send documents to the partner.

Objects of this class contain data that appear on the Delivery Method and Security tabs in the TN Console.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.wm.app.tn.util.TNFixedData
TNFixedData.TreeCursor
 
Constructor Summary
Destination()
          Creates a Destination.
 
Method Summary
static com.wm.data.IData create()
          Creates a Destination.
static java.lang.Object[][] destinationSchema()
           
 byte[] getCustomData()
           
 java.lang.String getCustomDataString()
           
 java.lang.String getDestinationID()
           
 java.lang.String getErrorTemplate()
          for internal use only
 java.lang.String getHost()
           
 int getID()
           
 java.lang.String getLocation()
           
 java.lang.String getName()
           
 java.lang.String getNativeProtocol()
           
 java.lang.String getPartnerID()
           
 java.lang.String getPassword()
           
 java.lang.String getPort()
           
 java.lang.String getProtocol()
           
 java.lang.String getProtocolDisplayName()
           
 java.lang.String getUser()
           
 boolean isEmail()
          Does the Destination use the Email (SMTP) protocol? If the destination is a named delivery method, this will work correctly only if 'nativeProtocol' is set
 boolean isFTP()
          Does the Destination use the FTP protocol? If the destination is a named delivery method, this will work correctly only if 'nativeProtocol' is set
 boolean isFTPS()
          Does the Destination use the FTPS protocol? If the destination is a named delivery method, this will work correctly only if 'nativeProtocol' is set
 boolean isHTTP()
          Does the Destination use the HTTP protocol? If the destination is a named delivery method, this will work correctly only if 'nativeProtocol' is set
 boolean isHTTPS()
          Does the Destination use the HTTPS protocol? If the destination is a named delivery method, this will work correctly only if 'nativeProtocol' is set
 boolean isPrimary()
          Is the Destination the primary one for it's protocol? If the destination is a named delivery method, this will work correctly only if 'nativeProtocol' is set
 boolean isWebService()
          Does the Destination use WebService protocol? This method will return the correct value only if 'nativeProtocol' is set
 void setCustomData(byte[] ba)
          Sets custom data that may be used by custom delivery methods.
 void setCustomDataString(java.lang.String ba)
          Sets custom data that as Base64 String may be used by custom delivery methods.
 void setDestinationID(java.lang.String s)
          for internal use only
 void setHost(java.lang.String s)
          Sets the host that documents will be sent to using this Destination.
 void setIData(com.wm.data.IData data)
           
 void setLocation(java.lang.String s)
          Sets the location that documents will be sent to using this Destination.
 void setNativeProtocol(java.lang.String np)
          Sets the native protocol(http, webservice, etc) , if the protocol refers to named delivery method.
 void setPartnerID(java.lang.String s)
          Associates the Destination with a partner.
 void setPassword(java.lang.String s)
          Sets the password that will be used to connect to the Destination when sending documents.
 void setPort(java.lang.String s)
          Sets the port that documents will be sent to using this Destination.
 void setPrimary(boolean b)
          Indicate whether this Destination is the primary one for the protocol
 void setProtocol(java.lang.String s)
          Sets the protocol for the Destination
 void setUser(java.lang.String s)
          Sets the username that will be used to connect to the Destination when sending documents.
 java.lang.String toString()
          Default toString implementation returns class name followed by contents.
 
Methods inherited from class com.wm.app.tn.util.TNFixedData
clone, dataSize, get, get, getCursor, getHashCursor, getIndexCursor, getKey, getSharedCursor, getTreeCursor, indexOf, merge, set, set
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Destination

public Destination()
Creates a Destination.

Method Detail

create

public static com.wm.data.IData create()
Creates a Destination. Used by the IDataCoders.


destinationSchema

public static java.lang.Object[][] destinationSchema()
Returns:
the internal FixedData structure.

getName

public final java.lang.String getName()
Returns:
the name of the Destination group.

getID

public final int getID()
Specified by:
getID in interface FieldGroup
Returns:
the ID of the Destination group.
See Also:
Constants

getDestinationID

public final java.lang.String getDestinationID()
Returns:
the internal ID for the Destination

getPartnerID

public final java.lang.String getPartnerID()
Returns:
the internal TN ID for the partner.

getProtocol

public final java.lang.String getProtocol()
Returns:
the communication protocol for the destination.

getHost

public final java.lang.String getHost()
Returns:
the hostname or IP address for the destination.

getPort

public final java.lang.String getPort()
Returns:
the port number for the destination.

getLocation

public final java.lang.String getLocation()
Returns:
the location for the destination - for most protocols this is a URI.

getUser

public final java.lang.String getUser()
Returns:
the username for the destination.

getPassword

public final java.lang.String getPassword()
Returns:
the password associated with the username for the destination.

getCustomData

public final byte[] getCustomData()
Returns:
the user-defined custom data for the destination. This data is not accessible from the TN Console. It is used to hold additional data for custom delivery mechanisms.

getCustomDataString

public final java.lang.String getCustomDataString()
Returns:
the user-defined custom data in base 64 string for the destination. This data is not accessible from the TN Console. It is used to hold additional data for custom delivery mechanisms.

getNativeProtocol

public final java.lang.String getNativeProtocol()
Returns:
the native protocol(http, webservice, etc) , if the protocol refers to named delivery method. This will be used only during run time and will not be persisted.

isPrimary

public final boolean isPrimary()
Is the Destination the primary one for it's protocol? If the destination is a named delivery method, this will work correctly only if 'nativeProtocol' is set


isHTTP

public final boolean isHTTP()
Does the Destination use the HTTP protocol? If the destination is a named delivery method, this will work correctly only if 'nativeProtocol' is set


isHTTPS

public final boolean isHTTPS()
Does the Destination use the HTTPS protocol? If the destination is a named delivery method, this will work correctly only if 'nativeProtocol' is set


isFTP

public final boolean isFTP()
Does the Destination use the FTP protocol? If the destination is a named delivery method, this will work correctly only if 'nativeProtocol' is set


isFTPS

public final boolean isFTPS()
Does the Destination use the FTPS protocol? If the destination is a named delivery method, this will work correctly only if 'nativeProtocol' is set


isEmail

public final boolean isEmail()
Does the Destination use the Email (SMTP) protocol? If the destination is a named delivery method, this will work correctly only if 'nativeProtocol' is set


isWebService

public final boolean isWebService()
Does the Destination use WebService protocol? This method will return the correct value only if 'nativeProtocol' is set


getProtocolDisplayName

public final java.lang.String getProtocolDisplayName()
Returns:
the name of the protocol as displayed in the TN Console, also known as "The registered delivery method name".

setDestinationID

public final void setDestinationID(java.lang.String s)
for internal use only


setPartnerID

public final void setPartnerID(java.lang.String s)
Associates the Destination with a partner.

Parameters:
s - the webMethods internal partner ID.

setProtocol

public final void setProtocol(java.lang.String s)
Sets the protocol for the Destination

Parameters:
s - valid values are:
  • http
  • https
  • ftp
  • ftps
  • smtp
  • a custom delivery method

setHost

public final void setHost(java.lang.String s)
Sets the host that documents will be sent to using this Destination. This is ignored for email (smtp) Destinations.

Parameters:
s - a hostname or IP address

setPort

public final void setPort(java.lang.String s)
Sets the port that documents will be sent to using this Destination. If no port is set, TN will use the default for the protocol, i.e. 80 for http, 21 for ftp. This is ignored for email (smtp) Destinations.

Parameters:
s - a port number

setLocation

public final void setLocation(java.lang.String s)
Sets the location that documents will be sent to using this Destination.

Parameters:
s - the meaning of the parameter depends on the protocol:
  • for http - a URL
  • for https - a URL
  • for ftp - a directory path
  • for ftps - a directory path
  • for smtp - an email address

setUser

public final void setUser(java.lang.String s)
Sets the username that will be used to connect to the Destination when sending documents. This is ignored for email (smtp) Destinations.

Parameters:
s - a username

setPassword

public final void setPassword(java.lang.String s)
Sets the password that will be used to connect to the Destination when sending documents. This is ignored for email (smtp) Destinations.

Parameters:
s - a username

setPrimary

public final void setPrimary(boolean b)
Indicate whether this Destination is the primary one for the protocol

Parameters:
b - true if it is the primary Destination, otherwise false

setCustomData

public final void setCustomData(byte[] ba)
Sets custom data that may be used by custom delivery methods. This value is ignored by the built-in delivery methods.

Parameters:
ba - the custom data

setCustomDataString

public final void setCustomDataString(java.lang.String ba)
Sets custom data that as Base64 String may be used by custom delivery methods. This value is ignored by the built-in delivery methods.

Parameters:
ba - the custom data

setNativeProtocol

public final void setNativeProtocol(java.lang.String np)
Sets the native protocol(http, webservice, etc) , if the protocol refers to named delivery method. This will be used only during run time and will not be persisted.

Parameters:
np - native protocol

toString

public final java.lang.String toString()
Description copied from class: TNFixedData
Default toString implementation returns class name followed by contents.

Overrides:
toString in class TNFixedData
Returns:
a String representation of a Destination

getErrorTemplate

public final java.lang.String getErrorTemplate()
Description copied from interface: FieldGroup
for internal use only

Specified by:
getErrorTemplate in interface FieldGroup
Returns:
a template for formatting error messages.

setIData

public void setIData(com.wm.data.IData data)