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) |
java.util.Collection<Document> |
getDocuments(Item item,
Format format) |
java.util.List<Format> |
getFormats(ComposedType ct)
Generated method - Getter of the
ComposedType.formats attribute. |
java.util.List<Format> |
getFormats(SessionContext ctx,
ComposedType ct)
Generated method - Getter of the
ComposedType.formats attribute. |
java.util.Collection<Format> |
getFormatsForItem(Item item) |
static CommonsManager |
getInstance() |
JaloTranslatorConfiguration |
getJaloTranslatorConfigurationByCode(java.lang.String code)
Returns the first found JaloTranslatorConfiguration for the given code
|
java.util.Collection<JaloVelocityRenderer> |
getJaloVelocityRenderers()
Returns all available VelocityHmcRenderers
|
static java.lang.String |
getJarFileAsString(java.lang.String filename,
java.lang.String encoding)
Returns a file from this extension's JAR file as String (incl.
|
java.util.Collection<RenderersProperty> |
getRenderersPropertyList()
Returns all available RenderersPropertys
|
VelocityEngine |
getVelocityEngine(java.util.Properties p)
Deprecated.
since 6.6
|
protected static void |
registerProductSampleEnhancer()
Shows how to use configure the
CommonsManager.ItemMethodInterceptor for arbitrary item classes. |
void |
render(RendererTemplate template,
java.lang.Object context,
java.io.Writer output)
Deprecated.
since ages - as of release 4.3, please use
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,
java.util.Collection<Document> documents)
|
java.lang.String |
transform(java.io.InputStream inputXMLStream,
java.io.InputStream inputXSLStream,
boolean appendHeaders)
Applies an XML Transformation on the inputXMLSTream of Data
|
java.lang.String |
transform(java.io.InputStream inputXMLStream,
Media inputXSLMedia,
boolean appendHeaders) |
java.lang.String |
transform(java.lang.String inputXML,
java.io.InputStream inputXSLStream,
boolean appendHeaders)
Applies an XML Transformation on the inputXML data based on the specified XSL
|
java.lang.String |
transform(java.lang.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, extractNonRequiredRemoteFromItem, extractRequiredRemoteFromItem, getAllValuesSessionContext, getAttribute, getAttributeMap, getFirstItemByAttribute, getFirstItemByAttribute, getRemoteManagerClass, getSession, getSingletonManagerInstance, getTenant, getTransientObject, getTransientObjectMap, init, setAttribute, setTenant, setTransientObject, wrappublic static CommonsManager getInstance()
public static java.lang.String getJarFileAsString(java.lang.String filename,
java.lang.String encoding)
throws JaloInvalidParameterException,
JaloItemNotFoundException,
java.io.IOException,
java.io.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 filejava.io.IOException - If an error occurs while reading the filejava.io.UnsupportedEncodingException - If the specified encoding is not supported@Deprecated
public VelocityEngine getVelocityEngine(java.util.Properties p)
throws java.lang.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 enginejava.lang.Exceptionpublic java.util.List<Format> getFormats(ComposedType ct)
GeneratedCommonsManagerComposedType.formats attribute.getFormats in class GeneratedCommonsManagerct - the ComposedTypeFormats.public java.util.List<Format> getFormats(SessionContext ctx, ComposedType ct)
GeneratedCommonsManagerComposedType.formats attribute.getFormats in class GeneratedCommonsManagerctx - the SessionContextct - the ComposedTypeFormats.public java.util.Collection<Format> getFormatsForItem(Item item)
item - the itempublic java.util.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, java.util.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 java.lang.String transform(java.lang.String inputXML,
java.io.InputStream inputXSLStream,
boolean appendHeaders)
inputXML - inputXSLStream - appendHeaders - public java.lang.String transform(java.io.InputStream inputXMLStream,
java.io.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 java.lang.String transform(java.lang.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 java.lang.String transform(java.io.InputStream inputXMLStream,
Media inputXSLMedia,
boolean appendHeaders)
protected static void registerProductSampleEnhancer()
CommonsManager.ItemMethodInterceptor for arbitrary item classes.public java.util.Collection<JaloVelocityRenderer> getJaloVelocityRenderers()
public java.util.Collection<RenderersProperty> getRenderersPropertyList()
public JaloTranslatorConfiguration getJaloTranslatorConfigurationByCode(java.lang.String code)
public TranslatorConfiguration getDefaultTranslatorConfiguration()
@Deprecated public void render(RendererTemplate template, java.lang.Object context, java.io.Writer output)
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 © 2018 SAP SE. All Rights Reserved.