|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.wm.app.tn.profile.ProfileStore
public class ProfileStore
Provides access to Profiles for all partners on the trading network.
The ProfileStore is used to retrieve individual Profiles and lists of ProfileSummaries. It is also used to add new Profiles, and change or delete existing ones.
ProfileStore is a Singleton. A reference to it can be obtained from the static method getProfileStore
which will create the single instance the first time it's called, and return a reference to the store.
quietGetProfileStore
is also available, which will not throw any exceptions.
A list of ProfileSummaries can be retrieved using getProfileSummaryList
.
getProfile
retrieves the entire profile for a partner. While getProfile
can be called with
either a partnerID or externalID & idType, using the partnerID is more efficient.
getInternalID
will return a partner's internal webMethods ID given an external ID, such as DUNS.
Profile
,
ProfileSummary
Method Summary | |
---|---|
static java.util.Vector |
addAddressess(java.util.Vector addrs,
java.lang.String partnerID)
Adds one or more Addresses to a partner's profile in the profile store. |
static java.util.Vector |
addContacts(java.util.Vector contacts,
java.lang.String partnerID)
Adds one or more Contacts to a partner's profile in the profile store. |
static java.util.Vector |
addDestinations(java.util.Vector dests,
java.lang.String partnerID)
Adds one or more Destinations to a partner's profile in the profile store. |
static void |
addExtendedField(java.lang.String partnerID,
ExtendedProfileField ef)
Adds an extended field to a partner's profile. |
static java.util.Vector |
addIDs(java.util.Vector ids,
java.lang.String partnerID)
Adds one or more external IDs to a partner's profile in the profile store. |
static void |
addPartnerBinary(java.lang.String partnerID,
int binaryType,
byte[] bytes)
Adds a binary object to a partner's profile in the profile store. |
static boolean |
addPartnerCertificate(java.lang.String partnerID,
java.security.cert.X509Certificate cert)
Deprecated. starting release 6.2. If sender partnerID, receiver my enterprise's sign certificate is saved in db, and matches supplied cert, returns true. |
static java.lang.String |
addProfile(Profile profile)
Adds a new profile to the profile store. |
static java.lang.String |
addProfile(Profile profile,
boolean validated)
Adds a new profile to the profile store. |
static void |
addProfileGroup(java.sql.Connection conn,
java.lang.String partnerId,
java.lang.String profileGroupId)
Adds a partner to a profile group. |
static void |
addProfileGroup(java.lang.String partnerId,
java.lang.String profileGroupId)
Adds a partner to a profile group. |
static void |
addProfileGroups(java.sql.Connection conn,
java.lang.String partnerId,
java.lang.String[] profileGroupIds)
Adds a partner to one or more profile groups. |
static void |
addProfileGroups(java.lang.String partnerId,
java.lang.String[] profileGroupIds)
Adds a partner to one or more profile groups. |
static com.wm.app.b2b.client.Context |
connectToPartner(java.lang.String partnerID,
java.lang.String destination,
boolean xml)
Establishes a connection to a partner's B2B server. |
static com.wm.app.b2b.client.Context |
connectToPartner(java.lang.String partnerID,
java.lang.String destination,
java.lang.String user,
java.lang.String password,
boolean xml)
Establishes a connection to a partner's B2B server. |
static void |
deleteAddress(java.lang.String addressID,
java.lang.String partnerID)
Removes a partner's or contact's address from the database. |
static void |
deleteContact(java.lang.String contactID,
java.lang.String partnerID)
Removes a partner's contact from the database. |
static void |
deleteDestination(java.lang.String destID)
Removes a partner's Destination (a.k.a. |
static void |
deleteID(java.lang.String id)
|
static void |
deleteProfile(java.lang.String partnerID,
boolean remove)
Mark a partner's profile as deleted in the profile store. |
static void |
deleteProfile(java.lang.String partnerID,
boolean delete,
boolean remove,
java.sql.Connection conn)
Mark a partner's profile as deleted or undeleted in the profile store. |
static void |
deleteProfileGroup(java.lang.String partnerId,
java.lang.String profileGroupId)
Deletes a partner from a profile group. |
static java.lang.String |
getCurrentID()
Deprecated. now there can be more than one partner against a User . This method would just return the first mapping PUH |
static java.lang.String |
getCurrentID(java.sql.Connection conn)
Deprecated. now there can be more than one partner against a User . This method would just return the first mapping PUH |
static java.lang.String[] |
getCurrentIDs()
|
static int |
getDefaultIDType()
|
static java.util.Enumeration |
getDestinations(java.lang.String partnerID,
java.lang.String protocol)
Retrieves the known destinations of a particular protocol for a partner. |
static java.util.Vector |
getExtendedFields(java.lang.String partnerID,
int groupID)
|
static java.util.Vector<ExtendedProfileField> |
getExtendedFields(java.lang.String profileID,
java.lang.String displayName)
|
static java.util.Vector |
getExtendedFieldsForPartner(java.lang.String partnerID)
|
static ExtendedProfileField[] |
getExtendedFieldTemplate(int group)
|
static java.lang.String |
getExternalID(java.lang.String partnerID,
int extIDType)
Gets an external ID for a trading partner. |
static java.lang.String |
getExternalID(java.lang.String partnerID,
java.lang.String extIDType)
Gets an external ID for a trading partner. |
static java.lang.String[] |
getExternalIDs(java.lang.String partnerID,
int extIDType)
Gets external IDs of the specified type for a trading partner. |
static java.lang.String |
getIDForUsername(java.lang.String username)
Deprecated. now there can be more than one partner against a User . This method would just return the first mapping TO DO depracate this method |
static java.lang.String[] |
getIDsForUsername(java.lang.String username)
|
static java.lang.String[] |
getIDsForUsername(java.lang.String username,
java.lang.String senderID)
|
static java.lang.String[] |
getIDsForUsernameIgnoreCase(java.lang.String username)
|
static java.lang.String[] |
getIDsForUsernameIgnoreCase(java.lang.String username,
java.lang.String senderID)
|
static int |
getIDTypeByPartnerIDID(java.lang.String partneridid)
Gets a trading partner's external IDType from a known PartnerIDID, the primary key for the PartnerID table. |
static int |
getIDTypeByPartnerIDID(java.lang.String partneridid,
java.sql.Connection conn)
Gets a trading partner's external IDType from a known PartnerIDID, the primary key for the PartnerID table. |
static java.lang.String |
getInternalID(java.lang.String extID,
int extIDType)
Gets a trading partner's internal ID from a known external ID. |
static java.lang.String |
getInternalID(java.lang.String extID,
int extIDType,
java.sql.Connection conn)
Gets a trading partner's internal ID from a known external ID. |
static java.lang.String |
getInternalIDByDestinationID(java.lang.String destid)
Gets a trading partner's internal ID from a known DestinationID, the primary key for the Destination table. |
static java.lang.String |
getInternalIDByDestinationID(java.lang.String destid,
java.sql.Connection conn)
Gets a trading partner's internal ID from a known DestinationID, the primary key for the Destination table. |
static java.lang.String |
getInternalIDByPartnerIDID(java.lang.String partneridid)
Gets a trading partner's internal ID from a known PartnerIDID, the primary key for the PartnerID table. |
static java.lang.String |
getInternalIDByPartnerIDID(java.lang.String partneridid,
java.sql.Connection conn)
Gets a trading partner's internal ID from a known PartnerIDID, the primary key for the PartnerID table. |
static java.util.Hashtable |
getLogos()
Gets company logos for all partners. |
static java.lang.String |
getMyID()
Get the internally generated partner ID of the host of this TN server. |
static byte[] |
getPartnerBinary(java.lang.String partnerID,
int binaryType)
Retrieves the binary value of the requested type for a partner. |
static byte[] |
getPartnerBinary(java.lang.String partnerID,
java.lang.String binaryType)
Retrieves the binary value of the requested type for a partner. |
static Contact |
getPartnerContact(java.lang.String partnerID,
java.lang.String contactType)
Deprecated. use the getPatnerContacts instead |
static java.util.Vector |
getPartnerContacts(java.lang.String partnerID,
java.lang.String contactType)
Retrieves a specific type of Contact(s) for a trading partner. |
static java.lang.String |
getPartnerIDForCertificate(java.security.cert.X509Certificate cert)
Deprecated. starting release 6.2. Given a X509 Certificate, owner/sender the returned partnerID, partner/receiver my enterprise, usage sign. i.e. verfiy certificate for partner to my enterprise. If no match owner/sender found, returns null. |
static java.lang.String[] |
getPartnerIDs(java.lang.String regexForName)
|
static com.wm.app.b2b.server.User |
getPartnerUser(java.lang.String internalID)
Deprecated. This method would now returns the first user in the String[] |
static java.util.Hashtable |
getPollingFrequencies()
Retrieves the polling frequencies for all partners on the network. |
static Profile |
getProfile(java.lang.String partnerID)
Get the partner profile that matches the supplied ID. |
static Profile |
getProfile(java.lang.String extID,
int extIDType)
Get the partner profile that matches the supplied external ID and ID type. |
static java.lang.String[] |
getProfileGroups(java.lang.String partnerId)
|
static ProfileStore |
getProfileStore()
Deprecated. Starting in version 6.5, it is no longer necessary to get an instance of the ProfileStore. All public methods are static. |
static ProfileStore |
getProfileStore(boolean refresh)
Deprecated. Starting in version 6.5, it is no longer necessary to get an instance of the ProfileStore. All public methods are static. To force a refresh of the ProfileStore caches, call refreshSummaries() and/or refreshIDMap(). |
static ProfileSummary |
getProfileSummary(java.lang.String partnerID)
Get summary information for a partner. |
static ProfileSummary |
getProfileSummary(java.lang.String partnerID,
boolean refresh)
Get summary information for a partner. |
static ProfileSummary |
getProfileSummaryByName(java.lang.String displayName)
Get summary information for a partner. |
static java.util.Vector |
getProfileSummaryList(boolean deleted,
boolean refresh)
Get summary information for trading partners on the trading network. |
static java.lang.String |
getRequiredExternalID(java.lang.String partnerID)
Deprecated. It now returns ID of the default Idtype The required Idtype does not exist anymore |
static int |
getRequiredIDType()
Deprecated. required id type does not hold anymore |
static com.wm.data.IData |
queryProfiles(ProfileQuery query,
int pageSize,
int maxRowCount,
int queryTimeout,
int threshold,
java.lang.String queryId)
Executes a query for partner profile information from the TN database. |
static ProfileStore |
quietGetProfileStore()
Deprecated. Starting in version 6.5, it is no longer necessary to get an instance of the ProfileStore. All public methods are static. |
static void |
refreshIDMap()
Refreshes the cached map of external-to-internal partnerIDs |
static void |
refreshSummaries()
Refreshes the cached list of ProfileSummaries from the database |
static void |
updateAddresses(java.util.Vector addrs)
Changes one or more Addresses for a partner or a partner's contact in the profile store. |
static void |
updateContacts(java.util.Vector contacts)
Changes one or more Contacts for a partner in the profile store. |
static void |
updateCorporation(Corporation corp)
Changes the Corporate component of a partner's profile in the profile store. |
static java.lang.String |
updateDeletedProfile(Profile p,
java.sql.Connection conn)
Overwrites a deleted partner's profile in the profile store. |
static void |
updateDestinations(java.util.Vector dests)
Changes one or more Destinations for a partner in the profile store. |
static void |
updateExtendedFields(java.lang.String partnerID,
java.util.Vector flds)
Updates one or more extended fields in a partner's profile. |
static void |
updateIDs(java.util.Vector ids)
Changes one or more external IDs for a partner in the profile store. |
static void |
updatePartnerBinary(java.lang.String partnerID,
int binaryType,
byte[] bytes)
Changes or removes an existing binary object for a partner. |
static void |
updateProfileGroups(java.lang.String partnerId,
java.lang.String[] profileGroupIds)
Updates the set of profile groups that a partner is a member of. |
static void |
updateRemoteStatus(java.lang.String partnerID,
java.lang.String status)
Deprecated. Starting in version 4.6, there is no Remote Status for a partner profile. |
static void |
updateStatus(java.lang.String partnerID,
java.lang.String status)
Updates a partner's status. |
static void |
updateSubstatus(java.lang.String partnerID,
java.lang.String substatus)
Updates a partner's sub status. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ProfileStore quietGetProfileStore()
public static ProfileStore getProfileStore() throws ProfileStoreException
ProfileStoreException
public static ProfileStore getProfileStore(boolean refresh) throws ProfileStoreException
refresh
- should the cache be refreshed from database
ProfileStoreException
public static final void refreshSummaries() throws java.sql.SQLException, ProfileStoreException
java.sql.SQLException
ProfileStoreException
public static final void refreshIDMap() throws java.sql.SQLException, ProfileStoreException
java.sql.SQLException
ProfileStoreException
public static final Profile getProfile(java.lang.String partnerID) throws ProfileStoreException
partnerID
- internally assigned ID of a partner on the trading network
ProfileStoreException
- if an error occurred while retrieving the profile from the
profile storeProfile
public static final Profile getProfile(java.lang.String extID, int extIDType) throws ProfileStoreException
extID
- an external ID for a partner on the trading networkextIDType
- the type of external ID. This value must match one of the types defined in the IDType table
ProfileStoreException
- if an error occurred while retrieving the profile from the
profile storeProfile
,
LookupStore.getExternalIDTypes()
public static final java.util.Vector getProfileSummaryList(boolean deleted, boolean refresh) throws ProfileStoreException
deleted
- a boolean indicating whether to retrieve deleted profiles or non-deleted ones. Pass
true
to get deleted profile summaries.refresh
- a boolean indicating whether to refresh the cache of profile summaries from the database.
ProfileStoreException
- if unable to retrieve the summaries from the profile storeProfileSummary
public static final ProfileSummary getProfileSummaryByName(java.lang.String displayName)
displayName
- the name of parnter profile, as returned by ProfileSummary.getDisplayName
ProfileSummary
public static final ProfileSummary getProfileSummary(java.lang.String partnerID) throws ProfileStoreException
partnerID
- the TN-generated identifier for a partner
ProfileStoreException
ProfileSummary
public static final ProfileSummary getProfileSummary(java.lang.String partnerID, boolean refresh) throws ProfileStoreException
partnerID
- the TN-generated identifier for a partnerrefresh
- a boolean indicating whether to refresh the cache of profile summaries from the database.
ProfileStoreException
ProfileSummary
public static final ExtendedProfileField[] getExtendedFieldTemplate(int group) throws ProfileStoreException
ProfileStoreException
- if unable to retrieve custom fieldspublic static final java.lang.String getMyID()
public static final java.lang.String getCurrentID() throws ProfileStoreException
ProfileStoreException
public static final java.lang.String getCurrentID(java.sql.Connection conn) throws ProfileStoreException
conn
- an open java.sql.Connection to the TN database
ProfileStoreException
public static final java.lang.String[] getCurrentIDs() throws ProfileStoreException
ProfileStoreException
public static final java.lang.String getIDForUsername(java.lang.String username) throws ProfileStoreException
username
- a B2B username
ProfileStoreException
public static final java.lang.String[] getIDsForUsername(java.lang.String username) throws ProfileStoreException
ProfileStoreException
public static java.lang.String[] getIDsForUsername(java.lang.String username, java.lang.String senderID) throws ProfileStoreException
ProfileStoreException
public static final java.lang.String[] getIDsForUsernameIgnoreCase(java.lang.String username) throws ProfileStoreException
ProfileStoreException
public static java.lang.String[] getIDsForUsernameIgnoreCase(java.lang.String username, java.lang.String senderID) throws ProfileStoreException
ProfileStoreException
public static final java.lang.String getInternalID(java.lang.String extID, int extIDType) throws ProfileStoreException
extID
- the external IDextIDType
- the type of external ID. Must be one of the external ID types returned by
LookupStore.getExternalIDTypes
.
ProfileStoreException
- if an error occurred while retrieving the profile ID from
the profile storeLookupStore.getExternalIDTypes()
public static final java.lang.String getInternalID(java.lang.String extID, int extIDType, java.sql.Connection conn) throws ProfileStoreException
extID
- the external IDextIDType
- the type of external ID. Must be one of the external ID types returned by
LookupStore.getExternalIDTypes
.conn
- an open java.sql.Connection to the TN database
ProfileStoreException
- if an error occurred while retrieving the profile ID from
the profile storeLookupStore.getExternalIDTypes()
public static final java.lang.String getInternalIDByPartnerIDID(java.lang.String partneridid) throws ProfileStoreException
partneridid
- the PartnerIDID
ProfileStoreException
- if an error occurred while retrieving the profile ID from
the profile storepublic static final java.lang.String getInternalIDByPartnerIDID(java.lang.String partneridid, java.sql.Connection conn) throws ProfileStoreException
partneridid
- the PartnerIDIDconn
- an open java.sql.Connection to the TN database
ProfileStoreException
- if an error occurred while retrieving the profile ID from
the profile storepublic static final java.lang.String getInternalIDByDestinationID(java.lang.String destid) throws ProfileStoreException
destid
- the DestinationID
ProfileStoreException
- if an error occurred while retrieving the profile ID from
the profile storepublic static final java.lang.String getInternalIDByDestinationID(java.lang.String destid, java.sql.Connection conn) throws ProfileStoreException
destid
- the DestinationIDconn
- an open java.sql.Connection to the TN database
ProfileStoreException
- if an error occurred while retrieving the profile ID from
the profile storepublic static final java.lang.String getRequiredExternalID(java.lang.String partnerID) throws ProfileStoreException
partnerID
- a partner's internal ID
ProfileStoreException
- if an error occurred while retrieving the ID from the
profile storepublic static final java.lang.String getExternalID(java.lang.String partnerID, java.lang.String extIDType) throws ProfileStoreException
partnerID
- a partner's internal IDextIDType
- description of the type of external ID to retrieve. Must be one of the external ID type
descriptions returned by LookupStore.getExternalIDTypes
.
ProfileStoreException
- if an error occurred while retrieving the ID from the
profile storeLookupStore.getExternalIDTypes()
public static final java.lang.String getExternalID(java.lang.String partnerID, int extIDType) throws ProfileStoreException
partnerID
- a partner's internal IDextIDType
- the type of external ID to retrieve. Must be one of the external ID types returned by
LookupStore.getExternalIDTypes
.
ProfileStoreException
- if an error occurred while retrieving the ID from the
profile storeLookupStore.getExternalIDTypes()
public static final java.lang.String[] getExternalIDs(java.lang.String partnerID, int extIDType) throws ProfileStoreException
partnerID
- a partner's internal IDextIDType
- the type of external ID to retrieve. Must be one of the external ID types returned by
LookupStore.getExternalIDTypes
.
ProfileStoreException
- if an error occurred while retrieving the ID from the
profile storeLookupStore.getExternalIDTypes()
public static final int getIDTypeByPartnerIDID(java.lang.String partneridid) throws ProfileStoreException
partneridid
- the PartnerIDID
ProfileStoreException
- if an error occurred while retrieving the profile ID from
the profile storepublic static final int getIDTypeByPartnerIDID(java.lang.String partneridid, java.sql.Connection conn) throws ProfileStoreException
partneridid
- the PartnerIDIDconn
- an open java.sql.Connection to the TN database
ProfileStoreException
- if an error occurred while retrieving the profile ID from
the profile storepublic static final java.util.Enumeration getDestinations(java.lang.String partnerID, java.lang.String protocol) throws ProfileStoreException
partnerID
- the internal ID for a partnerprotocol
- http, https or smtp
ProfileStoreException
Destination
public static final java.lang.String updateDeletedProfile(Profile p, java.sql.Connection conn) throws ProfileStoreException
true
in the second argument to the deleteProfile method. It updates the
profile's corporate component, and inserts the rest.
p
- the Profile to be updatedconn
- an open Connection to the TN Database. Optional. If none is supplied, the method will acquire it's
own connection. If supplied, the Connection's AutoCommit setting remains unchanged and neither commit nor
rollback are called. This allows callers to use this method in the context of a larger transaction.
ProfileStoreException
Profile
,
deleteProfile(String,boolean)
public static final void updateCorporation(Corporation corp) throws ProfileStoreException
corp
- the Corporation to be changed
ProfileStoreException
Corporation
public static final void updateContacts(java.util.Vector contacts) throws ProfileStoreException
contacts
- a Vector that contains one or more Contacts to be changed
ProfileStoreException
Contact
public static final void updateAddresses(java.util.Vector addrs) throws ProfileStoreException
addrs
- a Vector that contains one or more Addresses to be changed
ProfileStoreException
Address
public static final void updateDestinations(java.util.Vector dests) throws ProfileStoreException
addrs
- a Vector that contains one or more Destinations to be changed
ProfileStoreException
Destination
public static final void updateIDs(java.util.Vector ids) throws ProfileStoreException
addrs
- a Vector that contains one or more external IDs to be changed
ProfileStoreException
Destination
public static final void updatePartnerBinary(java.lang.String partnerID, int binaryType, byte[] bytes) throws ProfileStoreException
partnerID
- the internal ID of a partnerbinaryType
- the type of binary to be updated. Must be one of the values returned by
LookupStore.getBinaryTypes
.bytes
- the binary object, a byte array. If null, it's treated as a delete
ProfileStoreException
public static final void updateStatus(java.lang.String partnerID, java.lang.String status) throws ProfileStoreException
partnerID
- identifier of the partner to be updatedstatus
- new value for the status
ProfileStoreException
- if the status is not one of the permitted values or if a database error
occurred.public static final void updateSubstatus(java.lang.String partnerID, java.lang.String substatus) throws ProfileStoreException
partnerID
- identifier of the partner to be updatedstatus
- new value for the substatus
ProfileStoreException
- if the substatus is not one of the permitted values or if a database error
occurred.public static final void updateRemoteStatus(java.lang.String partnerID, java.lang.String status) throws ProfileStoreException
partnerID
- identifier of the partner whose server this status is onstatus
- new value for the remote status
ProfileStoreException
- if unable to update the remote statuspublic static final java.lang.String addProfile(Profile profile) throws ProfileStoreException
profile
- A Profile to be added to the store. If successful, all the components of the profile are updated
with the internal IDs that were generated for them. The IDs are used when updating or deleting the components.
ProfileStoreException
- if unable to add the profile to the storeProfile
public static final java.lang.String addProfile(Profile profile, boolean validated) throws ProfileStoreException
profile
- A Profile to be added to the store. If successful, all the components of the profile are updated
with the internal IDs that were generated for them. The IDs are used when updating or deleting the components.validated
- a boolean indicated whether the profile has already been validated. If true
, no
validations are performed before saving the profile.
ProfileStoreException
- if unable to add the profile to the storeProfile
public static final java.util.Vector addContacts(java.util.Vector contacts, java.lang.String partnerID) throws ProfileStoreException
contacts
- a Vector of Contacts. If successful, all the Contacts are updated with the internal IDs that were
generated for them. The IDs are used when updating or deleting the Contacts.partnerID
- the internal ID of the partner to be updated
contacts
.
ProfileStoreException
- if there is a database errorContact
public static final java.util.Vector addDestinations(java.util.Vector dests, java.lang.String partnerID) throws ProfileStoreException
dests
- a Vector of Destinations. If successful, all the Destinations are updated with the internal IDs that
were generated for them. The IDs are used when updating or deleting the Destinations.partnerID
- the internal ID of the partner to be updated
dests
.
ProfileStoreException
- if there is a database errorDestination
public static final java.util.Vector addIDs(java.util.Vector ids, java.lang.String partnerID) throws ProfileStoreException
ids
- a Vector of external IDs. If successful, all the IDs are updated with the internal identifiers that
were generated for them. The identifiers are used when updating or deleting the external IDs.partnerID
- the internal ID of the partner to be updated
ProfileStoreException
- if there is a database errorID
public static final java.util.Vector addAddressess(java.util.Vector addrs, java.lang.String partnerID) throws ProfileStoreException
A Profile can accomodate one Address for the Corporation and one Addresse for each Contact. One or more of them may be added at once with this method.
addrs
- a Vector of Addresses. If successful, all the Addresses are updated with the internal IDs that were
generated for them. The IDs are used when updating or deleting the Addresses.partnerID
- the internal ID of the partner to be updated
addrs
.
ProfileStoreException
- if there is a database errorAddress
public static final void addPartnerBinary(java.lang.String partnerID, int binaryType, byte[] bytes) throws ProfileStoreException
partnerID
- internal ID of a partnerbinaryType
- the type of binary to be added. Must be one of the values returned by
getBinaryTypes
.bytes
- the binary object to be added, an array of bytes
ProfileStoreException
- if there is a database errorpublic static final boolean addPartnerCertificate(java.lang.String partnerID, java.security.cert.X509Certificate cert) throws ProfileStoreException
partnerID
- internal ID of a partnercert
- an X509Certificate
ProfileStoreException
- if there is a database errorpublic static final java.lang.String getPartnerIDForCertificate(java.security.cert.X509Certificate cert) throws ProfileStoreException
cert
- an X509Certificate
ProfileStoreException
public static final com.wm.app.b2b.server.User getPartnerUser(java.lang.String internalID) throws ProfileStoreException
internalID
- the ID of the partner
ProfileStoreException
public static final void deleteProfile(java.lang.String partnerID, boolean remove) throws ProfileStoreException
partnerID
- the ID of a partner on the trading network
ProfileStoreException
- if an error occured while marking the profile as deletedpublic static final void deleteProfile(java.lang.String partnerID, boolean delete, boolean remove, java.sql.Connection conn) throws ProfileStoreException
partnerID
- the ID of the Profile for a partner on the trading networkdelete
- boolean indicating whether to delete or undelete the partner's profileremove
- boolean indicating whether to physically remove the partner's profile. If false, the profile is
only marked deleted. If true, the profile is physically removed from the database, but the BizDocs and ActivtyLog
are retained. The delete argument is ignored if remove is true. updating the profile
ProfileStoreException
public static final void deleteContact(java.lang.String contactID, java.lang.String partnerID) throws ProfileStoreException
contactID
- the internal ID for Contact to be deletedpartnerID
- the internal ID for the partner
ProfileStoreException
- if there was a database errorpublic static final void deleteAddress(java.lang.String addressID, java.lang.String partnerID) throws ProfileStoreException
addressID
- the internal ID for the address to be deletedpartnerID
- the internal ID for the partner
ProfileStoreException
- if there was a database errorpublic static final void deleteDestination(java.lang.String destID) throws ProfileStoreException
destination
- the Destination to be deletedpartnerID
- the internally generated ID for the partner
ProfileStoreException
- if there was a database errorpublic static final void deleteID(java.lang.String id) throws ProfileStoreException
ProfileStoreException
public static final java.util.Vector getExtendedFields(java.lang.String partnerID, int groupID) throws ProfileStoreException
partnerID
- the internal ID for the partnergroupID
- the group of fields to be retrieve. Use one of the GRP*
values from
com.wm.app.tn.profile.Constants
ProfileStoreException
- if there was a database errorConstants
,
ExtendedProfileField
public static final void addExtendedField(java.lang.String partnerID, ExtendedProfileField ef) throws ProfileStoreException
partnerID
- internal ID of the partner to be updatedef
- the extended field to be added
ProfileStoreException
- if there was a database errorpublic static final void updateExtendedFields(java.lang.String partnerID, java.util.Vector flds) throws ProfileStoreException
partnerID
- internal ID of the partner to be updatedflds
- a Vector of the extended fields to be changed
ProfileStoreException
- if there was a database errorpublic static final Contact getPartnerContact(java.lang.String partnerID, java.lang.String contactType) throws ProfileStoreException
partnerID
- internally assigned ID for the trading partnercontactType
- the type of contact to retrieve. The value must match the Description column in a row on the
ContactType table.
ProfileStoreException
- if there was a database errorpublic static final java.util.Vector getPartnerContacts(java.lang.String partnerID, java.lang.String contactType) throws ProfileStoreException
partnerID
- internally assigned ID for the trading partnercontactType
- the type of contact to retrieve. The value must match the Description column in a row on the
ContactType table.
ProfileStoreException
- if there was a database errorpublic static final byte[] getPartnerBinary(java.lang.String partnerID, int binaryType) throws ProfileStoreException
partnerID
- internally generated ID for a trading partnerbinaryType
- integer code for the type of binary value to retrieve. The value must match the Type column in
a row on the BinaryType table.
ProfileStoreException
- if there was a database errorpublic static final byte[] getPartnerBinary(java.lang.String partnerID, java.lang.String binaryType) throws ProfileStoreException
partnerID
- internally generated ID for a trading partnerbinaryType
- description of the type of binary value to retrieve. The value must match the Description
column in a row on the BinaryType table.
ProfileStoreException
- if there was a database errorpublic static final com.wm.app.b2b.client.Context connectToPartner(java.lang.String partnerID, java.lang.String destination, boolean xml) throws ProfileStoreException
partnerID
- internal identifier of the partner to connect todestination
- which destination from the partner's profile to use. Must be one of these values from the
RoutingConstants class:
RoutingConstants.PRIMARY_HTTPIf null, the preferred destination from the partner's profile is used. If the preferred protocol is not one of these four values, an exception is thrown.
RoutingConstants.PRIMARY_HTTP
RoutingConstants.SECONDARY_HTTPS
RoutingConstants.SECONDARY_HTTPS
xml
- indicates whether to use XML or Binary encoding. Specify true
to use XML,
false
for Binary.
ProfileStoreException
- if there was a database error or a context errorpublic static final com.wm.app.b2b.client.Context connectToPartner(java.lang.String partnerID, java.lang.String destination, java.lang.String user, java.lang.String password, boolean xml) throws ProfileStoreException
partnerID
- internal identifier of the partner to connect todestination
- which destination from the partner's profile to use. Must be one of these values from the
RoutingConstants class:
RoutingConstants.PRIMARY_HTTPIf null, the preferred destination from the partner's profile is used. If the preferred protocol is not one of these four values, an exception is thrown.
RoutingConstants.PRIMARY_HTTP
RoutingConstants.SECONDARY_HTTPS
RoutingConstants.SECONDARY_HTTPS
user
- the username to use when connecting to the partner's server. If null, will use the username from the
partner's profilepassword
- the password to use when connecting to the partner's server. If null, will use the password from
the partner's profilexml
- indicates whether to use XML or Binary encoding. Specify true
to use XML,
false
for Binary.
ProfileStoreException
- if there was a database error or a context errorpublic static final java.util.Hashtable getPollingFrequencies() throws ProfileStoreException
ProfileStoreException
- if there was a database errorpublic static final java.util.Hashtable getLogos() throws ProfileStoreException
ProfileStoreException
- if there was a database errorpublic static int getRequiredIDType() throws ProfileStoreException
ProfileStoreException
- if there was a database errorpublic static int getDefaultIDType() throws ProfileStoreException
ProfileStoreException
public static final void addProfileGroup(java.lang.String partnerId, java.lang.String profileGroupId)
partnerId
- the internal identifier of a partnerprofileGroupId
- the internal identifier of the profile group.public static final void addProfileGroup(java.sql.Connection conn, java.lang.String partnerId, java.lang.String profileGroupId)
partnerId
- the internal identifier of a partnerprofileGroupId
- the internal identifier of the profile group.public static final void addProfileGroups(java.lang.String partnerId, java.lang.String[] profileGroupIds)
partnerId
- the internal identifier of a partnerprofileGroupIds
- an array of internal identifiers of profile groupspublic static final void addProfileGroups(java.sql.Connection conn, java.lang.String partnerId, java.lang.String[] profileGroupIds)
partnerId
- the internal identifier of a partnerprofileGroupIds
- an array of internal identifiers of profile groupspublic static final void deleteProfileGroup(java.lang.String partnerId, java.lang.String profileGroupId)
partnerId
- the internal identifier of a partnerprofileGroupId
- the internal identifier of the profile grouppublic static final java.lang.String[] getProfileGroups(java.lang.String partnerId)
partnerId
- the internal identifier of the partner
public static final void updateProfileGroups(java.lang.String partnerId, java.lang.String[] profileGroupIds)
profileGroupIds
is null or empty.
partnerId
- the internal identifier of a partnerprofileGroupIds
- an array of internal identifiers of profile groupspublic static com.wm.data.IData queryProfiles(ProfileQuery query, int pageSize, int maxRowCount, int queryTimeout, int threshold, java.lang.String queryId) throws ProfileStoreException, java.io.IOException, com.wm.app.repo.RepositoryException, com.wm.app.b2b.server.ServiceException
query
- the query to executepageSize
- the number of rows per page; specify -1
to disable pagingmaxRowCount
- the maximum number of rows to return. Excess rows will be silently dropped. 0
means unlimitedqueryTimeout
- the maximum number of seconds to wait for the query to return. 0
means
unlimited.threshold
- the number of rows to be stored in the session object; this allows you to override the
tn.query.threshold system property. In a cluster, this should be disabled by setting it to -1
. If
set to -1
, the value of the tn.query.threshold system property is used.queryId
- specifies the unique identifier to store the paged query results. This is applicable only when the
results are paged. If this value is not set, an Id is automatically generated
ProfileStoreException
- if a database exception prevents getting the query results
java.io.IOException
com.wm.app.repo.RepositoryException
com.wm.app.b2b.server.ServiceException
public static java.lang.String[] getPartnerIDs(java.lang.String regexForName)
public static java.util.Vector getExtendedFieldsForPartner(java.lang.String partnerID)
public static java.util.Vector<ExtendedProfileField> getExtendedFields(java.lang.String profileID, java.lang.String displayName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |