Package ch.tocco.nice2.dms.impl.uri
Class UriConversionServiceImpl
java.lang.Object
ch.tocco.nice2.dms.impl.uri.UriConversionServiceImpl
- All Implemented Interfaces:
UriConversionService
-
Constructor Summary
ConstructorDescriptionUriConversionServiceImpl
(UriConverterRegistry uriConverterRegistry, UriFactoryRegistry uriFactoryRegistry, org.slf4j.Logger log) -
Method Summary
Modifier and TypeMethodDescriptionConvert all URIs of typesourceClass
into URIs of typetargetClass
in given html stringhtml
and return the new html string.convert
(Set<Class<? extends NiceUri>> sourceClasses, Class<? extends NiceUri> targetClass, String html) Convert all URIs of typesourceClass
into URIs of typetargetClass
in given html stringhtml
and return the new html string.convertIgnoreUriConverterException
(Class<? extends NiceUri> sourceClass, Class<? extends NiceUri> targetClass, String html) Convert all URIs of typesourceClass
into URIs of typetargetClass
in given html stringhtml
and return the new html string.convertIgnoreUriConverterException
(Set<Class<? extends NiceUri>> sourceClasses, Class<? extends NiceUri> targetClass, String html) Convert all URIs of typesourceClass
into URIs of typetargetClass
in given html stringhtml
and return the new html string.
-
Constructor Details
-
UriConversionServiceImpl
public UriConversionServiceImpl(UriConverterRegistry uriConverterRegistry, UriFactoryRegistry uriFactoryRegistry, org.slf4j.Logger log)
-
-
Method Details
-
convert
public String convert(Class<? extends NiceUri> sourceClass, Class<? extends NiceUri> targetClass, String html) Description copied from interface:UriConversionService
Convert all URIs of typesourceClass
into URIs of typetargetClass
in given html stringhtml
and return the new html string.- Specified by:
convert
in interfaceUriConversionService
- Parameters:
sourceClass
- The class of the URIs to convert.targetClass
- The class to convert the found URIs into.html
- The html string that contains the URIs to convert.- Returns:
- The new html string containing the converted URIs.
- See Also:
-
convertIgnoreUriConverterException
public String convertIgnoreUriConverterException(Class<? extends NiceUri> sourceClass, Class<? extends NiceUri> targetClass, String html) Description copied from interface:UriConversionService
Convert all URIs of typesourceClass
into URIs of typetargetClass
in given html stringhtml
and return the new html string. If an URI conversion fails throwing anUriConverterException
it is skipped and the exception is logged.- Specified by:
convertIgnoreUriConverterException
in interfaceUriConversionService
- Parameters:
sourceClass
- The class of the URIs to convert.targetClass
- The class to convert the found URIs into.html
- The html string that contains the URIs to convert.- Returns:
- The new html string containing the converted URIs.
- See Also:
-
convert
public String convert(Set<Class<? extends NiceUri>> sourceClasses, Class<? extends NiceUri> targetClass, String html) Description copied from interface:UriConversionService
Convert all URIs of typesourceClass
into URIs of typetargetClass
in given html stringhtml
and return the new html string.- Specified by:
convert
in interfaceUriConversionService
- Parameters:
sourceClasses
- The classes of the URIs to convert.targetClass
- The class to convert the found URIs into.html
- The html string that contains the URIs to convert.- Returns:
- The new html string containing the converted URIs.
- See Also:
-
convertIgnoreUriConverterException
public String convertIgnoreUriConverterException(Set<Class<? extends NiceUri>> sourceClasses, Class<? extends NiceUri> targetClass, String html) Description copied from interface:UriConversionService
Convert all URIs of typesourceClass
into URIs of typetargetClass
in given html stringhtml
and return the new html string. If an URI conversion fails throwing anUriConverterException
it is skipped and the exception is logged.- Specified by:
convertIgnoreUriConverterException
in interfaceUriConversionService
- Parameters:
sourceClasses
- The classes of the URIs to convert.targetClass
- The class to convert the found URIs into.html
- The html string that contains the URIs to convert.- Returns:
- The new html string containing the converted URIs.
- See Also:
-