com.sapportals.portal.prt.service.soap.mapping
Class SOAPRegistry

java.lang.Object
  |
  +--com.sapportals.portal.prt.service.soap.mapping.SOAPRegistry

public class SOAPRegistry
extends java.lang.Object

Class in charge of maintaining all the mapping and basic information on Available Portal Services
- Mapping of basic Java Type and SOAP/XMl Qualified Name. - List of specilaized rgistry; containing nformation of Mapping for specific Portal Service - List of Header Porcessor - List of method Authorized Processor This registry is initialized by the InitMapping class and soapTypes.xml


Method Summary
 void addMappings(java.lang.String namespace, java.lang.Class javaType, QName name, SOAPDeserializer deserializer, SOAPSerializer serializer)
          Add entry for the mapping between java type and XMML/SOAP Qualified name
 void addMethodsAuthorizedProcessor(java.lang.String name, IMethodsAuthorizedProcessor methods)
          Add in the list a IIMethodsAuthorizedProcessor instance
 void addSpecializedRegistry(java.lang.String name, ISpecializedRegistry registry)
          Add registry entry corresponding to a Portal Service
static void destroy()
          Destroy the instance
 java.util.Hashtable getAllSpecializedRegistry()
          Get the list of the specialized registry contains in the central registry
 QName getArrayQName()
          Get the QName Array for SOAP Array Type
 java.lang.String getDefaultNamespace(java.lang.Class type)
          Get Default namespace for the Java type
 SOAPDeserializer getDeserializer(QName qname, java.lang.String targetNamespace)
          Get Deserialzater for QName
 QNameURI getElementType(java.lang.Class type)
          Get QNameURI for Class type
 QName getElementType(java.lang.Class type, java.lang.String targetNamespace)
          Get QName for Class type
 ISOAPHeaderProcessor getHeaderProcessor(java.lang.String action)
          Holds the basic function link to the SOAPHeader
static SOAPRegistry getInstance()
          Get the current instance of the SOAPRegistry
 java.lang.Class getJavaType(QName qname, java.lang.String targetNamespace)
          Get Java Type for QName
 java.util.Hashtable getListJavaTypes()
          Get list of Java types
 java.util.Hashtable getListQName()
          Get list of Qname
 java.util.Hashtable getListSerializers()
          Get List of Serializers
 java.util.Hashtable getListSpecializedRegistry()
          Get lsit of ISpecializedRegistry
 java.util.Hashtable getListUnSerializers()
          Get list of unserializers
 IMethodsAuthorizedProcessor getMethodsAuthorizedProcessor(java.lang.String name)
          get an instance of IMethodsAuthorizedProcessor
 SOAPSerializer getSerializer(java.lang.Class type, java.lang.String encodingStyleURI)
          Get Serializer for Java Type
 ISpecializedRegistry getSpecializedRegistry(java.lang.String name)
          Get an intance of specific registry for a Portal Service
 boolean isPrimitive(java.lang.Class aClass)
          Test if the class is java lang primitive
 ISpecializedRegistry removeSpecializedRegistry(java.lang.String name)
          Remove a specialized registry from the list
 void setArrayQName(QName name)
          Set the QName of SOAP Array Type
 void setArraySerializer(SOAPSerializer ser)
          Set the Serializer for SOAP Array Type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static SOAPRegistry getInstance()
Get the current instance of the SOAPRegistry
Returns:
the instance

destroy

public static void destroy()
Destroy the instance

getDeserializer

public SOAPDeserializer getDeserializer(QName qname,
                                        java.lang.String targetNamespace)
Get Deserialzater for QName
Parameters:
qname - Qname to find serializer for
targetNamespace - namespace of the QName (optional since EP60 SP2)
Returns:
the corresponding Serializer

getSerializer

public SOAPSerializer getSerializer(java.lang.Class type,
                                    java.lang.String encodingStyleURI)
Get Serializer for Java Type
Parameters:
type - Type to find deserializer for
targetNamespace - namespace attach to the Class Type and Current context
Returns:
the corresponding serializer

getElementType

public QName getElementType(java.lang.Class type,
                            java.lang.String targetNamespace)
