Package org.ametys.odf.xslt
Class CDMFrXSLTHelper
- java.lang.Object
 - 
- org.ametys.odf.xslt.CDMFrXSLTHelper
 
 
- 
- All Implemented Interfaces:
 Contextualizable,Serviceable
public class CDMFrXSLTHelper extends Object implements Serviceable, Contextualizable
Helper component to be used from XSL stylesheets for CDM-fr export 
- 
- 
Field Summary
Fields Modifier and Type Field Description private static AmetysObjectResolver_ametysObjectResolverprivate static Context_context 
- 
Constructor Summary
Constructors Constructor Description CDMFrXSLTHelper() 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static String_resolve(String resolvedUri)private static String_resolveResource(String uri, boolean download, String prefix, String suffix)voidcontextualize(Context context)static Stringresolve(String type, String uri)Resolve the URI of a resourcestatic Stringresolve(String type, String uri, boolean download)Resolve the URI of a resourceStringresolveBoundedImage(String type, String uri, int maxHeight, int maxWidth)Resolve the URI of a resource imageStringresolveBoundedImage(String type, String uri, int maxHeight, int maxWidth, boolean download)Resolve the asbsolute URI of a resource imagestatic StringresolveImage(String type, String uri, int height, int width)Resolve the URI of a resource imagestatic StringresolveImage(String type, String uri, int height, int width, boolean download)Resolve the absolute URI of a resource imagevoidservice(ServiceManager smanager) 
 - 
 
- 
- 
Field Detail
- 
_ametysObjectResolver
private static AmetysObjectResolver _ametysObjectResolver
 
 - 
 
- 
Constructor Detail
- 
CDMFrXSLTHelper
public CDMFrXSLTHelper()
 
 - 
 
- 
Method Detail
- 
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
 contextualizein interfaceContextualizable- Throws:
 ContextException
 
- 
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
 servicein interfaceServiceable- Throws:
 ServiceException
 
- 
resolve
public static String resolve(String type, String uri)
Resolve the URI of a resource- Parameters:
 type- Type name (defined by the extension to use)uri- URI depending on the type- Returns:
 - The uri resolved, the empty string if the uri could not be resolved, or the uri itself if there is no resolver adapted
 
 
- 
resolve
public static String resolve(String type, String uri, boolean download)
Resolve the URI of a resource- Parameters:
 type- Type name (defined by the extension to use)uri- URI depending on the typedownload- Is this uri for download purposes.- Returns:
 - The uri resolved, the empty string if the uri could not be resolved, or the uri itself if there is no resolver adapted
 
 
- 
resolveImage
public static String resolveImage(String type, String uri, int height, int width)
Resolve the URI of a resource image- Parameters:
 type- Type name (defined by the extension to use)uri- URI depending on the typeheight- the heightwidth- the width- Returns:
 - The uri resolved, the empty string if the uri could not be resolved, or the uri itself if there is no resolver adapted
 
 
- 
resolveImage
public static String resolveImage(String type, String uri, int height, int width, boolean download)
Resolve the absolute URI of a resource image- Parameters:
 type- Type name (defined by the extension to use)uri- URI depending on the typeheight- the heightwidth- the widthdownload- Is this uri for download purposes.- Returns:
 - The uri resolved, the empty string if the uri could not be resolved, or the uri itself if there is no resolver adapted
 
 
- 
resolveBoundedImage
public String resolveBoundedImage(String type, String uri, int maxHeight, int maxWidth)
Resolve the URI of a resource image- Parameters:
 type- Type name (defined by the extension to use)uri- URI depending on the typemaxHeight- the max heightmaxWidth- the max width- Returns:
 - The uri resolved, the empty string if the uri could not be resolved, or the uri itself if there is no resolver adapted
 
 
- 
resolveBoundedImage
public String resolveBoundedImage(String type, String uri, int maxHeight, int maxWidth, boolean download)
Resolve the asbsolute URI of a resource image- Parameters:
 type- Type name (defined by the extension to use)uri- URI depending on the typemaxHeight- the max heightmaxWidth- the max widthdownload- Is this uri for download purposes.- Returns:
 - The uri resolved, the empty string if the uri could not be resolved, or the uri itself if there is no resolver adapted
 
 
- 
_resolveResource
private static String _resolveResource(String uri, boolean download, String prefix, String suffix)
 
 - 
 
 -