Liferay 6.1.2-ce-ga3

com.liferay.portlet.wiki.importers.mediawiki
Class MediaWikiImporter

java.lang.Object
  extended by com.liferay.portlet.wiki.importers.mediawiki.MediaWikiImporter
All Implemented Interfaces:
WikiImporter

public class MediaWikiImporter
extends Object
implements WikiImporter


Field Summary
static String SHARED_IMAGES_CONTENT
           
static String SHARED_IMAGES_TITLE
           
 
Constructor Summary
MediaWikiImporter()
           
 
Method Summary
protected  long getUserId(long userId, WikiNode node, String author, Map<String,String> usersMap)
           
protected  void importPage(long userId, String author, WikiNode node, String title, String content, String summary, Map<String,String> usersMap, boolean strictImportMode)
           
 void importPages(long userId, WikiNode node, InputStream[] inputStreams, Map<String,String[]> options)
           
protected  boolean isSpecialMediaWikiPage(String title, List<String> specialNamespaces)
           
protected  boolean isValidImage(String[] paths, InputStream inputStream)
           
protected  void moveFrontPage(long userId, WikiNode node, Map<String,String[]> options)
           
protected  String normalize(String categoryName, int length)
           
protected  String normalizeDescription(String description)
           
protected  String normalizeTitle(String title)
           
protected  void processImages(long userId, WikiNode node, InputStream imagesInputStream)
           
protected  void processRegularPages(long userId, WikiNode node, Element rootElement, List<String> specialNamespaces, Map<String,String> usersMap, InputStream imagesInputStream, Map<String,String[]> options)
           
protected  void processSpecialPages(long userId, WikiNode node, Element rootElement, List<String> specialNamespaces)
           
protected  String[] readAssetTagNames(long userId, WikiNode node, String content)
           
protected  String readParentTitle(String content)
           
protected  String readRedirectTitle(String content)
           
protected  List<String> readSpecialNamespaces(Element root)
           
protected  Map<String,String> readUsersFile(InputStream usersInputStream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SHARED_IMAGES_CONTENT

public static final String SHARED_IMAGES_CONTENT
See Also:
Constant Field Values

SHARED_IMAGES_TITLE

public static final String SHARED_IMAGES_TITLE
See Also:
Constant Field Values
Constructor Detail

MediaWikiImporter

public MediaWikiImporter()
Method Detail

importPages

public void importPages(long userId,
                        WikiNode node,
                        InputStream[] inputStreams,
                        Map<String,String[]> options)
                 throws PortalException
Specified by:
importPages in interface WikiImporter
Throws:
PortalException

getUserId

protected long getUserId(long userId,
                         WikiNode node,
                         String author,
                         Map<String,String> usersMap)
                  throws PortalException,
                         SystemException
Throws:
PortalException
SystemException

importPage

protected void importPage(long userId,
                          String author,
                          WikiNode node,
                          String title,
                          String content,
                          String summary,
                          Map<String,String> usersMap,
                          boolean strictImportMode)
                   throws PortalException
Throws:
PortalException

isSpecialMediaWikiPage

protected boolean isSpecialMediaWikiPage(String title,
                                         List<String> specialNamespaces)

isValidImage

protected boolean isValidImage(String[] paths,
                               InputStream inputStream)

moveFrontPage

protected void moveFrontPage(long userId,
                             WikiNode node,
                             Map<String,String[]> options)

normalize

protected String normalize(String categoryName,
                           int length)

normalizeDescription

protected String normalizeDescription(String description)

normalizeTitle

protected String normalizeTitle(String title)

processImages

protected void processImages(long userId,
                             WikiNode node,
                             InputStream imagesInputStream)
                      throws Exception
Throws:
Exception

processRegularPages

protected void processRegularPages(long userId,
                                   WikiNode node,
                                   Element rootElement,
                                   List<String> specialNamespaces,
                                   Map<String,String> usersMap,
                                   InputStream imagesInputStream,
                                   Map<String,String[]> options)

processSpecialPages

protected void processSpecialPages(long userId,
                                   WikiNode node,
                                   Element rootElement,
                                   List<String> specialNamespaces)
                            throws PortalException
Throws:
PortalException

readAssetTagNames

protected String[] readAssetTagNames(long userId,
                                     WikiNode node,
                                     String content)
                              throws PortalException,
                                     SystemException
Throws:
PortalException
SystemException

readParentTitle

protected String readParentTitle(String content)

readRedirectTitle

protected String readRedirectTitle(String content)

readSpecialNamespaces

protected List<String> readSpecialNamespaces(Element root)
                                      throws ImportFilesException
Throws:
ImportFilesException

readUsersFile

protected Map<String,String> readUsersFile(InputStream usersInputStream)
                                    throws IOException
Throws:
IOException

Liferay 6.1.2-ce-ga3