com.wm.app.tn.profile
Class Profile

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

public class Profile
extends TNFixedData

Contains information about a partner on the trading network.

A Profile contains information about a partner's corporation, contacts, addresses, destinations for document exchange, and more. There is a set of standard fields supplied with the Trading Networks product. Customers may add to these by creating extended fields.

Access to Profiles is granted through the ProfileStore and the wm.tn.profile Integration server package. See com.wm.app.tn.profile.ProfileStore and the Trading Networks Built-in services documentation for details on how to create, save, change and delete Profiles.

See Also:
ProfileStore, FieldGroup, ExtendedProfileField

Nested Class Summary
 
Nested classes/interfaces inherited from class com.wm.app.tn.util.TNFixedData
TNFixedData.TreeCursor
 
Constructor Summary
Profile()
          Creates a Profile.
 
Method Summary
 void addContact(Contact cont)
          Adds a new contact to the profile.
 void addDestination(Destination dest)
          Adds a new destination to the profile.
 void addID(ID id)
          Adds a new ID to the profile.
 void addProfileGroup(java.lang.String groupId)
          Set this profile to associate with a new profile group.
 void addUser(java.lang.String user)
           
static com.wm.data.IData create()
          Creates a Profile.
 java.util.Enumeration getContacts()
          Retrieves the set of contacts for the Profile.
 java.util.Vector getContactVector()
          Retrieves a modifiable set of contacts for the Profile.
 Corporation getCorporation()
          Retrieves the corporate component of a Profile.
 java.util.Enumeration getDestinations()
          Retrieves the set of document destinations for the Profile.
 java.util.Vector getDestinationVector()
          Retrieves a modifiable set of destinations from the Profile.
 java.lang.String getDisplayName()
           
 java.util.Enumeration getExternalIDs()
          Retrieves the set of external IDs for the Profile.
 java.util.Vector getExternalIDVector()
          Retrieves a modifiable set of external IDs from the Profile.
 Destination getPreferredDestination()
           
 java.lang.String[] getProfileGroupNames()
          for internal use only
 java.util.Enumeration getProfileGroups()
          Retrieve a list of profile groups that this profile is a member of.
 java.util.Vector getProfileGroupVector()
           
 java.util.Enumeration getUsers()
          Retrieves the set of IS Users for the Profile.
 java.util.Vector getUserVector()
           
static java.lang.Object[][] profileSchema()
           
 void removeContacts()
          Removes the entire set of Contacts from a Profile.
 void removeDestinations()
          Removes the entire set of Destinations from a Profile.
 void removeExternalIDs()
          Removes the entire set of IDs from a Profile.
 void removeUsers()
           
 void setContacts(java.util.Vector contacts)
          Replaces the entire set of Contacts for a Profile
 void setCorporation(Corporation corp)
          Sets the corporate component of a Profile.
 void setDestinations(java.util.Vector dests)
          Replaces the entire set of Destinations for a Profile
 void setExternalIDs(java.util.Vector ids)
          Replaces the entire set of IDs for a Profile
 void setProfileGroupNames(java.lang.String[] groupNames)
          for internal use only
 void setProfileGroups(java.lang.String[] groupIds)
          Set this profile to assoiciate with a list of profile groups.
 void setUsers(java.lang.String[] users)
           
 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

Profile

public Profile()
Creates a Profile.

Method Detail

create

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


profileSchema

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

getCorporation

public final Corporation getCorporation()
Retrieves the corporate component of a Profile. These are a set of fields that occur once per profile.

Returns:
a Corporation

getDisplayName

public final java.lang.String getDisplayName()
Returns:
a displayable name for a partner

setCorporation

public final void setCorporation(Corporation corp)
Sets the corporate component of a Profile.


getContacts

public final java.util.Enumeration getContacts()
Retrieves the set of contacts for the Profile.

Returns:
an Enumeration of Contacts.

getContactVector

public final java.util.Vector getContactVector()
Retrieves a modifiable set of contacts for the Profile. If you intend to update Contacts on a Profile, use this method.

Returns:
a Vector of Contacts.

addContact

public final void addContact(Contact cont)
Adds a new contact to the profile. The profile must be saved in order for the new contact to persist.


setContacts

public final void setContacts(java.util.Vector contacts)
Replaces the entire set of Contacts for a Profile


removeContacts

public final void removeContacts()
Removes the entire set of Contacts from a Profile.


getExternalIDs

public final java.util.Enumeration getExternalIDs()
Retrieves the set of external IDs for the Profile.

Returns:
an Enumeration of IDs.

getUsers

public final java.util.Enumeration getUsers()
Retrieves the set of IS Users for the Profile.

Returns:
an Enumeration of ISUsers.

getExternalIDVector

public final java.util.Vector getExternalIDVector()
Retrieves a modifiable set of external IDs from the Profile. If you intend to update IDs on a Profile, use this method.

Returns:
a Vector of IDs.

getUserVector

public final java.util.Vector getUserVector()

addID

public final void addID(ID id)
Adds a new ID to the profile. The profile must be saved in order for the new ID to persist.


addUser

public final void addUser(java.lang.String user)

setExternalIDs

public final void setExternalIDs(java.util.Vector ids)
Replaces the entire set of IDs for a Profile


setUsers

public final void setUsers(java.lang.String[] users)

removeExternalIDs

public final void removeExternalIDs()
Removes the entire set of IDs from a Profile.


removeUsers

public final void removeUsers()

getDestinations

public final java.util.Enumeration getDestinations()
Retrieves the set of document destinations for the Profile.

Returns:
an Enumeration of Destinations.

getDestinationVector

public final java.util.Vector getDestinationVector()
Retrieves a modifiable set of destinations from the Profile. If you intend to update Destinations on a Profile, use this method.

Returns:
a Vector of Destinations.

getPreferredDestination

public final Destination getPreferredDestination()
Returns:
the Destination object representing a partner's Preferred Protocol. Returns null if the Profile has no Preferred Protocol or there is no Destination matching Profile's Preferred Protocol.

addDestination

public final void addDestination(Destination dest)
Adds a new destination to the profile. The profile must be saved in order for the new destination to persist.


setDestinations

public final void setDestinations(java.util.Vector dests)
Replaces the entire set of Destinations for a Profile


removeDestinations

public final void removeDestinations()
Removes the entire set of Destinations from a Profile.


addProfileGroup

public final void addProfileGroup(java.lang.String groupId)
Set this profile to associate with a new profile group.


setProfileGroups

public final void setProfileGroups(java.lang.String[] groupIds)
Set this profile to assoiciate with a list of profile groups. Delete all profile group memberships if groupIds is null or empty.


getProfileGroups

public final java.util.Enumeration getProfileGroups()
Retrieve a list of profile groups that this profile is a member of.


getProfileGroupVector

public final java.util.Vector getProfileGroupVector()

setProfileGroupNames

public final void setProfileGroupNames(java.lang.String[] groupNames)
for internal use only


getProfileGroupNames

public final java.lang.String[] getProfileGroupNames()
for internal use only


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 Profile

toMwSString

public final java.lang.String toMwSString()
Returns:
a String representation of a Profile