|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Objectorg.opencms.importexport.CmsImportHelper
public class CmsImportHelper
Import helper.
| Constructor Summary | |
|---|---|
CmsImportHelper(CmsImportParameters parameters)
Constructor. |
|
| Method Summary | |
|---|---|
void |
cacheDtdSystemId(java.lang.String dtdSystemLocation,
java.lang.String dtdFilename,
java.lang.String dtdUrlPrefix)
Adds a new DTD system id prefix mapping for internal resolution of external URLs. |
void |
closeFile()
Closes the zip file. |
byte[] |
getFileBytes(java.lang.String filename)
Returns a byte array containing the content of the file. |
java.lang.String |
getFileName()
Returns the name of the import file, without zip extension. |
java.io.InputStream |
getFileStream(java.lang.String fileName)
Returns a stream for the content of the file. |
java.io.File |
getFolder()
Returns the RFS folder to import from. |
java.lang.String |
getLocation(java.lang.Class<?> clazz)
Returns the class system location. |
java.util.zip.ZipFile |
getZipFile()
Returns the RFS zip file to import from. |
void |
openFile()
Opens the import file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CmsImportHelper(CmsImportParameters parameters)
parameters - the import parameters to use| Method Detail |
|---|
public void cacheDtdSystemId(java.lang.String dtdSystemLocation,
java.lang.String dtdFilename,
java.lang.String dtdUrlPrefix)
dtdSystemLocation - the internal system location of the DTD file, e.g. org/opencms/configuration/dtdFilename - the name of the DTD file, e.g. opencms-configuration.dtddtdUrlPrefix - the external system id prefix of the DTD file, e.g. http://www.opencms.org/dtd/6.0/I_CmsXmlConfigurationpublic void closeFile()
public byte[] getFileBytes(java.lang.String filename)
throws CmsImportExportException
filename - the name of the file to read, relative to the folder or zip file
CmsImportExportException - if something goes wrongpublic java.lang.String getFileName()
public java.io.InputStream getFileStream(java.lang.String fileName)
throws CmsImportExportException
fileName - the name of the file to stream, relative to the folder or zip file
CmsImportExportException - if something goes wrongpublic java.io.File getFolder()
public java.lang.String getLocation(java.lang.Class<?> clazz)
i.e: org/opencms/importexport
clazz - the class to get the location for
public java.util.zip.ZipFile getZipFile()
public void openFile()
throws java.io.IOException
java.io.IOException - if the file could not be opened
|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||