Class ImportCockpitUtils
- java.lang.Object
-
- de.hybris.platform.importcockpit.util.ImportCockpitUtils
-
public class ImportCockpitUtils extends java.lang.ObjectProvides helper methods for the Import cockpit, especially for the mapping.
-
-
Constructor Summary
Constructors Constructor Description ImportCockpitUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CatalogVersionModelgetCatalogVersion(java.lang.String id, java.lang.String version)Retrieves the catalog version with the specifies catalog id and version string.static PropertyDescriptorgetPropertyDescriptor(java.lang.String propertyQualifier)static booleanisMappingLineForPartOfAttribute(MappingLineModel mappingLineModel)Checks if the specified mapping mappingLineModel refers to a "part of" attribute.static <T> TreadSecurelyFromXML(java.io.Reader reader, java.lang.Class[] rootTypes)Method allows to prevent XXE (XML External Entity Injection() attacks via xml.
-
-
-
Method Detail
-
getCatalogVersion
public static CatalogVersionModel getCatalogVersion(java.lang.String id, java.lang.String version)
Retrieves the catalog version with the specifies catalog id and version string.- Parameters:
id- catalog idversion-- Returns:
- the catalog version as a CatalogVersion object
-
isMappingLineForPartOfAttribute
public static boolean isMappingLineForPartOfAttribute(MappingLineModel mappingLineModel)
Checks if the specified mapping mappingLineModel refers to a "part of" attribute. "Part of" attribute objects can exist only within their containing parent object, as a "part" of their parent object. So, such attribute values are not simply "referenced" but "contained". For example, the user's address is a "part of" attribute of the User object. When the User object is deleted, the address is deleted as well.- Parameters:
mappingLineModel-- Returns:
- true if the mapping mappingLineModel refers to a "part of" attribute
-
getPropertyDescriptor
public static PropertyDescriptor getPropertyDescriptor(java.lang.String propertyQualifier)
- Parameters:
propertyQualifier- as String- Returns:
- PropertyDescriptor, use for generation of mapping mappingLineModel
-
readSecurelyFromXML
public static <T> T readSecurelyFromXML(java.io.Reader reader, java.lang.Class[] rootTypes) throws javax.xml.bind.JAXBException, javax.xml.stream.XMLStreamExceptionMethod allows to prevent XXE (XML External Entity Injection() attacks via xml.- Type Parameters:
T- required type of result- Parameters:
reader- original non-secured readerrootTypes- expected types- Returns:
- the entity requested
- Throws:
javax.xml.bind.JAXBExceptionjavax.xml.stream.XMLStreamException
-
-