Package org.exoplatform.social.ckeditor
Class HTMLUploadImageProcessor
- java.lang.Object
-
- org.exoplatform.social.ckeditor.HTMLUploadImageProcessor
-
public class HTMLUploadImageProcessor extends Object
Service to parse an HTML content, extract temporary uploaded files, store them in a permanent location and replace URLs in the HTML content with the permanent URLs
-
-
Field Summary
Fields Modifier and Type Field Description static StringIP_REGEXstatic StringURL_OR_URI_REGEX
-
Constructor Summary
Constructors Constructor Description HTMLUploadImageProcessor(org.exoplatform.container.PortalContainer portalContainer, org.exoplatform.upload.UploadService uploadService, org.exoplatform.services.jcr.RepositoryService repositoryService, org.exoplatform.services.cms.link.LinkManager linkManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetRepositoryName()StringprocessImages(String content, javax.jcr.Node parentNode, String imagesSubFolderPath)Process the given HTML content, extract temporary uploaded files, store them in a permanent location and replace URLs in the HTML content with the permanent URLs
-
-
-
Field Detail
-
IP_REGEX
public static final String IP_REGEX
- See Also:
- Constant Field Values
-
URL_OR_URI_REGEX
public static final String URL_OR_URI_REGEX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
HTMLUploadImageProcessor
public HTMLUploadImageProcessor(org.exoplatform.container.PortalContainer portalContainer, org.exoplatform.upload.UploadService uploadService, org.exoplatform.services.jcr.RepositoryService repositoryService, org.exoplatform.services.cms.link.LinkManager linkManager)
-
-
Method Detail
-
processImages
public String processImages(String content, javax.jcr.Node parentNode, String imagesSubFolderPath) throws Exception
Process the given HTML content, extract temporary uploaded files, store them in a permanent location and replace URLs in the HTML content with the permanent URLs- Parameters:
content- The HTML contentparentNode- The parent node to store the images. This node must exist.imagesSubFolderPath- The subpath of the folder under parentNode to store the images. If the nodes of this path do not exist, they are automatically created, only if there are images to store.- Returns:
- The updated HTML content with the permanent images URLs
- Throws:
Exception
-
getRepositoryName
public String getRepositoryName()
-
-