Package ch.tocco.nice2.dms.api.uri
Interface UriConversionService
- All Known Implementing Classes:
UriConversionServiceImpl
public interface UriConversionService
A service for converting
NiceUris
into other types of NiceUris.-
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.
-
Method Details
-
convert
String convert(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.- 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.
- Throws:
UriConverterException
- in case of an error.- See Also:
-
convert
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.- 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.
- Throws:
UriConverterException
- in case of an error.- See Also:
-
convertIgnoreUriConverterException
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. If an URI conversion fails throwing anUriConverterException
it is skipped and the exception is logged.- 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
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. If an URI conversion fails throwing anUriConverterException
it is skipped and the exception is logged.- 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:
-