com.wm.app.tn.profile
Class Corporation

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

public class Corporation
extends TNFixedData
implements FieldGroup

All the corporate fields for a partner on the trading network.

The Corporation contains zero or more Addresses, which may be obtained by calling getAddresses.

See Also:
Address

Nested Class Summary
 
Nested classes/interfaces inherited from class com.wm.app.tn.util.TNFixedData
TNFixedData.TreeCursor
 
Constructor Summary
Corporation()
           
 
Method Summary
static java.lang.Object[][] corporationSchema()
           
static com.wm.data.IData create()
           
 Address[] getAddresses()
           
 java.lang.String getCACertificate()
           
 java.lang.String getCertificate()
           
 java.lang.String getCorporationName()
           
 java.lang.String getDeliveryQueue()
           
 short getDeliveryRetries()
           
 int getDeliveryWait()
           
 java.lang.String getDisplayName()
           
 java.lang.String getErrorTemplate()
          for internal use only
 int getID()
           
 byte[] getLogo()
           
 java.lang.String getName()
           
 java.lang.String getOrgUnitName()
           
 java.lang.String getPartnerID()
           
 java.lang.String getPartnerType()
           
 float getPollingFrequency()
           
 java.lang.String getPollingProtocol()
           
 java.util.Locale getPreferredLocale()
           
 java.lang.String getPreferredLocaleString()
           
 java.lang.String getPreferredProtocol()
           
 java.lang.String getPrivateKey()
           
 java.lang.String getRemoteStatus()
           
 int getRetryFactor()
           
 java.lang.String getStatus()
           
 java.lang.String getTNVersion()
           
 boolean isB2BcomMember()
          Is this partner a member of B2B.com?
 boolean isDeleted()
          Is this partner's profile deleted?
 boolean isRoutingOff()
          Is routing switched off for the particular partner?
 boolean isSelf()
          Is this the profile for my enterprise (the host of this Trading Networks server)?
 void setAddresses(Address[] arr)
          Replaces the set of corporate addresses.
 void setB2BcomMember(boolean b)
          for internal use only
 void setCACertificate(java.lang.String s)
           
 void setCertificate(java.lang.String s)
           
 void setCorporationName(java.lang.String s)
          Sets the name of the partner's corporation
 void setDeleted(boolean b)
          Indicate if the partner is deleted.
 void setDeliveryQueue(java.lang.String s)
          Sets the delivery queue used for scheduled delivery of documents to this partner.
 void setDeliveryRetries(short s)
          Sets the number of times to retry document delivery to this partner is the initial delivery attempt fails.
 void setDeliveryWait(int i)
          Sets the time to wait after a failed delivery and before the first retry.
 void setLogo(byte[] b)
          Sets the company logo.
 void setOrgUnitName(java.lang.String s)
          Sets the name of the partner's organizational unit withiin the corporation
 void setPartnerID(java.lang.String s)
          for internal use only
 void setPartnerType(java.lang.String s)
          Sets the type of software being used by the partner.
 void setPollingFrequency(float f)
          Sets the frequency to poll for documents from this partner.
 void setPollingProtocol(java.lang.String s)
          Sets the protocol to use when polling for documents from this partner.
 void setPreferredLocale(java.util.Locale l)
          Sets the preferred locale
 void setPreferredLocaleString(java.lang.String s)
          Sets the preferred locale
 void setPreferredProtocol(java.lang.String s)
          Indicates which delivery method the partner prefers to receive documents with.
 void setPrivateKey(java.lang.String s)
           
 void setRemoteStatus(java.lang.String s)
          for internal use only
 void setRetryFactor(int i)
          Sets the "back-off" factor for retries.
 void setRoutingOff(boolean b)
          Indicate if the partner is deleted.
 void setSelf(boolean b)
          Indicate if the partner is the Trading Network host.
 void setStatus(java.lang.String s)
          Sets the partner's current status.
 void setTNVersion(java.lang.String s)
          for internal use only
 java.lang.String toMwSString()
           
 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

Corporation

public Corporation()
Method Detail

corporationSchema

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

create

public static com.wm.data.IData create()

getName

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

getID

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

getPartnerID

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

getCorporationName

public final java.lang.String getCorporationName()
Returns:
the name of the partner's corporation

getOrgUnitName

public final java.lang.String getOrgUnitName()
Returns:
the name of the partner's organizational unit within the corporation

getStatus

public final java.lang.String getStatus()
Returns:
the current status of the partner in the trading network. Constants for the status values can be found in the Constants class. They begin with PARTNER_STATUS.
See Also:
Constants

getPartnerType

public final java.lang.String getPartnerType()
Returns:
the type of software used by the partner in the trading network. Constants for the these values can be found in the Constants class. They begin with PARTNER_TYPE.
See Also:
Constants

isSelf

public final boolean isSelf()
Is this the profile for my enterprise (the host of this Trading Networks server)?


isDeleted

public final boolean isDeleted()
Is this partner's profile deleted?


isRoutingOff

public final boolean isRoutingOff()
Is routing switched off for the particular partner?


isB2BcomMember

public final boolean isB2BcomMember()
Is this partner a member of B2B.com?


getTNVersion

public final java.lang.String getTNVersion()
Returns:
the version of Trading Networks this partner is using

getCertificate

public final java.lang.String getCertificate()

getCACertificate

public final java.lang.String getCACertificate()

getPrivateKey

public final java.lang.String getPrivateKey()

getRemoteStatus

public final java.lang.String getRemoteStatus()
Returns:
the status of the profile for your enterprise (the host of this Trading Networks server) on the partner's Trading Networks server.

