|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.confluence.importexport.impl.ExportUtils
public class ExportUtils
| Field Summary | |
|---|---|
static String |
PROP_BACKUP_ATTACHMENTS
|
static String |
PROP_BUILD_NUMBER
|
static String |
PROP_EXPORT_TYPE
|
static String |
PROP_EXPORTED_SPACEKEY
Indicates a specific space key which has been exported. |
| Constructor Summary | |
|---|---|
ExportUtils()
|
|
| Method Summary | |
|---|---|
static Properties |
getExportDescriptor(File exportZip,
boolean cleanup)
Deprecated. since 4.2 use ExportDescriptor.getExportDescriptor(java.io.File) instead. |
static String |
getExportTypeFromExportZip(File exportZip)
Deprecated. since 4.2 use ExportDescriptor.getScope() |
static String |
getExportTypeFromExportZip(File exportZip,
boolean cleanup)
Deprecated. since 4.2 use ExportDescriptor.getScope() |
static String |
getSpaceKeyFromExportZip(File exportZip)
Deprecated. this is unnecessary for space exports produced since Confluence 4.2, where you can just use ExportDescriptor.getSpaceKey(). |
static String |
getTitleAsFilename(ContentEntityObject ceo)
Utility method to return a version of the content entity's title that's suitable to be used as a filename in an export. |
static String |
getTitleAsFilename(SearchResult searchResult)
Utility method to return a version of the search result's title that's suitable to be used as a filename in an export. |
static String |
getTitleAsFilename(String title)
Deprecated. since 5.1.4. Use getTitleAsFilename(ContentEntityObject) instead (see CONF-27260) |
static String |
getTitleAsHref(ContentEntityObject ceo)
For a URL encoded filename to be used in a link it will need to be double encoded (since the browser will decode the single encoding when resolving the link, and we have files with encoded names on the filesystem). |
static String |
getTitleAsHref(SearchResult searchResult)
For a URL encoded filename to be used in a link it will need to be double encoded (since the browser will decode the single encoding when resolving the link, and we have files with encoded names on the filesystem). |
static String |
getTitleAsHref(String title)
Deprecated. since 5.1.4. Use getTitleAsHref(ContentEntityObject) instead (see CONF-27260) |
static boolean |
isSpaceImport(File importFile)
Deprecated. since 4.2 use ExportDescriptor.isSpaceImport(). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PROP_BUILD_NUMBER
public static final String PROP_EXPORT_TYPE
public static final String PROP_BACKUP_ATTACHMENTS
public static final String PROP_EXPORTED_SPACEKEY
| Constructor Detail |
|---|
public ExportUtils()
| Method Detail |
|---|
@Deprecated
public static String getExportTypeFromExportZip(File exportZip)
throws ImportExportException,
UnexpectedImportZipFileContents
ExportDescriptor.getScope()
ImportExportException
UnexpectedImportZipFileContents
@Deprecated
public static String getExportTypeFromExportZip(File exportZip,
boolean cleanup)
throws ImportExportException,
UnexpectedImportZipFileContents
ExportDescriptor.getScope()
ImportExportException
UnexpectedImportZipFileContents
@Deprecated
public static Properties getExportDescriptor(File exportZip,
boolean cleanup)
throws ImportExportException,
UnexpectedImportZipFileContents
ExportDescriptor.getExportDescriptor(java.io.File) instead.
cleanup - this is ignored since 4.2. The directory will *always* be cleaned up.
ImportExportException
UnexpectedImportZipFileContents
@Deprecated
public static boolean isSpaceImport(File importFile)
throws ImportExportException,
UnexpectedImportZipFileContents
ExportDescriptor.isSpaceImport().
ImportExportException
UnexpectedImportZipFileContentspublic static String getTitleAsFilename(ContentEntityObject ceo)
Utility method to return a version of the content entity's title that's suitable to be used as a filename in an export. Falls back to using the content entity's ID if the title contains unsuitable characters.
This method is used to centralise the code since symmetry is required in the creation of the files during export and the creation of the links to these files in the exported content.
ceo - the ContentEntityObject to retrieve a suitable filename for.
public static String getTitleAsFilename(SearchResult searchResult)
Utility method to return a version of the search result's title that's suitable to be used as a filename in an export. Falls back to using the ID of the entity if the title contains unsuitable characters.
This method is used to centralise the code since symmetry is required in the creation of the files during export and the creation of the links to these files in the exported content.
searchResult - the SearchResult to retrieve a suitable filename for.
public static String getTitleAsFilename(String title)
getTitleAsFilename(ContentEntityObject) instead (see CONF-27260)
public static String getTitleAsHref(ContentEntityObject ceo)
For a URL encoded filename to be used in a link it will need to be double encoded (since the browser will decode the single encoding when resolving the link, and we have files with encoded names on the filesystem).
This utility method calls getTitleAsFilename(ContentEntityObject) to determine the name of the object on the filesystem. It will
then perform a URL encode of the filename, making it suitable for use in links.
This is centralised here since links are created both in Velocity (for the index page) and for individual pages as they are exported.
ceo - the ContentEntityObject to be made suitable for use in an href.
public static String getTitleAsHref(SearchResult searchResult)
For a URL encoded filename to be used in a link it will need to be double encoded (since the browser will decode the single encoding when resolving the link, and we have files with encoded names on the filesystem).
This utility method calls getTitleAsFilename(SearchResult) to determine the name of the object on the filesystem. It will
then perform a URL encode of the filename, making it suitable for use in links.
This is centralised here since links are created both in Velocity (for the index page) and for individual pages as they are exported.
searchResult - the SearchResult to be made suitable for use in an href.
public static String getTitleAsHref(String title)
getTitleAsHref(ContentEntityObject) instead (see CONF-27260)
@Deprecated
public static String getSpaceKeyFromExportZip(File exportZip)
throws ImportExportException,
UnexpectedImportZipFileContents
ExportDescriptor.getSpaceKey().
ImportExportException
UnexpectedImportZipFileContents
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||