protected String getSerializerClass ( String resource , String urlLastElement ) { String serializerClass = null ; String extension = this . utils . getExtension ( urlLastElement ) ; if ( extension != null ) { SerializerFinder finder = new SerializerFinder ( config , extension ) ; serializerClass = finder . findResource ( resource ) ; } return serializerClass ; }
Gets serializer class for a resource . If the last part of the URL has an extension then could be a Serializer class to render the result in a specific way . If the extension is . xml it hopes that a ResourceNameXmlSerializer exists to render the resource as Xml . The extension can be anything .