public class WikiMigrationSettingService extends Object
| Constructor and Description |
|---|
WikiMigrationSettingService(org.exoplatform.commons.api.settings.SettingService settingService) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPageErrorToSetting(org.exoplatform.wiki.mow.api.Page pageMigrationError)
Add a page to the "page errors" list stored in SettingService
The list is stored as a unique string where all page are separated by comma
See pageToString() to check the format of a page in the string list
|
void |
addRelatedPagesToSetting(org.exoplatform.wiki.mow.api.Page relatedPage)
Add a page to the list of "page with related pages" stored in SettingService
The list is stored as a unique string where all page are separated by comma
See pageToString() to check the format of a page in the string list
|
void |
addWikiDeletionErrorToSetting(org.exoplatform.wiki.mow.api.Wiki wikiDeletionError)
Add a wiki to the "wiki deletion errors" list stored in SettingService
The list is stored as a unique string where all wiki are separated by comma
See wikiToString() to check the format of a wiki in the string list
|
void |
addWikiErrorToSetting(org.exoplatform.wiki.mow.api.Wiki wikiMigrationError)
Add a wiki to the "wiki errors" list stored in SettingService
The list is stored as a unique string where all wiki are separated by comma
See wikiToString() to check the format of a wiki in the string list
|
boolean |
getOrCreateOperationState(String operation)
Call settingService to get the state of an operation (Migration of User wiki for instance)
|
Integer |
getPageErrorsNumber() |
String |
getPageErrorsSetting()
Get the "page error" list (a unique string with wiki separated by comma)
See pageToString() to check the format of a page in the string list
|
String[] |
getPagesWithRelatedPages()
Get the "page with related pages" list in a String Array format
|
String |
getRelatedPagesSetting()
Get the "page with related pages" list (a unique string with wiki separated by comma)
The migration of link between page is done at the end of migration and use this list
See pageToString() to check the format of a page in the string list
|
Integer |
getWikiDeletionErrorsNumber() |
String |
getWikiDeletionErrorsSetting()
Get the "wiki deletion error" list (a unique string with wiki separated by comma)
See wikiToString() to check the format of a wiki in the string list
|
String |
getWikiErrorsSetting()
Get the "wiki error" list (a unique string with wiki separated by comma)
See wikiToString() to check the format of a wiki in the string list
|
Integer |
getWikiMigrationErrorsNumber() |
void |
initMigrationSetting()
Use the settingService to get all wiki migration setting as PLF startup.
|
boolean |
isForceJCRDeletion()
Get value (an eXo Property) that force the deletion of wiki and page even if they encounter error during migration
|
boolean |
isForceRunMigration()
Get value (an eXo Property) that force the migration to restart from the beginning
|
String |
pageToString(org.exoplatform.wiki.mow.api.Page page)
Transform a page to string to store it to the "page error" or "page with related page" String list
|
void |
removeAllSettingValues()
Remove from the SettingService all settings related to the wiki migration
|
void |
removeSettingValue(String settingKey)
Remove from the SettingService the setting with the given key
|
void |
setForceJCRDeletion(boolean forceJCRDeletion) |
void |
setForceRunMigration(boolean forceRunMigration) |
boolean |
setOperationStatusToDefault(String operation)
Set the value of the operation state to default (false)
|
void |
setRelatedPagesToSetting(String pagesWithRelatedPagesString)
Set the list of "page with related pages" stored in SettingService
The list is stored as a unique string where all page are separated by comma
See pageToString() to check the format of a page in the string list
|
void |
setWikiCleanupOfTypeDone(String wikiType) |
void |
setWikiMigrationOfTypeDone(String wikiType) |
org.exoplatform.wiki.mow.api.Page |
stringToPage(String pageString) |
void |
updateOperationStatus(String key,
Boolean status)
Update in the settingService the status of an operation
|
String |
wikiToString(org.exoplatform.wiki.mow.api.Wiki wiki)
Transform a wiki to string to store it to the "wiki error" String list
|
String |
wikiToString(org.exoplatform.wiki.mow.core.api.wiki.WikiImpl wiki)
Transform a wikiImpl to string to store it to the "wiki error" String list
|
public WikiMigrationSettingService(org.exoplatform.commons.api.settings.SettingService settingService)
public boolean isForceJCRDeletion()
public void setForceJCRDeletion(boolean forceJCRDeletion)
public boolean isForceRunMigration()
public void setForceRunMigration(boolean forceRunMigration)
public void initMigrationSetting()
public boolean getOrCreateOperationState(String operation)
operation - operationpublic boolean setOperationStatusToDefault(String operation)
operation - public void setWikiMigrationOfTypeDone(String wikiType)
public void setWikiCleanupOfTypeDone(String wikiType)
public void updateOperationStatus(String key, Boolean status)
key - operation statusstatus - public void removeSettingValue(String settingKey)
public void removeAllSettingValues()
public void addWikiErrorToSetting(org.exoplatform.wiki.mow.api.Wiki wikiMigrationError)
wikiMigrationError - the wiki in error during migrationpublic void addPageErrorToSetting(org.exoplatform.wiki.mow.api.Page pageMigrationError)
pageMigrationError - the page in error during migrationpublic void addWikiDeletionErrorToSetting(org.exoplatform.wiki.mow.api.Wiki wikiDeletionError)
wikiDeletionError - the wiki in error during deletionpublic String getWikiErrorsSetting()
public String getPageErrorsSetting()
public String getWikiDeletionErrorsSetting()
public void addRelatedPagesToSetting(org.exoplatform.wiki.mow.api.Page relatedPage)
relatedPage - public String getRelatedPagesSetting()
public String[] getPagesWithRelatedPages()
public Integer getWikiMigrationErrorsNumber()
public Integer getWikiDeletionErrorsNumber()
public Integer getPageErrorsNumber()
public String wikiToString(org.exoplatform.wiki.mow.api.Wiki wiki)
wiki - wiki to transform to string formatpublic String wikiToString(org.exoplatform.wiki.mow.core.api.wiki.WikiImpl wiki)
wiki - wiki to transform to string formatpublic org.exoplatform.wiki.mow.api.Page stringToPage(String pageString)
pageString - String to transform Page objectpublic String pageToString(org.exoplatform.wiki.mow.api.Page page)
page - page to transform to string formatpublic void setRelatedPagesToSetting(String pagesWithRelatedPagesString)
pagesWithRelatedPagesString - the list of "page with related pages"Copyright © 2003–2017 eXo Platform SAS. All rights reserved.