Package de.hybris.platform.ldap
Class LDIF2ImpExConverter
- java.lang.Object
-
- de.hybris.platform.ldap.LDIF2ImpExConverter
-
public class LDIF2ImpExConverter extends java.lang.ObjectConverts a given LDIF file to a IMPEX file. An additional mapping object will be used for translating LDAP objectclasses to their corresponding hybris types.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_ENCODING
-
Constructor Summary
Constructors Constructor Description LDIF2ImpExConverter(java.io.File file, ConfigValueObject config)Opens the file and sets the given encoding.LDIF2ImpExConverter(java.io.InputStream inputStream, ConfigValueObject config)Opens the given Inputstream with the given file.LDIF2ImpExConverter(java.io.Reader reader, ConfigValueObject config)Opens the given reader.LDIF2ImpExConverter(java.lang.String fileName, ConfigValueObject config)Opens the file with the given filename and sets the given encoding.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangenerateImpExScript()callsgenerateImpExScript( "INSERT" )booleangenerateImpExScript(java.lang.String mode)ImpExEntrygenerateImportLine(LDAPGenericObject obj, java.lang.String mode)ImpExMediagetExportAsMedia()java.lang.StringgetExportAsString()
-
-
-
Field Detail
-
DEFAULT_ENCODING
public static final java.lang.String DEFAULT_ENCODING
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LDIF2ImpExConverter
public LDIF2ImpExConverter(java.lang.String fileName, ConfigValueObject config) throws java.io.UnsupportedEncodingException, java.io.FileNotFoundExceptionOpens the file with the given filename and sets the given encoding.- Parameters:
fileName- the filename of the LDIF file- Throws:
java.io.UnsupportedEncodingException- thrown by false encoding typejava.io.FileNotFoundException- thrown if file not found
-
LDIF2ImpExConverter
public LDIF2ImpExConverter(java.io.File file, ConfigValueObject config) throws java.io.UnsupportedEncodingException, java.io.FileNotFoundExceptionOpens the file and sets the given encoding.- Parameters:
file- the LDIF file- Throws:
java.io.UnsupportedEncodingException- thrown by false encoding typejava.io.FileNotFoundException- thrown if file not found
-
LDIF2ImpExConverter
public LDIF2ImpExConverter(java.io.InputStream inputStream, ConfigValueObject config) throws java.io.UnsupportedEncodingExceptionOpens the given Inputstream with the given file.- Parameters:
inputStream- the InputStream- Throws:
java.io.UnsupportedEncodingException
-
LDIF2ImpExConverter
public LDIF2ImpExConverter(java.io.Reader reader, ConfigValueObject config)Opens the given reader. The default encoding is set to"UTF-8"- Parameters:
reader- the reader
-
-
Method Detail
-
generateImpExScript
public boolean generateImpExScript() throws JaloBusinessException, java.io.UnsupportedEncodingExceptioncallsgenerateImpExScript( "INSERT" )- Returns:
- success
- Throws:
JaloBusinessExceptionjava.io.UnsupportedEncodingException
-
generateImpExScript
public boolean generateImpExScript(java.lang.String mode) throws JaloBusinessException, java.io.UnsupportedEncodingException- Throws:
JaloBusinessExceptionjava.io.UnsupportedEncodingException
-
generateImportLine
public ImpExEntry generateImportLine(LDAPGenericObject obj, java.lang.String mode)
-
getExportAsMedia
public ImpExMedia getExportAsMedia()
-
getExportAsString
public java.lang.String getExportAsString()
-
-