Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## be.ehealth.technicalconnector.utils.impl
Class JaxbContextFactory

    java.lang.Object
      be.ehealth.technicalconnector.utils.impl.JaxbContextFactory

    public final class JaxbContextFactory

extends Object

JaxbContextFactory.

Field Summary
`static String` | `PROP_CACHE_TYPE` Deprecated. not longer used

Method Summary
`static JAXBContext` | `getJaxbContextForClass(Class<?>... classesToBeBound)`
`static JAXBContext` | `getJaxbContextForPackage(Package pack)`
`static void` | `initJaxbContext(Class<?>... classesToBeBound)` Create a JAXBContext with all the referenced classes in input.
`static void` | `initJaxbContext(Class<?> keyClass, boolean override, Class<?>... classesToBeBound)` Create a JAXBContext with all the referenced classes in classesToBeBound.
`static void` | `initJaxbContext(Package packageInstance)` Create a JAXBContext with all the classes in the provided `Package`.
`static void` | `reset()` Method to clear the cached instances.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### PROP_CACHE_TYPE

    @Deprecated
    public static final String PROP_CACHE_TYPE

  Deprecated. not longer used
  Property to change the type of cache that can be used by the `JaxbContextFactory`.

  Possible values are package and classname. The Default value is classname.

  See Also:
    Constant Field Values

Method Detail

### initJaxbContext

    public static void initJaxbContext(Package packageInstance)

  Create a JAXBContext with all the classes in the provided `Package`.

  Parameters:
    `packageInstance` -

### initJaxbContext

    public static void initJaxbContext(Class<?> keyClass,
                                       boolean override,
                                       Class<?>... classesToBeBound)

  Create a JAXBContext with all the referenced classes in classesToBeBound. Using the keyClass as context identifier. The typical use case for this method is the explicit binding of custom derived types that are members of the root keyClass: this will ensure the derived type is used vs the parent type during marshalling/unmarshalling. The override parameter can be used to recreate the context, in order to ensure the JAXBContext associated to the keyClass is refreshed with the up-to-date classes to be bound.

  Parameters:
    `keyClass` - the context cache key
    `override` - true if the context must be refreshed in the cache, false otherwise
    `classesToBeBound` - the classes to be put in the jaxb context for the given keyClass

### initJaxbContext

    public static void initJaxbContext(Class<?>... classesToBeBound)

  Create a JAXBContext with all the referenced classes in input.

  Parameters:
    `classesToBeBound` -

### getJaxbContextForPackage

    public static JAXBContext getJaxbContextForPackage(Package pack)

### getJaxbContextForClass

    public static JAXBContext getJaxbContextForClass(Class<?>... classesToBeBound)
                                              throws JAXBException

  Throws:
    `JAXBException`

### reset

    public static void reset()

  Method to clear the cached instances.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Connector Packaging TECHNICAL 3.24.0 API
Copyright © {inceptionYear}-2023 eHealth. All Rights Reserved.