forked from unshare/hybris-integration-intellij-idea-plugin
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…, `class`
- Loading branch information
Showing
3 changed files
with
48 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA. | ||
* This file is part of "SAP Commerce Developers Toolset" plugin for IntelliJ IDEA. | ||
* Copyright (C) 2019-2024 EPAM Systems <[email protected]> and contributors | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
|
@@ -73,6 +73,46 @@ class ImpexDocumentationTarget(val element: PsiElement, private val originalElem | |
|
||
ImpexTypes.ATTRIBUTE_NAME -> { | ||
when (element.text) { | ||
AttributeModifier.EXPR.modifierName -> impexDoc { | ||
typeModifier(element.text) | ||
subHeader("VelocityTranslator") | ||
externalLink( | ||
"Special Value Translators", | ||
"https://help.sap.com/docs/SAP_COMMERCE_CLOUD_PUBLIC_CLOUD/aa417173fe4a4ba5a473c93eb730a417/4ce7b82cbc574456ac197393f88e5cc6.html?locale=en-US#special-value-translators" | ||
) | ||
texts( | ||
"The VelocityTranslator is used only for export. It can be used for exporting a value for an item using a velocity expression.", | ||
"With that, you can export a constant value or can aggregate different attributes.", | ||
"Using the following header at an export of an order item, the code of the order is exported as well as the id and name of the user owning the order and its payment address, street name, and country.", | ||
) | ||
example(""" | ||
INSERT_UPDATE Order; code[unique=true]; \ | ||
@template1[translator=de.hybris.jakarta.ext.impex.jalo.translators.VelocityTranslator, expr='${"$"}item.user.getUID()']; \ | ||
@template2[translator=de.hybris.jakarta.ext.impex.jalo.translators.VelocityTranslator, expr='${"$"}item.user.name']; | ||
""".trimIndent()) | ||
}.build() | ||
|
||
AttributeModifier.CLASSIFICATION_CLASS.modifierName, | ||
AttributeModifier.SYSTEM.modifierName, | ||
AttributeModifier.VERSION.modifierName -> impexDoc { | ||
typeModifier(element.text) | ||
subHeader("ClassificationAttributeTranslator") | ||
externalLink( | ||
"Special Value Translators", | ||
"https://help.sap.com/docs/SAP_COMMERCE_CLOUD_PUBLIC_CLOUD/aa417173fe4a4ba5a473c93eb730a417/4ce7b82cbc574456ac197393f88e5cc6.html?locale=en-US#special-value-translators" | ||
) | ||
texts( | ||
"Instead of importing each product feature one by one you can assign all features of a product with one value line using this translator.", | ||
"Therefore you have to declare a special attribute for each feature to import.", | ||
"Assuming you want to set a value for feature type at your product a suitable header could be as follows:", | ||
) | ||
example(""" | ||
UPDATE Product; code[unique=true]; @type[system='SampleClassification',version='1.0',translator=de.hybris.platform.catalog.jalo.classification.impex.ClassificationAttributeTranslator;] | ||
""".trimIndent()) | ||
texts("In this example, the modifiers system and version, which are both mandatory, specify the classification system version of the product feature.") | ||
texts("One more optional modifier class can be used with this translator.") | ||
}.build() | ||
|
||
TypeModifier.DISABLE_UNIQUE_ATTRIBUTES_VALIDATOR_FOR_TYPES.modifierName -> impexDoc { | ||
typeModifier(element.text) | ||
externalLink( | ||
|