Class ApplicationYamlFactory

    • Constructor Detail

      • ApplicationYamlFactory

        public ApplicationYamlFactory()
        Instantiates a new application YAML factory.
    • Method Detail

      • getMediaType

        public MediaType getMediaType()
        Retrieves the Media-Type from the Media-Type property.
        Specified by:
        getMediaType in interface MediaTypeAccessor
        Returns:
        The Media-Type stored by the Media-Type property.
      • toMarshaled

        public java.lang.String toMarshaled​(java.lang.Object aObject)
                                     throws org.refcodes.exception.MarshalException
        This method creates / retrieves an instance of the given type with the given identifier (name) constructed as defined in one to many configuration files. How the instance is configured, created or retrieved is up to the nature (implementation) of the according factory.
        Specified by:
        toMarshaled in interface Marshalable<java.lang.String>
        Parameters:
        aObject - The context which may influence the object being created by this factory.
        Returns:
        The instance being fabricated by this factory.
        Throws:
        org.refcodes.exception.MarshalException - Thrown when marshaling / serializing an object fails.
      • toUnmarshaled

        public <T> T toUnmarshaled​(java.lang.String aHttpBody,
                                   java.lang.Class<T> aType)
                            throws org.refcodes.exception.UnmarshalException
        This method creates / retrieves an instance of the given type from the provided instance.
        Specified by:
        toUnmarshaled in interface Unmarshalable<java.lang.String>
        Type Parameters:
        T - The type which is to be fabricated by the factory method.
        Parameters:
        aHttpBody - The context which may influence the object being created by this factory.
        aType - The type identifying the instance to be created / retrieved.
        Returns:
        An instance of the required type for the given type and context.
        Throws:
        org.refcodes.exception.UnmarshalException - Thrown when unmarshaling / deserializing an object fails.