getPreferredProtocol

public final java.lang.String getPreferredProtocol()
Returns:
name of the registered delivery method the partner prefers you to use when sending documents

getDeliveryRetries

public final short getDeliveryRetries()
Returns:
the number of times to retry a failed document delivery to the partner

getDeliveryWait

public final int getDeliveryWait()
Returns:
the time to wait in milliseconds, after document delivery fails, before attempting delivery a second time

getRetryFactor

public final int getRetryFactor()
Returns:
the "back-off" factor that controls how frequently subsequent retries of a failed delivery are attempted. Example: If DeliveryWait is 30000 ms and RetryFactor is 3, retries will occur after 30 seconds; 90 seconds; 180 seconds; etc.

getPollingFrequency

public final float getPollingFrequency()
Returns:
the frequency, in seconds that you will poll the partner's server

getPollingProtocol

public final java.lang.String getPollingProtocol()
Returns:
name of the registered delivery method to use to poll the partner for documents

getDeliveryQueue

public final java.lang.String getDeliveryQueue()
Returns:
name of the queue used for scheduled delivery to this partner

getLogo

public final byte[] getLogo()
Returns:
the partner's corporate logo as a GIF or JPEG

getAddresses

public final Address[] getAddresses()
Returns:
an array of corporate Addresses. Could be null.

getDisplayName

public final java.lang.String getDisplayName()
Returns:
a display name for the partner in the format "CorporationName (OrgUnitName)"

getPreferredLocaleString

public final java.lang.String getPreferredLocaleString()
Returns:
a string representation of the java.util.Locale

getPreferredLocale

public final java.util.Locale getPreferredLocale()
Returns:
a java.util.Locale for the preferred locale

setPartnerID

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


setCorporationName

public final void setCorporationName(java.lang.String s)
Sets the name of the partner's corporation


setOrgUnitName

public final void setOrgUnitName(java.lang.String s)
Sets the name of the partner's organizational unit withiin the corporation


setStatus

public final void setStatus(java.lang.String s)
Sets the partner's current status. Constants for the status values can be found in the Constants class. They begin with PARTNER_STATUS.

See Also:
Constants

setPartnerType

public final void setPartnerType(java.lang.String s)
Sets the type of software being used by the partner. Constants for these values can be found in the Constants class. They begin with PARTNER_TYPE.

See Also:
Constants

setSelf

public final void setSelf(boolean b)
Indicate if the partner is the Trading Network host.

Parameters:
b - true if partner is the host, otherwise false

setDeleted

public final void setDeleted(boolean b)
Indicate if the partner is deleted. If you set this to true and save the profile, the partner is deleted from Trading Networks.

Parameters:
b - true if partner is deleted, otherwise false

setRoutingOff

public final void setRoutingOff(boolean b)
Indicate if the partner is deleted. If you set this to true and save the profile, the partner is deleted from Trading Networks.

Parameters:
b - true if partner is deleted, otherwise false

setB2BcomMember

public final void setB2BcomMember(boolean b)
for internal use only


setTNVersion

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


setCertificate

public final void setCertificate(java.lang.String s)

setCACertificate

public final void setCACertificate(java.lang.String s)

setPrivateKey

public final void setPrivateKey(java.lang.String s)

setRemoteStatus

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


setPollingFrequency

public final void setPollingFrequency(float f)
Sets the frequency to poll for documents from this partner.

Parameters:
f - the polling frequency, in second. If 0, no polling is performed.

setPollingProtocol

public final void setPollingProtocol(java.lang.String s)
Sets the protocol to use when polling for documents from this partner.

Parameters:
s - valid values are:
  • http
  • https
  • ftp

setDeliveryQueue

public final void setDeliveryQueue(java.lang.String s)
Sets the delivery queue used for scheduled delivery of documents to this partner.


setDeliveryRetries

public final void setDeliveryRetries(short s)
Sets the number of times to retry document delivery to this partner is the initial delivery attempt fails.


setDeliveryWait

public final void setDeliveryWait(int i)
Sets the time to wait after a failed delivery and before the first retry.

Parameters:
the - number of milliseconds to wait

setRetryFactor

public final void setRetryFactor(int i)
                          throws java.lang.IllegalArgumentException
Sets the "back-off" factor for retries. This value is used in conjunction with the DeliveryWait value to determine how long to wait for each delivery attempt. The RetryFactor is multiplied by the previous waiting period for each subsequent retry.

For example: if DeliveryWait is 60000ms and RetryFactor is 3, delivery will be retried after 1 minute, 3 minutes, 9 minutes, 37 minutes, etc.

Throws:
java.lang.IllegalArgumentException - if a value less than 1 is supplied

setLogo

public final void setLogo(byte[] b)
Sets the company logo.

Parameters:
b - a GIF or JPEG in a byte array

setAddresses

public final void setAddresses(Address[] arr)
Replaces the set of corporate addresses.

Parameters:
arr - an array of Address objects

setPreferredProtocol

public final void setPreferredProtocol(java.lang.String s)
Indicates which delivery method the partner prefers to receive documents with.

Parameters:
s - the name of the preferred delivery method, i.e. "Primary HTTP", "My Custom Service"

setPreferredLocale

public final void setPreferredLocale(java.util.Locale l)
Sets the preferred locale

Parameters:
l - a java.util.Locale

setPreferredLocaleString

public final void setPreferredLocaleString(java.lang.String s)
Sets the preferred locale

Parameters:
s - a string representation of the java.util.Locale

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 representing a Corporation

toMwSString

public final java.lang.String toMwSString()

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.