Get QName for Class type
Parameters:
type - the class to find
targetNamespace - namespace attach to the Class Type and Current context
Returns:
the corresponding QName

getElementType

public QNameURI getElementType(java.lang.Class type)
Get QNameURI for Class type
Parameters:
type - the class to find
Returns:
the corresponding QNameURI

getDefaultNamespace

public java.lang.String getDefaultNamespace(java.lang.Class type)
Get Default namespace for the Java type
Parameters:
type - the Java type to find
Returns:
the namespace

getJavaType

public java.lang.Class getJavaType(QName qname,
                                   java.lang.String targetNamespace)
Get Java Type for QName
Parameters:
qname - the QName to find
targetNamespace - (optinal since EP60 SP2)
Returns:
the corresponding java type

isPrimitive

public boolean isPrimitive(java.lang.Class aClass)
Test if the class is java lang primitive
Parameters:
aClass - the class t determined
Returns:
tru if yes, false else.

addMappings

public void addMappings(java.lang.String namespace,
                        java.lang.Class javaType,
                        QName name,
                        SOAPDeserializer deserializer,
                        SOAPSerializer serializer)
Add entry for the mapping between java type and XMML/SOAP Qualified name
Parameters:
namespace - namespace of the of the mapping
javaType - the java type to map
name - the Qualidied name of the parameter
deserializer - the object corresponding to the adapted deserilaizer
serializer - the object corresponding to the adapted serilaizer

addSpecializedRegistry

public void addSpecializedRegistry(java.lang.String name,
                                   ISpecializedRegistry registry)
Add registry entry corresponding to a Portal Service
Parameters:
name - the name of the service
registry - the correctly instanciated specific registry

getSpecializedRegistry

public ISpecializedRegistry getSpecializedRegistry(java.lang.String name)
Get an intance of specific registry for a Portal Service
Parameters:
name - the name of the service to find
Returns:
the specific registry

getAllSpecializedRegistry

public java.util.Hashtable getAllSpecializedRegistry()
Get the list of the specialized registry contains in the central registry
Returns:
the list of registries

removeSpecializedRegistry

public ISpecializedRegistry removeSpecializedRegistry(java.lang.String name)
Remove a specialized registry from the list
Parameters:
name - the name of the portal service attached to this registry
Returns:
the removed registry

addMethodsAuthorizedProcessor

public void addMethodsAuthorizedProcessor(java.lang.String name,
                                          IMethodsAuthorizedProcessor methods)
Add in the list a IIMethodsAuthorizedProcessor instance
Parameters:
name - name of the portal service
methods - the processor

getMethodsAuthorizedProcessor

public IMethodsAuthorizedProcessor getMethodsAuthorizedProcessor(java.lang.String name)
get an instance of IMethodsAuthorizedProcessor
Parameters:
name - the name of the portal service looking
Returns:
the corresponding IMethodsAuthorizedProcessor

setArrayQName

public void setArrayQName(QName name)
Set the QName of SOAP Array Type
Parameters:
name - the corresponding Qname

getArrayQName

public QName getArrayQName()
Get the QName Array for SOAP Array Type
Returns:
the corresponding QName

setArraySerializer

public void setArraySerializer(SOAPSerializer ser)
Set the Serializer for SOAP Array Type
Parameters:
ser - the corresponding serializer

getHeaderProcessor

public ISOAPHeaderProcessor getHeaderProcessor(java.lang.String action)
Holds the basic function link to the SOAPHeader
Parameters:
action - action attahc to SOAP Header
Returns:
the processor of SOAP Headers

getListSerializers

public java.util.Hashtable getListSerializers()
Get List of Serializers
Returns:
the list

getListUnSerializers

public java.util.Hashtable getListUnSerializers()
Get list of unserializers
Returns:
the list

getListJavaTypes

public java.util.Hashtable getListJavaTypes()
Get list of Java types
Returns:
the list

getListQName

public java.util.Hashtable getListQName()
Get list of Qname
Returns:
the list

getListSpecializedRegistry

public java.util.Hashtable getListSpecializedRegistry()
Get lsit of ISpecializedRegistry
Returns:
the list