public class ImageDescriptorFactoryImpl extends Object implements ImageDescriptorFactory
ImageDescriptor objects.
Constructed objects need to be closedImageDescriptor.closeImageStreamQuietly()| Constructor and Description |
|---|
ImageDescriptorFactoryImpl(I18nHelper i18nHelper) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isUrlSupported(String url)
Checks if url can be used to construct
ImageDescriptor using withUrl(String) |
ImageDescriptor |
withRequest(String parameterName,
webwork.multipart.MultiPartRequestWrapper multiPartRequest) |
ImageDescriptor |
withUrl(String url)
If provided url is supported it constructs
ImageDescriptor object with it |
public ImageDescriptorFactoryImpl(I18nHelper i18nHelper)
public boolean isUrlSupported(String url)
ImageDescriptor using withUrl(String)isUrlSupported in interface ImageDescriptorFactoryurl - - url to checkpublic ImageDescriptor withUrl(String url) throws IOException
ImageDescriptor object with itwithUrl in interface ImageDescriptorFactoryurl - - url to create ImageDescriptor withImageDescriptor object containing image data that was pointed by provided urlIOException - - when fails to open stream to image resource provided by url. Can occur with:IllegalArgumentException - - if url is not supportedURL.openConnection(),
URLConnection.connect(),
URLConnection.getInputStream(),
URLImageDescriptor.isUrlSupported(String)public ImageDescriptor withRequest(String parameterName, webwork.multipart.MultiPartRequestWrapper multiPartRequest) throws IOException
withRequest in interface ImageDescriptorFactoryparameterName - - parameter name for uploaded image contained in provided MultiPartRequestWrappermultiPartRequest - - multi part request containing imageImageDescriptor object containing image data uploaded by requestIOException - - with constructor for FileInputStream.FileInputStream(String)Copyright © 2002-2019 Atlassian. All Rights Reserved.