Package org.ametys.odf.export.indesign
Class IndesignTransformationHelper
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.odf.export.indesign.IndesignTransformationHelper
-
- All Implemented Interfaces:
LogEnabled
,Component
,Serviceable
public class IndesignTransformationHelper extends AbstractLogEnabled implements Component, Serviceable
Helper storing mappings of xsl stylesheets (used in InDesign transformations) names with their labels.
-
-
Field Summary
Fields Modifier and Type Field Description private static String
__GLOBAL_XSLT_DIRECTORY_URI
The path of the catalog transformation stylesheetsprivate static String
__XSLT_DIRECTORY_URI
The path of the single program transformation stylesheetsprivate SourceResolver
_srcResolver
static String
ROLE
The Indesign Transformation Helper's role
-
Constructor Summary
Constructors Constructor Description IndesignTransformationHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private I18nizableText
_parseI18nizableText(Configuration textConfig, String defaultCatalogue)
private I18nizableText
_parseLabel(String rootURI, String value)
private Map<String,I18nizableText>
_parseXSLTFiles(String rootURI)
Get the xslt data from the given directoryMap<String,I18nizableText>
getIndesignGlobalXslt()
Get available XSLT files for ODF catalog InDesign exportMap<String,I18nizableText>
getIndesignXslt()
Get available XSLT files for single program InDesign exportvoid
service(ServiceManager manager)
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
__XSLT_DIRECTORY_URI
private static final String __XSLT_DIRECTORY_URI
The path of the single program transformation stylesheets- See Also:
- Constant Field Values
-
__GLOBAL_XSLT_DIRECTORY_URI
private static final String __GLOBAL_XSLT_DIRECTORY_URI
The path of the catalog transformation stylesheets- See Also:
- Constant Field Values
-
_srcResolver
private SourceResolver _srcResolver
-
-
Constructor Detail
-
IndesignTransformationHelper
public IndesignTransformationHelper()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getIndesignXslt
public Map<String,I18nizableText> getIndesignXslt()
Get available XSLT files for single program InDesign export- Returns:
- the mapping of xsl names with their labels
-
getIndesignGlobalXslt
public Map<String,I18nizableText> getIndesignGlobalXslt()
Get available XSLT files for ODF catalog InDesign export- Returns:
- the mapping of xsl names with their labels
-
_parseXSLTFiles
private Map<String,I18nizableText> _parseXSLTFiles(String rootURI) throws IOException
Get the xslt data from the given directory- Parameters:
rootURI
- The directory where to find xsl files- Returns:
- the data under the form of a Map
- Throws:
IOException
- if error occurred while parsing files
-
_parseLabel
private I18nizableText _parseLabel(String rootURI, String value)
-
_parseI18nizableText
private I18nizableText _parseI18nizableText(Configuration textConfig, String defaultCatalogue) throws ConfigurationException
- Throws:
ConfigurationException
-
-