Retrieving the output format xslt stylesheet – Google Search Appliance Administrative API Developers Guide: Java User Manual
Page 33
Google Search Appliance: Administrative API Developer’s Guide: Java
33
Use the following properties to access the XSLT template information.
Note: For the update action, the restoreDefaultFormat content is mutually exclusive from the
styleSheetContent. For each update action, you should either restore the output format XSLT
stylesheet back to the original default values, set the XSLT stylesheet to a custom format, or neither, but
not both.
Retrieving the Output Format XSLT Stylesheet
Retrieve the output format stylesheet information from a search appliance as follows:
Map
// Initialize the query map
queryMap.put("language", "en");
GsaEntry myEntry = myClient.queryEntry("outputFormat", "default_frontend",
queryMap);
System.out.println("Language: " + myEntry.getGsaContent("language"));
System.out.println("Default Language: " +
myEntry.getGsaContent("isDefaultLanguage"));
System.out.println("Is the Style Sheet Edited: " +
myEntry.getGsaContent("isStyleSheetEdited"));
System.out.println("XSLT Stylesheet Content: " +
myEntry.getGsaContent("styleSheetContent"));
Property
Description
isDefaultLanguage
Set to 1 if the designated language is the default language for the
specified front end, set to 0 if not.
isStyleSheetEdited
Set to 0 if the style sheet is the default stylesheet that has not been
previously edited. Set to 1 if the style sheet has been edited.
language
When retrieving, the language is determined by the language that is
specified by the query parameter. When updating, the language is
passed as an entry property to specify the language of the output
stylesheet.
restoreDefaultFormat
Set to 1 to restore custom-edited XSLT code back to the default values.
A 0 value has no effect.
styleSheetContent
The output format XSLT code content.