Package org.javlo.helper
Class ContentHelper
- java.lang.Object
-
- org.javlo.helper.ContentHelper
-
public class ContentHelper extends Object
-
-
Constructor Summary
Constructors Constructor Description ContentHelper()
-
Method Summary
-
-
-
Method Detail
-
removeTag
public static String removeTag(String text)
remove tag. sample: link -> link- Parameters:
text
- XHTML Code- Returns:
- simple text
-
createContentWithHTML
public static List<ComponentBean> createContentWithHTML(String html, String lg) throws XMLManipulationHelper.BadXMLException
-
main
public static void main(String[] args)
-
importZipEntryToDataFolder
public static boolean importZipEntryToDataFolder(GlobalContext gc, ZipEntry entry, InputStream in, String localFolder) throws IOException
import a zip entry localy.- Parameters:
gc
-entry
- the zip entry.localFolder
- the local forlder in static folder.- Returns:
- false if file not create.
- Throws:
IOException
-
createContentFromODT
public static List<ComponentBean> createContentFromODT(GlobalContext gc, InputStream in, String name, String lang) throws Exception
- Throws:
Exception
-
createContentFromDocx
public static List<ComponentBean> createContentFromDocx(ContentContext ctx, InputStream in, MenuElement page, String name, String lang) throws Exception
- Throws:
Exception
-
createContentFromArray
public static List<ComponentBean> createContentFromArray(GlobalContext gc, InputStream in, String name, String lang) throws Exception
- Throws:
Exception
-
importJCRFile
public static String importJCRFile(ContentContext ctx, InputStream in, String name, MenuElement page, String titleXPath, String dateXPath, String dateFormat, String contentXPath, String pageRootXPath, boolean explodeHTML) throws ZipException, IOException
- Throws:
ZipException
IOException
-
createChild
public static MenuElement createChild(ContentContext ctx, MenuElement parent)
-
copyPage
public static void copyPage(ContentContext ctx, MenuElement source, MenuElement target) throws Exception
- Throws:
Exception
-
createPage
public static MenuElement createPage(ContentContext ctx, MenuElement template, MenuElement root, Date date) throws Exception
- Throws:
Exception
-
getAllComponentsOfChildren
public static List<ComponentBean> getAllComponentsOfChildren(MenuElement page) throws Exception
get all component in a page and children of the page.- Parameters:
page
-- Returns:
- Throws:
Exception
-
-