public class CommonsManager extends GeneratedCommonsManager
| Modifier and Type | Class and Description |
|---|---|
static class |
CommonsManager.ItemMethodInterceptor |
Extension.RestrictedLanguagesProvider, Extension.RightsProviderManager.GenericManagerSingletonCreator, Manager.ManagerSingletonCreatorDEFAULT_INITIAL_ATTRIBUTES, FORMAT2COMTYPREL_MARKMODIFIED, FORMAT2COMTYPREL_SRC_ORDERED, FORMAT2COMTYPREL_TGT_ORDERED, ITEMDOCRRELATIONALLDOCUMENTSHANDLER| Constructor and Description |
|---|
CommonsManager() |
| Modifier and Type | Method and Description |
|---|---|
TranslatorConfiguration |
getDefaultTranslatorConfiguration()
Returns a TranslatorConfiguration that is prepared for common InDesign translations
(or null, if the TranslatorConfiguration could not be created) |
Collection<Document> |
getDocuments(Item item,
Format format) |
List<Format> |
getFormats(ComposedType ct)
Generated method - Getter of the
ComposedType.formats attribute. |
List<Format> |
getFormats(SessionContext ctx,
ComposedType ct)
Generated method - Getter of the
ComposedType.formats attribute. |
Collection<Format> |
getFormatsForItem(Item item) |
static CommonsManager |
getInstance() |
JaloTranslatorConfiguration |
getJaloTranslatorConfigurationByCode(String code)
Returns the first found JaloTranslatorConfiguration for the given code
|
Collection<JaloVelocityRenderer> |
getJaloVelocityRenderers()
Returns all available VelocityHmcRenderers
|
static String |
getJarFileAsString(String filename,
String encoding)
Returns a file from this extension's JAR file as String (incl.
|
Collection<RenderersProperty> |
getRenderersPropertyList()
Returns all available RenderersPropertys
|
VelocityEngine |
getVelocityEngine(Properties p)
Only used in
VelocityFormatter due the creation of the VelocityEngine takes much time. |
protected static void |
registerProductSampleEnhancer()
Shows how to use configure the
CommonsManager.ItemMethodInterceptor for arbitrary item classes. |
void |
render(RendererTemplate template,
Object context,
Writer output)
Deprecated.
as of release 4.3, please use
de.hybris.platform.commons.renderer.RendererService#render(de.hybris.platform.commons.model.renderer.RendererTemplateModel, Object, Writer)
Renders a template using the context PLA-5986 |
void |
setDocuments(Item item,
Format format,
Collection<Document> documents)
|
String |
transform(InputStream inputXMLStream,
InputStream inputXSLStream,
boolean appendHeaders)
Applies an XML Transformation on the inputXMLSTream of Data
|
String |
transform(InputStream inputXMLStream,
Media inputXSLMedia,
boolean appendHeaders) |
String |
transform(String inputXML,
InputStream inputXSLStream,
boolean appendHeaders)
Applies an XML Transformation on the inputXML data based on the specified XSL
|
String |
transform(String inputXML,
Media inputXSLMedia,
boolean appendHeaders)
Applies an XML Transformation on the inputXMLSTream of Data
|
addToAllDocuments, addToAllDocuments, addToFormats, addToFormats, createCustomOrder2XML, createCustomOrder2XML, createDocument, createDocument, createFOPFormatter, createFOPFormatter, createFormat, createFormat, createJaloTranslatorConfiguration, createJaloTranslatorConfiguration, createJaloVelocityRenderer, createJaloVelocityRenderer, createParserProperty, createParserProperty, createRenderersProperty, createRenderersProperty, createRendererTemplate, createRendererTemplate, createVelocityFormatter, createVelocityFormatter, createXMLTransformFormatter, createXMLTransformFormatter, getAllDocuments, getAllDocuments, getDefaultAttributeModes, getFormatsCount, getFormatsCount, getName, removeFromAllDocuments, removeFromAllDocuments, removeFromFormats, removeFromFormats, setAllDocuments, setAllDocuments, setFormats, setFormatscheckBeforeItemRemoval, createEssentialData, createProjectData, createSampleData, getCreatorDescription, getCreatorName, getCreatorParameterDefault, getCreatorParameterNames, getCreatorParameterPossibleValues, getRemote, isCreatorDisabled, notifyInitializationEnd, notifyInitializationStart, notifyItemRemoval, onFirstSessionCreation, writeReplaceafterItemCreation, beforeItemCreation, destroy, getAllValuesSessionContext, getAttribute, getAttributeMap, getFirstItemByAttribute, getFirstItemByAttribute, getRemoteManagerClass, getSession, getSingletonManagerInstance, getTenant, getTransientObject, getTransientObjectMap, init, setAttribute, setTenant, setTransientObject, unwrap, unwrap, wrappublic static CommonsManager getInstance()
public static String getJarFileAsString(String filename, String encoding) throws JaloInvalidParameterException, JaloItemNotFoundException, IOException, UnsupportedEncodingException
filename - The name of the file in the JAR fileencoding - The encoding that the resulting String shall be encoded withJaloInvalidParameterException - If the filename is not specifiedJaloItemNotFoundException - If the file could not be found in the JAR fileIOException - If an error occurs while reading the fileUnsupportedEncodingException - If the specified encoding is not supportedpublic VelocityEngine getVelocityEngine(Properties p) throws Exception
VelocityFormatter due the creation of the VelocityEngine takes much time. So the engine will
be hold by the CommonsManager and is only created once. Remember to set the correct properties, they will be given
over to the VelocityEngine.init method.p - the init properties or the engineExceptionpublic List<Format> getFormats(ComposedType ct)
GeneratedCommonsManagerComposedType.formats attribute.getFormats in class GeneratedCommonsManagerct - the ComposedTypeFormats.public List<Format> getFormats(SessionContext ctx, ComposedType ct)
GeneratedCommonsManagerComposedType.formats attribute.getFormats in class GeneratedCommonsManagerctx - the SessionContextct - the ComposedTypeFormats.public Collection<Format> getFormatsForItem(Item item)
item - the itempublic Collection<Document> getDocuments(Item item, Format format)
item - the itemformat - the formatDocument for the given item and the given formatpublic void setDocuments(Item item, Format format, Collection<Document> documents) throws ConsistencyCheckException
Format all Documents which are in the Collection documents.
A JaloInvalidParameterException is thrown if a document of the Collection belongs not to the item.item - the item which can have documentsformat - the Format which creates documentsdocuments - a Collection of DocumentsConsistencyCheckExceptionpublic String transform(String inputXML, InputStream inputXSLStream, boolean appendHeaders)
inputXML - inputXSLStream - appendHeaders - public String transform(InputStream inputXMLStream, InputStream inputXSLStream, boolean appendHeaders)
inputXMLStream - specifies the inputXMLStream to be used.inputXSLStream - specifies the XSL DataStream to be used for XML transformationappendHeaders - specifies whether to make the convert data to well formed HTML.public String transform(String inputXML, Media inputXSLMedia, boolean appendHeaders)
inputXML - specifies the inputXMLStream to be used.inputXSLMedia - specifies the XSL to be used for XML transformationappendHeaders - specifies whether to make the convert data to well formed HTML.public String transform(InputStream inputXMLStream, Media inputXSLMedia, boolean appendHeaders)
protected static void registerProductSampleEnhancer()
CommonsManager.ItemMethodInterceptor for arbitrary item classes.public Collection<JaloVelocityRenderer> getJaloVelocityRenderers()
public Collection<RenderersProperty> getRenderersPropertyList()
public JaloTranslatorConfiguration getJaloTranslatorConfigurationByCode(String code)
public TranslatorConfiguration getDefaultTranslatorConfiguration()
@Deprecated public void render(RendererTemplate template, Object context, Writer output)
de.hybris.platform.commons.renderer.RendererService#render(de.hybris.platform.commons.model.renderer.RendererTemplateModel, Object, Writer)
Renders a template using the context PLA-5986template - contains the template contentcontext - contains the content of value, which will replace the macro in the templateoutput - saves the resultCopyright © 2017 SAP SE. All Rights Reserved.