Class NoteServiceImpl
- java.lang.Object
-
- org.exoplatform.wiki.service.impl.NoteServiceImpl
-
- All Implemented Interfaces:
NoteService
public class NoteServiceImpl extends Object implements NoteService
-
-
Field Summary
Fields Modifier and Type Field Description static StringATT_CACHE_NAMEstatic StringCACHE_NAME
-
Constructor Summary
Constructors Constructor Description NoteServiceImpl(org.exoplatform.container.configuration.ConfigurationManager configManager, org.exoplatform.portal.config.UserACL userACL, DataStorage dataStorage, org.exoplatform.services.cache.CacheService cacheService, org.exoplatform.services.organization.OrganizationService orgService, WikiService wikiService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.social.common.service.HTMLUploadImageProcessor htmlUploadImageProcessor, org.exoplatform.social.core.space.spi.SpaceService spaceService)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidcleanUp(File file)DraftPagecreateDraftForExistPage(DraftPage draftPage, Page targetPage, String revision, long clientTime, String username)Creates a draft for an existing pageDraftPagecreateDraftForNewPage(DraftPage draftPage, long clientTime)Creates a draft for a new pagePagecreateNote(Wiki noteBook, String parentNoteName, Page note, org.exoplatform.services.security.Identity userIdentity)Create a new note in the given notebook, under the given parent note.PagecreateNote(Wiki noteBook, Page parentPage, Page note)Create a new note in the given notebook, under the given parent note.voidcreateVersionOfNote(Page note, String userName)Creates a version of a note.booleandeleteNote(String noteType, String noteOwner, String noteName)Deletes a note.booleandeleteNote(String noteType, String noteOwner, String noteName, org.exoplatform.services.security.Identity userIdentity)byte[]exportNotes(String[] notesToExportIds, boolean exportAll, org.exoplatform.services.security.Identity identity)Export a list of notes and provide a bytearrayList<Page>getAllNotes(Page note, String userName)List<BreadcrumbData>getBreadCrumb(String noteType, String noteOwner, String noteName, boolean isDraftNote)Gets a list of data which is used for composing the breadcrumb.List<NoteToExport>getChildrenNoteOf(NoteToExport note)List<Page>getChildrenNoteOf(Page note, String userId, boolean withDrafts, boolean withChild)Get all the children notes of a noteDraftPagegetDraftNoteById(String id, String userId)Gets a draft note based on its unique id.List<Page>getDuplicateNotes(Page parentNote, Wiki targetNoteBook, List<Page> resultList, String userId)Checks if a note and its children are duplicated with ones in the target NoteBook or not, then gets a list of duplicated notes if any.List<File>getFilesfromContent(NoteToExport note, List<File> files)DraftPagegetLatestDraftOfPage(Page targetPage, String username)Returns latest draft of given page.PagegetNoteById(String id)Gets a note based on its unique id.PagegetNoteById(String id, org.exoplatform.services.security.Identity userIdentity)PagegetNoteById(String id, org.exoplatform.services.security.Identity userIdentity, String source)PagegetNoteByRootPermission(String noteBookType, String noteBookOwner, String noteId)PagegetNoteOfNoteBookByName(String noteType, String noteOwner, String noteName)Gets a note by its unique name in the noteBook.PagegetNoteOfNoteBookByName(String noteType, String noteOwner, String noteName, org.exoplatform.services.security.Identity userIdentity)PagegetNoteOfNoteBookByName(String noteType, String noteOwner, String noteName, org.exoplatform.services.security.Identity userIdentity, String source)List<Page>getNotesOfWiki(String noteType, String noteOwner)Retrieve the all notes contained in noteBookList<NoteToExport>getNotesToExport(String[] notesToExportIds, boolean exportAll, org.exoplatform.services.security.Identity identity)Recursive method to build the children and parent of a noteNoteToExportgetNoteToExport(NoteToExport note)Recursive method to build the children and parent of a noteMap<WikiPageParams,List<WikiPageParams>>getPageLinksMap()NoteToExportgetParentNoteOf(NoteToExport note)PagegetParentNoteOf(Page note)Get parent note of a noteList<String>getPreviousNamesOfNote(Page note)Get previous names of a noteorg.exoplatform.services.cache.ExoCache<Integer,MarkupData>getRenderingCache()List<PageHistory>getVersionsHistoryOfNote(Page note, String userName)Gets all the Histories of the given notevoidimportNote(Page note, Page parent, Wiki wiki, String conflict, org.exoplatform.services.security.Identity userIdentity)Recursive method to importe a notevoidimportNotes(String zipLocation, Page parent, String conflict, org.exoplatform.services.security.Identity userIdentity)importe a list of notes from zipvoidimportNotes(List<String> files, Page parent, String conflict, org.exoplatform.services.security.Identity userIdentity)importe a list of notes from zipprotected voidinvalidateAttachmentCache(Page note)protected voidinvalidateCache(Page page)protected voidinvalidateCachesOfPageTree(Page note, String userId)Invalidate all caches of a page and all its descendantsbooleanisExisting(String noteBookType, String noteBookOwner, String noteId)voidmoveNote(WikiPageParams currentLocationParams, WikiPageParams newLocationParams)Move a notebooleanmoveNote(WikiPageParams currentLocationParams, WikiPageParams newLocationParams, org.exoplatform.services.security.Identity userIdentity)Move a notevoidpostAddPage(String wikiType, String wikiOwner, String pageId, Page page)voidpostDeletePage(String wikiType, String wikiOwner, String pageId, Page page)voidpostOpenByBreadCrumb(String wikiType, String wikiOwner, String pageId, Page page)voidpostOpenByTree(String wikiType, String wikiOwner, String pageId, Page page)voidpostUpdatePage(String wikiType, String wikiOwner, String pageId, Page page, PageUpdateType wikiUpdateType)StringprocessImagesForExport(Page note)Process images by creting images found in the contentStringprocessNotesLinkForExport(NoteToExport note)voidremoveDraft(String draftName)Removes a draft page by its name.voidremoveDraftOfNote(WikiPageParams param)booleanrenameNote(String noteType, String noteOwner, String noteName, String newName, String newTitle)Renames a note.voidrestoreVersionOfNote(String versionName, Page note, String userName)Restores a version of a noteDraftPageupdateDraftForExistPage(DraftPage draftNoteToUpdate, Page targetPage, String revision, long clientTime, String username)Update draft note for an existing pageDraftPageupdateDraftForNewPage(DraftPage draftNoteToUpdate, long clientTime)Update draft note for a new pagePageupdateNote(Page note)Update the given note.PageupdateNote(Page note, PageUpdateType type, org.exoplatform.services.security.Identity userIdentity)Update the given note.static FilezipFiles(String zipFileName, List<File> addToZip)
-
-
-
Field Detail
-
CACHE_NAME
public static final String CACHE_NAME
- See Also:
- Constant Field Values
-
ATT_CACHE_NAME
public static final String ATT_CACHE_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NoteServiceImpl
public NoteServiceImpl(org.exoplatform.container.configuration.ConfigurationManager configManager, org.exoplatform.portal.config.UserACL userACL, DataStorage dataStorage, org.exoplatform.services.cache.CacheService cacheService, org.exoplatform.services.organization.OrganizationService orgService, WikiService wikiService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.social.common.service.HTMLUploadImageProcessor htmlUploadImageProcessor, org.exoplatform.social.core.space.spi.SpaceService spaceService)
-
-
Method Detail
-
zipFiles
public static File zipFiles(String zipFileName, List<File> addToZip) throws IOException
- Throws:
IOException
-
getRenderingCache
public org.exoplatform.services.cache.ExoCache<Integer,MarkupData> getRenderingCache()
-
getPageLinksMap
public Map<WikiPageParams,List<WikiPageParams>> getPageLinksMap()
-
createNote
public Page createNote(Wiki noteBook, String parentNoteName, Page note, org.exoplatform.services.security.Identity userIdentity) throws WikiException, IllegalAccessException
Description copied from interface:NoteServiceCreate a new note in the given notebook, under the given parent note.- Specified by:
createNotein interfaceNoteService- Parameters:
noteBook- Notebook object.parentNoteName- parent note name.note- the note object to create.userIdentity- user Identity.- Returns:
- The new note.
- Throws:
WikiException- if an error occuredIllegalAccessException- if the user don't have edit rights to the parent note
-
createNote
public Page createNote(Wiki noteBook, Page parentPage, Page note) throws WikiException
Description copied from interface:NoteServiceCreate a new note in the given notebook, under the given parent note.- Specified by:
createNotein interfaceNoteService- Parameters:
noteBook- Notebook object.parentPage- parent note.note- the note to create.- Returns:
- The new note.
- Throws:
WikiException- if an error occured
-
updateNote
public Page updateNote(Page note) throws WikiException
Description copied from interface:NoteServiceUpdate the given note.- Specified by:
updateNotein interfaceNoteService- Parameters:
note- Updated note- Returns:
- updated note
- Throws:
WikiException- if an error occured
-
updateNote
public Page updateNote(Page note, PageUpdateType type, org.exoplatform.services.security.Identity userIdentity) throws WikiException, IllegalAccessException, org.gatein.api.EntityNotFoundException
Description copied from interface:NoteServiceUpdate the given note. This does not automatically create a new version. If a new version must be created it should be explicitly done by calling createVersionOfNote(). The second parameter is the type of update done (title only, content only, both, move, ...).- Specified by:
updateNotein interfaceNoteService- Parameters:
note- Updated notetype- Type of updateuserIdentity- user Identity- Returns:
- The updated note
- Throws:
WikiException- if an error occureIllegalAccessException- if the user don't have edit rights on the noteorg.gatein.api.EntityNotFoundException- if the the note to update don't exist
-
deleteNote
public boolean deleteNote(String noteType, String noteOwner, String noteName) throws WikiException
Description copied from interface:NoteServiceDeletes a note.- Specified by:
deleteNotein interfaceNoteService- Parameters:
noteType- It can be Portal, Group, or User.noteOwner- The NoteBook owner.noteName- Id of the note.- Returns:
- "True" if deleting the note is successful, or "false" if not.
- Throws:
WikiException- if an error occured
-
deleteNote
public boolean deleteNote(String noteType, String noteOwner, String noteName, org.exoplatform.services.security.Identity userIdentity) throws WikiException, IllegalAccessException, org.gatein.api.EntityNotFoundException
- Specified by:
deleteNotein interfaceNoteService- Throws:
WikiExceptionIllegalAccessExceptionorg.gatein.api.EntityNotFoundException
-
renameNote
public boolean renameNote(String noteType, String noteOwner, String noteName, String newName, String newTitle) throws WikiException
Description copied from interface:NoteServiceRenames a note.- Specified by:
renameNotein interfaceNoteService- Parameters:
noteType- It can be Portal, Group, or User.noteOwner- The NoteBook owner.noteName- Old name of the note.newName- New name of the note.newTitle- New title of the note.- Returns:
- "True" if renaming the note is successful, or "false" if not.
- Throws:
WikiException- if an error occured
-
moveNote
public void moveNote(WikiPageParams currentLocationParams, WikiPageParams newLocationParams) throws WikiException
Description copied from interface:NoteServiceMove a note- Specified by:
moveNotein interfaceNoteService- Parameters:
currentLocationParams- The current location of the note.newLocationParams- The new location of the note.- Throws:
WikiException- if an error occured
-
moveNote
public boolean moveNote(WikiPageParams currentLocationParams, WikiPageParams newLocationParams, org.exoplatform.services.security.Identity userIdentity) throws WikiException, IllegalAccessException, org.gatein.api.EntityNotFoundException
Description copied from interface:NoteServiceMove a note- Specified by:
moveNotein interfaceNoteService- Parameters:
currentLocationParams- The current location of the note.newLocationParams- The new location of the note.userIdentity- The user Identity to check permissions.- Returns:
- "True" if moving the note is successful, or "false" if not.
- Throws:
WikiException- if an error occuredIllegalAccessException- if the user don't have edit rights on the noteorg.gatein.api.EntityNotFoundException- if the the note to move don't exist
-
getNoteOfNoteBookByName
public Page getNoteOfNoteBookByName(String noteType, String noteOwner, String noteName) throws WikiException
Description copied from interface:NoteServiceGets a note by its unique name in the noteBook.- Specified by:
getNoteOfNoteBookByNamein interfaceNoteService- Parameters:
noteType- It can be Portal, Group, or User.noteOwner- The NoteBook owner.noteName- Id of the note.- Returns:
- The note if the current user has the read permission. Otherwise, it is "null".
- Throws:
WikiException- if an error occured
-
getNoteOfNoteBookByName
public Page getNoteOfNoteBookByName(String noteType, String noteOwner, String noteName, org.exoplatform.services.security.Identity userIdentity, String source) throws IllegalAccessException, WikiException
- Specified by:
getNoteOfNoteBookByNamein interfaceNoteService- Throws:
IllegalAccessExceptionWikiException
-
getNoteOfNoteBookByName
public Page getNoteOfNoteBookByName(String noteType, String noteOwner, String noteName, org.exoplatform.services.security.Identity userIdentity) throws IllegalAccessException, WikiException
- Specified by:
getNoteOfNoteBookByNamein interfaceNoteService- Throws:
IllegalAccessExceptionWikiException
-
getNoteById
public Page getNoteById(String id) throws WikiException
Description copied from interface:NoteServiceGets a note based on its unique id.- Specified by:
getNoteByIdin interfaceNoteService- Parameters:
id- Unique id of the note.- Returns:
- The note.
- Throws:
WikiException- if an error occured
-
getDraftNoteById
public DraftPage getDraftNoteById(String id, String userId) throws WikiException, IllegalAccessException
Description copied from interface:NoteServiceGets a draft note based on its unique id.- Specified by:
getDraftNoteByIdin interfaceNoteService- Parameters:
id- Unique id of the draft note.- Returns:
- The note.
- Throws:
WikiException- if an error occuredIllegalAccessException
-
getLatestDraftOfPage
public DraftPage getLatestDraftOfPage(Page targetPage, String username) throws WikiException
Description copied from interface:NoteServiceReturns latest draft of given page.- Specified by:
getLatestDraftOfPagein interfaceNoteService- Returns:
- Throws:
WikiException
-
getNoteById
public Page getNoteById(String id, org.exoplatform.services.security.Identity userIdentity) throws IllegalAccessException, WikiException
- Specified by:
getNoteByIdin interfaceNoteService- Throws:
IllegalAccessExceptionWikiException
-
getNoteById
public Page getNoteById(String id, org.exoplatform.services.security.Identity userIdentity, String source) throws IllegalAccessException, WikiException
- Specified by:
getNoteByIdin interfaceNoteService- Throws:
IllegalAccessExceptionWikiException
-
getParentNoteOf
public Page getParentNoteOf(Page note) throws WikiException
Description copied from interface:NoteServiceGet parent note of a note- Specified by:
getParentNoteOfin interfaceNoteService- Parameters:
note- note.- Returns:
- The list of children notes
- Throws:
WikiException- if an error occured
-
getParentNoteOf
public NoteToExport getParentNoteOf(NoteToExport note) throws WikiException
- Specified by:
getParentNoteOfin interfaceNoteService- Throws:
WikiException
-
getChildrenNoteOf
public List<Page> getChildrenNoteOf(Page note, String userId, boolean withDrafts, boolean withChild) throws WikiException
Description copied from interface:NoteServiceGet all the children notes of a note- Specified by:
getChildrenNoteOfin interfaceNoteService- Parameters:
note- note.withDrafts- if set to true returns the children notes and draft notes- Returns:
- The list of children notes
- Throws:
WikiException- if an error occured
-
getChildrenNoteOf
public List<NoteToExport> getChildrenNoteOf(NoteToExport note) throws WikiException
- Specified by:
getChildrenNoteOfin interfaceNoteService- Throws:
WikiException
-
getBreadCrumb
public List<BreadcrumbData> getBreadCrumb(String noteType, String noteOwner, String noteName, boolean isDraftNote) throws WikiException
Description copied from interface:NoteServiceGets a list of data which is used for composing the breadcrumb.- Specified by:
getBreadCrumbin interfaceNoteService- Parameters:
noteType- It can be Portal, Group, or User.noteOwner- The owner.noteName- Id of the note to which the breadcrumb points.- Returns:
- The list of data.
- Throws:
WikiException- if an error occured
-
getDuplicateNotes
public List<Page> getDuplicateNotes(Page parentNote, Wiki targetNoteBook, List<Page> resultList, String userId) throws WikiException
Description copied from interface:NoteServiceChecks if a note and its children are duplicated with ones in the target NoteBook or not, then gets a list of duplicated notes if any.- Specified by:
getDuplicateNotesin interfaceNoteService- Parameters:
parentNote- The note to check.targetNoteBook- The target NoteBook to check.resultList- The list of duplicated notes.- Returns:
- The list of duplicated notes.
- Throws:
WikiException- if an error occured
-
removeDraftOfNote
public void removeDraftOfNote(WikiPageParams param) throws WikiException
- Specified by:
removeDraftOfNotein interfaceNoteService- Throws:
WikiException
-
removeDraft
public void removeDraft(String draftName) throws WikiException
Description copied from interface:NoteServiceRemoves a draft page by its name.- Specified by:
removeDraftin interfaceNoteService- Parameters:
draftName- Name of the draft page.- Throws:
WikiException- if an error occured
-
getVersionsHistoryOfNote
public List<PageHistory> getVersionsHistoryOfNote(Page note, String userName) throws WikiException
Description copied from interface:NoteServiceGets all the Histories of the given note- Specified by:
getVersionsHistoryOfNotein interfaceNoteService- Parameters:
note- The noteuserName- the author name- Returns:
- All the histories of the note
- Throws:
WikiException- if an error occured
-
createVersionOfNote
public void createVersionOfNote(Page note, String userName) throws WikiException
Description copied from interface:NoteServiceCreates a version of a note. This method only tag the current note data as a new version, it does not update the note data- Specified by:
createVersionOfNotein interfaceNoteService- Parameters:
note- The noteuserName- the author name- Throws:
WikiException- if an error occured
-
restoreVersionOfNote
public void restoreVersionOfNote(String versionName, Page note, String userName) throws WikiException
Description copied from interface:NoteServiceRestores a version of a note- Specified by:
restoreVersionOfNotein interfaceNoteService- Parameters:
versionName- The name of the version to restorenote- The noteuserName- the other name- Throws:
WikiException- if an error occured
-
getPreviousNamesOfNote
public List<String> getPreviousNamesOfNote(Page note) throws WikiException
Description copied from interface:NoteServiceGet previous names of a note- Specified by:
getPreviousNamesOfNotein interfaceNoteService- Parameters:
note- The note- Returns:
- List of all the previous names of the note
- Throws:
WikiException- if an error occured
-
getNotesOfWiki
public List<Page> getNotesOfWiki(String noteType, String noteOwner)
Description copied from interface:NoteServiceRetrieve the all notes contained in noteBook- Specified by:
getNotesOfWikiin interfaceNoteService- Parameters:
noteType- the notebook Type It can be Portal, Group, or User.noteOwner- the notebook owner- Returns:
- List of pages
-
isExisting
public boolean isExisting(String noteBookType, String noteBookOwner, String noteId) throws WikiException
- Specified by:
isExistingin interfaceNoteService- Throws:
WikiException
-
getNoteByRootPermission
public Page getNoteByRootPermission(String noteBookType, String noteBookOwner, String noteId) throws WikiException
- Specified by:
getNoteByRootPermissionin interfaceNoteService- Throws:
WikiException
-
updateDraftForExistPage
public DraftPage updateDraftForExistPage(DraftPage draftNoteToUpdate, Page targetPage, String revision, long clientTime, String username) throws WikiException
Description copied from interface:NoteServiceUpdate draft note for an existing page- Specified by:
updateDraftForExistPagein interfaceNoteService- Parameters:
draftNoteToUpdate- The draft note to be updatedtargetPage- The target note of the draftrevision- The revision which is used for creating the draft page. If "null", this will be the last revision.username- The author name- Returns:
- Updated draft
- Throws:
WikiException
-
updateDraftForNewPage
public DraftPage updateDraftForNewPage(DraftPage draftNoteToUpdate, long clientTime) throws WikiException
Description copied from interface:NoteServiceUpdate draft note for a new page- Specified by:
updateDraftForNewPagein interfaceNoteService- Parameters:
draftNoteToUpdate- the draft note to be updated- Returns:
- Updated draft
- Throws:
WikiException
-
createDraftForExistPage
public DraftPage createDraftForExistPage(DraftPage draftPage, Page targetPage, String revision, long clientTime, String username) throws WikiException
Description copied from interface:NoteServiceCreates a draft for an existing page- Specified by:
createDraftForExistPagein interfaceNoteService- Parameters:
draftPage- The draft note to be createdtargetPage- The target note of the draftrevision- The revision which is used for creating the draft page. If "null", this will be the last revision.username- The author name- Returns:
- Created draft
- Throws:
WikiException
-
createDraftForNewPage
public DraftPage createDraftForNewPage(DraftPage draftPage, long clientTime) throws WikiException
Description copied from interface:NoteServiceCreates a draft for a new page- Specified by:
createDraftForNewPagein interfaceNoteService- Parameters:
draftPage- The draft note to be created- Returns:
- Created draft
- Throws:
WikiException
-
invalidateCache
protected void invalidateCache(Page page)
-
invalidateCachesOfPageTree
protected void invalidateCachesOfPageTree(Page note, String userId) throws WikiException
Invalidate all caches of a page and all its descendants- Parameters:
note- root pageuserId-- Throws:
WikiException- if an error occured
-
invalidateAttachmentCache
protected void invalidateAttachmentCache(Page note)
-
postUpdatePage
public void postUpdatePage(String wikiType, String wikiOwner, String pageId, Page page, PageUpdateType wikiUpdateType) throws WikiException
- Throws:
WikiException
-
postAddPage
public void postAddPage(String wikiType, String wikiOwner, String pageId, Page page) throws WikiException
- Throws:
WikiException
-
postDeletePage
public void postDeletePage(String wikiType, String wikiOwner, String pageId, Page page) throws WikiException
- Throws:
WikiException
-
postOpenByTree
public void postOpenByTree(String wikiType, String wikiOwner, String pageId, Page page) throws WikiException
- Throws:
WikiException
-
postOpenByBreadCrumb
public void postOpenByBreadCrumb(String wikiType, String wikiOwner, String pageId, Page page) throws WikiException
- Throws:
WikiException
-
exportNotes
public byte[] exportNotes(String[] notesToExportIds, boolean exportAll, org.exoplatform.services.security.Identity identity) throws IOException, WikiException
Export a list of notes and provide a bytearray- Specified by:
exportNotesin interfaceNoteService- Parameters:
notesToExportIds- List of notes to exportexportAll- boolean set to true if the export should add all childs of notesidentity- of the current usezr- Returns:
- Throws:
IOExceptionWikiException
-
getNotesToExport
public List<NoteToExport> getNotesToExport(String[] notesToExportIds, boolean exportAll, org.exoplatform.services.security.Identity identity)
Recursive method to build the children and parent of a note- Specified by:
getNotesToExportin interfaceNoteService- Parameters:
notesToExportIds- List of notesToExportIds to exportexportAll- boolean set to true if the export should add all childs of notesToExportIdsidentity- of the current usezr- Returns:
- Throws:
WikiException
-
getNoteToExport
public NoteToExport getNoteToExport(NoteToExport note) throws WikiException, IOException
Recursive method to build the children and parent of a note- Parameters:
note- get the note details to be exported- Returns:
- Throws:
WikiExceptionIOException
-
processNotesLinkForExport
public String processNotesLinkForExport(NoteToExport note) throws WikiException
- Throws:
WikiException
-
getFilesfromContent
public List<File> getFilesfromContent(NoteToExport note, List<File> files) throws WikiException
- Throws:
WikiException
-
processImagesForExport
public String processImagesForExport(Page note) throws WikiException, IOException
Process images by creting images found in the content- Parameters:
note-- Returns:
- content
- Throws:
WikiExceptionIOException
-
importNotes
public void importNotes(String zipLocation, Page parent, String conflict, org.exoplatform.services.security.Identity userIdentity) throws WikiException, IllegalAccessException, IOException
importe a list of notes from zip- Specified by:
importNotesin interfaceNoteService- Parameters:
zipLocation- the path to the zip fileparent- parent note where note will be importedconflict- import mode if there in conflicts it can be : overwrite, duplicate, update or nothinguserIdentity- Identity of the user that execute the import- Throws:
WikiExceptionIllegalAccessExceptionIOException
-
importNotes
public void importNotes(List<String> files, Page parent, String conflict, org.exoplatform.services.security.Identity userIdentity) throws WikiException, IllegalAccessException, IOException
importe a list of notes from zip- Specified by:
importNotesin interfaceNoteService- Parameters:
files- List of filesparent- parent note where note will be importedconflict- import mode if there in conflicts it can be : overwrite, duplicate, update or nothinguserIdentity- Identity of the user that execute the import- Throws:
WikiExceptionIllegalAccessExceptionIOException
-
importNote
public void importNote(Page note, Page parent, Wiki wiki, String conflict, org.exoplatform.services.security.Identity userIdentity) throws WikiException, IllegalAccessException
Recursive method to importe a note- Parameters:
note- note to importparent- parent note where note will be importedwiki- the Notebook where note will be importedconflict- import mode if there in conflicts it can be : overwrite, duplicate, update or nothinguserIdentity- Identity of the user that execute the import- Throws:
WikiExceptionIllegalAccessException
-
cleanUp
public static void cleanUp(File file) throws IOException
- Throws:
IOException
-
getAllNotes
public List<Page> getAllNotes(Page note, String userName) throws WikiException
- Throws:
WikiException
-
-