Package org.exoplatform.ecms.uploads
Class HTMLUploadImageProcessorImpl
java.lang.Object
org.exoplatform.ecms.uploads.HTMLUploadImageProcessorImpl
- All Implemented Interfaces:
org.exoplatform.social.common.service.HTMLUploadImageProcessor
public class HTMLUploadImageProcessorImpl
extends Object
implements org.exoplatform.social.common.service.HTMLUploadImageProcessor
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 -
Constructor Summary
ConstructorsConstructorDescriptionHTMLUploadImageProcessorImpl(org.exoplatform.container.PortalContainer portalContainer, org.exoplatform.upload.UploadService uploadService, org.exoplatform.services.jcr.RepositoryService repositoryService, org.exoplatform.services.cms.link.LinkManager linkManager, org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviderService, org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator, org.exoplatform.services.wcm.core.WCMService wcmService) -
Method Summary
Modifier and TypeMethodDescriptionprocessImages(String content, String parentNodeId, String imagesSubFolderPath) Deprecated.Deprecated, Since the uploaded images will be stored in the document storage by the CkeditorprocessImagesForExport(String content_) Process the given HTML content, export Files and replace URLs in the HTML content with files nameprocessSpaceImages(String content, String spaceGroupId, String imagesSubLocationPath) Deprecated.Deprecated, Since the uploaded images will be stored in the document storage by the CkeditorprocessUserImages(String content, String userId, String imagesSubLocationPath) Deprecated.Deprecated, Since the uploaded images will be stored in the document storage by the CkeditorvoiduploadSpaceFile(String filePath, String spaceGroupId, String fileName, String imagesSubLocationPath) voiduploadUserFile(String filePath, String userId, String fileName, String imagesSubLocationPath)
-
Field Details
-
IP_REGEX
- See Also:
-
URL_OR_URI_REGEX
- See Also:
-
-
Constructor Details
-
HTMLUploadImageProcessorImpl
public HTMLUploadImageProcessorImpl(org.exoplatform.container.PortalContainer portalContainer, org.exoplatform.upload.UploadService uploadService, org.exoplatform.services.jcr.RepositoryService repositoryService, org.exoplatform.services.cms.link.LinkManager linkManager, org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviderService, org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator, org.exoplatform.services.wcm.core.WCMService wcmService)
-
-
Method Details
-
processImages
@Deprecated public String processImages(String content, String parentNodeId, String imagesSubFolderPath) throws IllegalArgumentException Deprecated.Deprecated, Since the uploaded images will be stored in the document storage by the Ckeditor- Specified by:
processImagesin interfaceorg.exoplatform.social.common.service.HTMLUploadImageProcessor- Throws:
IllegalArgumentException- Since:
- 6.3.0
-
processSpaceImages
@Deprecated public String processSpaceImages(String content, String spaceGroupId, String imagesSubLocationPath) throws IllegalArgumentException Deprecated.Deprecated, Since the uploaded images will be stored in the document storage by the Ckeditor- Specified by:
processSpaceImagesin interfaceorg.exoplatform.social.common.service.HTMLUploadImageProcessor- Throws:
IllegalArgumentException- Since:
- 6.3.0
-
processUserImages
@Deprecated public String processUserImages(String content, String userId, String imagesSubLocationPath) throws IllegalArgumentException Deprecated.Deprecated, Since the uploaded images will be stored in the document storage by the Ckeditor- Specified by:
processUserImagesin interfaceorg.exoplatform.social.common.service.HTMLUploadImageProcessor- Throws:
IllegalArgumentException- Since:
- 6.3.0
-
uploadSpaceFile
public void uploadSpaceFile(String filePath, String spaceGroupId, String fileName, String imagesSubLocationPath) throws IllegalArgumentException - Specified by:
uploadSpaceFilein interfaceorg.exoplatform.social.common.service.HTMLUploadImageProcessor- Throws:
IllegalArgumentException
-
uploadUserFile
public void uploadUserFile(String filePath, String userId, String fileName, String imagesSubLocationPath) throws IllegalArgumentException - Specified by:
uploadUserFilein interfaceorg.exoplatform.social.common.service.HTMLUploadImageProcessor- Throws:
IllegalArgumentException
-
processImagesForExport
Process the given HTML content, export Files and replace URLs in the HTML content with files name- Specified by:
processImagesForExportin interfaceorg.exoplatform.social.common.service.HTMLUploadImageProcessor- Parameters:
content_- The HTML content- Returns:
- The updated HTML content with the images names
- Throws:
IllegalArgumentException
-
getRepositoryName
-