com.sap.aii.af.service.cpa

Class NormalizationManager

java.lang.Object
  extended by com.sap.aii.af.service.cpa.NormalizationManager

public class NormalizationManager
extends Object

The NormalizationManager allows the CPA cache service users (adapter implementations) to normalize and denormalize between the XI internal Party and Service notation and external formats (e.g. DUNS, DDID, etc.) for these identifiers, as they may be used by non XI messaging formats/protocols. The Party/Service normalization/denormalization is required, since the Inbound/Outbound runtime lookup can only be performed using the XI internal notation of Parties and Services, as configured for the Bindings (sender and receiver agreements) in the Integration Directory (or PCK UI).

See Also:
Party, PartyIdentifier, Service, ServiceIdentifier

Method Summary
static void destroy()
          Destroys the singleton instance.
 PartyIdentifier getAlternativePartyIdentifier(String targetPartyAgency, String targetPartySchema, String xiParty)
          Retrieves a specific alternative Party identifier for a given Agency, Schema and XI Party identifier, if available.
 LinkedList<PartyIdentifier> getAlternativePartyIdentifiers(String xiPartyId)
          Retrieves the list of all available external alternative PartyIdentifier objects for a given XI Party identifier.
 ServiceIdentifier getAlternativeServiceIdentifier(String targetSchema, String xiParty, String xiService)
          Retrieves a specific alternative Service identifier for a given Service Schema and XI Service/Party identifiers, if available.
 LinkedList<ServiceIdentifier> getAlternativeServiceIdentifiers(String xiPartyId, String xiServiceId)
          Retrieves the list of all available external alternative ServiceIdentifier objects for given XI Service identifiers.
static NormalizationManager getInstance()
          The static getInstance() method (singleton pattern).
 Party getXIParty(String partyAgency, String partySchema, String partyIdentifier)
          Retrieves an XI Party object, based on some given alternative party agency and schema (like e.g.
 Service getXIService(String serviceSchema, String serviceIdentifier)
          This method can only be used, if the external alternative identifiers are unique in respect to the XI internal Party and Service combinations (mapping 2-level addressing information to 1-level addressing).
 Service getXIService(String xiParty, String serviceSchema, String serviceIdentifier)
          Retrieves an XI Service object, based on some given alternative service schema and service identifier for a given XI Party identifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static NormalizationManager getInstance()
The static getInstance() method (singleton pattern).


destroy

public static void destroy()
Destroys the singleton instance. It is necessary to call this method in the shutdown method, to prevent the SAP J2EE engine 6.30 from keeping the state of singletons between shutdown and startup.


getXIParty

public Party getXIParty(String partyAgency,
                        String partySchema,
                        String partyIdentifier)
                 throws CPAException
Retrieves an XI Party object, based on some given alternative party agency and schema (like e.g. DUNS) and party identifier.

Parameters:
partyAgency - The agency for which the XI Party object is to be retrieved.
partySchema - The schema for which the XI Party object is to be retrieved.
partyIdentifier - The party identifier for which the XI Party object is to be retrieved.
Returns:
The retrieved Party object or null if no matching XI Party can be found.
Throws:
CPAException

getXIService

public Service getXIService(String serviceSchema,
                            String serviceIdentifier)
                     throws CPAException
This method can only be used, if the external alternative identifiers are unique in respect to the XI internal Party and Service combinations (mapping 2-level addressing information to 1-level addressing). This is e.g. the case for DDIDs, where a Document Destination ID uniquely matches exactly one Party/Service combination. Otherwise use the getXIService method which also takes the XI Party as an argument. In this case the external alternative Party identifier first needs to be normalized to the XI internal notation, before calling into this method.

Parameters:
serviceSchema - The schema for which the XI Service object is to be retrieved. Use the predefined service schema constants as defined in ServiceIdentifier or in NormalizationManager. Currently only DDIDs are supported.
serviceIdentifier - The service identifier for which the XI Service object is to be retrieved.
Returns:
The retrieved Service object or null if no matching XI Service can be found.
Throws:
CPAException

getXIService

public Service getXIService(String xiParty,
                            String serviceSchema,
                            String serviceIdentifier)
                     throws CPAException
Retrieves an XI Service object, based on some given alternative service schema and service identifier for a given XI Party identifier. This lookup requires that the XI Party name is either knows from the message header and may have been normalized before.

Parameters:
xiParty - The XI Party identifier for which the XI Service object is to be retrieved.
serviceSchema - The schema for which the XI Service object is to be retrieved. Use the predefined service schema constants as defined in ServiceIdentifier or in NormalizationManager or use own service schemas.
serviceIdentifier - The service identifier for which the XI Service object is to be retrieved.
Returns:
The retrieved Service object or null if no matching XI Service can be found.
Throws:
CPAException

getAlternativePartyIdentifiers

public LinkedList<PartyIdentifier> getAlternativePartyIdentifiers(String xiPartyId)
                                                           throws CPAException
Retrieves the list of all available external alternative PartyIdentifier objects for a given XI Party identifier.

Parameters:
xiPartyId - The XI party identifier for which the alternative identifiers are to be retrieved.
Returns:
The list of retrieved PartyIdentifier objects or an empty LinkedList, if no matching objects can be found.
Throws:
CPAException

getAlternativeServiceIdentifiers

public LinkedList<ServiceIdentifier> getAlternativeServiceIdentifiers(String xiPartyId,
                                                                      String xiServiceId)
                                                               throws CPAException
Retrieves the list of all available external alternative ServiceIdentifier objects for given XI Service identifiers.

Parameters:
xiPartyId - The XI party identifier for which the alternative identifiers are to be retrieved.
xiServiceId - The XI service identifier for which the alternative identifiers are to be retrieved.
Returns:
The list of retrieved ServiceIdentifier objects or an empty LinkedList, if no matching objects can be found.
Throws:
CPAException

getAlternativePartyIdentifier

public PartyIdentifier getAlternativePartyIdentifier(String targetPartyAgency,
                                                     String targetPartySchema,
                                                     String xiParty)
                                              throws CPAException
Retrieves a specific alternative Party identifier for a given Agency, Schema and XI Party identifier, if available.

Parameters:
targetPartyAgency - The party agency for which the alternative identifier is to be retrieved.
targetPartySchema - The party schema for which the alternative identifier is to be retrieved.
xiParty - The XI party identifier for which the alternative identifier is to be retrieved.
Returns:
The retrieved PartyIdentifier object or null, if no matching object can be found.
Throws:
CPAException

getAlternativeServiceIdentifier

public ServiceIdentifier getAlternativeServiceIdentifier(String targetSchema,
                                                         String xiParty,
                                                         String xiService)
                                                  throws CPAException
Retrieves a specific alternative Service identifier for a given Service Schema and XI Service/Party identifiers, if available.

Parameters:
targetSchema - The service Schema for which the alternative Service identifier is to be retrieved. Use the predefined service schema constants as defined in ServiceIdentifier or in NormalizationManager or your own ones.
xiParty - The XI party identifier for which the alternative Service identifier is to be retrieved.
xiService - The XI Service identifier for which the alternative Service identifier is to be retrieved.
Returns:
The retrieved ServiceIdentifier object or null, if no matching objects can be found.
Throws:
CPAException
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] SAP_XIAF [sap.com] com.sap.aii.af.svc.facade api BC-XI


Copyright 2011 SAP AG Complete Copyright Notice