java.lang.Object
org.refcodes.web.XmlMediaTypeFactory
- All Implemented Interfaces:
org.refcodes.factory.MarshalFactory<String>
,org.refcodes.factory.MarshalFactory.MarshalFactoryComplement<InputStream>
,org.refcodes.factory.MarshalFactory.MarshalFactoryComposite<String,
,InputStream> org.refcodes.factory.UnmarshalFactory<String>
,org.refcodes.factory.UnmarshalFactory.UnmarshalFactoryComplement<InputStream>
,org.refcodes.factory.UnmarshalFactory.UnmarshalFactoryComposite<String,
,InputStream> MediaTypeFactory
,MediaTypesAccessor
Implements the
MediaTypeFactory
for Media-Type "application/xml" (
MediaType.APPLICATION_XML
). CAUTION: This implementation uses
getter/setter property resolution instead of field resolution as of the used
marshaling API.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.factory.MarshalFactory
org.refcodes.factory.MarshalFactory.MarshalFactoryComplement<C extends Object>, org.refcodes.factory.MarshalFactory.MarshalFactoryComposite<T extends Object,
C extends Object> Nested classes/interfaces inherited from interface org.refcodes.web.MediaTypesAccessor
MediaTypesAccessor.MediaTypesBuilder<B extends MediaTypesAccessor.MediaTypesBuilder<B>>, MediaTypesAccessor.MediaTypesMutator, MediaTypesAccessor.MediaTypesProperty
-
Field Summary
Fields inherited from interface org.refcodes.web.MediaTypeFactory
ARRAY_SELECTOR, COLLECTION_SELECTOR, TYPE_ANNOTATION, VALUE_SELECTOR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> T
fromMarshaled
(InputStream aContentInputStream, Class<T> aType) fromMarshaled
(InputStream aContentInputStream, Map<String, String> aProperties, Class<?>... aTypes) Retrieves the Media-Types from the Media-Types property.<SRC> String
toMarshaled
(SRC aContext) <SRC> String
toMarshaled
(SRC aObject, Map<String, String> aProperties) <T> T
toUnmarshaled
(String aContext, Class<T> aType) <T> T
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.refcodes.web.MediaTypeFactory
fromMarshaled, fromMarshaled, fromUnmarshaled, fromUnmarshaled
Methods inherited from interface org.refcodes.factory.UnmarshalFactory
toUnmarshaled, toUnmarshaled
-
Constructor Details
-
XmlMediaTypeFactory
public XmlMediaTypeFactory()
-
-
Method Details
-
getMediaTypes
Retrieves the Media-Types from the Media-Types property.- Specified by:
getMediaTypes
in interfaceMediaTypesAccessor
- Returns:
- The Media-Types stored by the Media-Types property.
-
toMarshaled
- Specified by:
toMarshaled
in interfaceorg.refcodes.factory.MarshalFactory<String>
- Throws:
org.refcodes.exception.MarshalException
-
toMarshaled
public <SRC> String toMarshaled(SRC aObject, Map<String, String> aProperties) throws org.refcodes.exception.MarshalException- Specified by:
toMarshaled
in interfaceorg.refcodes.factory.MarshalFactory<String>
- Throws:
org.refcodes.exception.MarshalException
-
toUnmarshaled
public <T> T toUnmarshaled(String aContext, Class<T> aType) throws org.refcodes.exception.UnmarshalException - Specified by:
toUnmarshaled
in interfaceorg.refcodes.factory.UnmarshalFactory<String>
- Throws:
org.refcodes.exception.UnmarshalException
-
toUnmarshaled
public <T> T toUnmarshaled(String aHttpBody, Class<T> aType, Map<String, String> aProperties) throws org.refcodes.exception.UnmarshalException- Specified by:
toUnmarshaled
in interfaceorg.refcodes.factory.UnmarshalFactory<String>
- Throws:
org.refcodes.exception.UnmarshalException
-
fromMarshaled
public <T> T fromMarshaled(InputStream aContentInputStream, Class<T> aType) throws org.refcodes.exception.UnmarshalException - Specified by:
fromMarshaled
in interfaceMediaTypeFactory
- Specified by:
fromMarshaled
in interfaceorg.refcodes.factory.UnmarshalFactory.UnmarshalFactoryComplement<InputStream>
- Throws:
org.refcodes.exception.UnmarshalException
-
fromMarshaled
public Object fromMarshaled(InputStream aContentInputStream, Map<String, String> aProperties, Class<?>... aTypes) throws org.refcodes.exception.UnmarshalException- Specified by:
fromMarshaled
in interfaceMediaTypeFactory
- Specified by:
fromMarshaled
in interfaceorg.refcodes.factory.UnmarshalFactory.UnmarshalFactoryComplement<InputStream>
- Throws:
org.refcodes.exception.UnmarshalException
-