public class ConfluenceUserImageProvider extends HttpExternalUserImageProvider<ConfluenceConfiguration>
| Modifier and Type | Field and Description |
|---|---|
static String |
CLIENT_PROPERTY_KEY_CONFIG_MODIFIED
Key of a plugin property to store the last modification timestamp of the confluence
configuration since the configuration does not provide this information.
|
USER_PROPERTY_KEY_IMAGE_LAST_MODIFIED, USER_PROPERTY_KEY_IMAGE_VERSION_STRING| Constructor and Description |
|---|
ConfluenceUserImageProvider(String symbolicName,
String pathToDefaultImage) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canLoad(String imageIdentifier)
Test whether a provider can load the image.
|
protected ConfluenceConfiguration |
getConfiguration() |
protected Long |
getConfigurationChangeTimestamp(ConfluenceConfiguration config)
Get the timestamp of the last configuration change.
|
protected String |
getImageURL(String imageIdentifier,
ConfluenceConfiguration config)
Get the URL under which the image with the given identifier can be downloaded
|
protected org.apache.http.protocol.HttpContext |
getRequestContext(URI imageUrl,
String imageIdentifier,
ConfluenceConfiguration config)
Get request context to be used when downloading the given image.
|
int |
getTimeToLive()
Get the number of seconds until a cached image should expire and thus be reloaded
|
void |
imageChanged(String imageIdentifier)
If imageIdentifier is not null the version string property is removed so that a new one is
created the next time the image with the identifier is accessed.
|
getPropertyKeyGroup, getPropertyManagement, getUserId, getVersionString, imageNotDownloaded, imageSuccessfullyDownloaded, isAuthorized, updateUserPropertyassertNotDisabled, cleanup, disableTemporarily, enable, extractImageFromEntity, getConnectionManagerTimeout, getConnectionTimeout, getDefaultImageVersionString, getDefaultRequestConfig, getDisabledUntilTimestamp, getHttpClient, getLastModifiedHeaderValue, getNotDisablingStatusCodes, getRequestHeaders, getSocketTimeout, hasDefaultImage, isDisabled, isDisablingException, isExternalProvider, isProvideDefaultImageIfDisabled, loadDefaultImage, loadImage, prepareHttpClient, setHttpClient, setProvideDefaultImageIfDisabled, validateContentType, validateStatusCodegetDefaultImageMimeType, getDefaultImageResourceLastModificationTimestamp, getIdentifierpublic static final String CLIENT_PROPERTY_KEY_CONFIG_MODIFIED
public boolean canLoad(String imageIdentifier)
ImageProviderImageProvider.loadImage(String) will handle it.canLoad in class ImageProviderimageIdentifier - the identifier of the imageprotected ConfluenceConfiguration getConfiguration()
getConfiguration in class HttpExternalImageProvider<ConfluenceConfiguration>protected Long getConfigurationChangeTimestamp(ConfluenceConfiguration config)
HttpExternalUserImageProvidergetConfigurationChangeTimestamp in class HttpExternalUserImageProvider<ConfluenceConfiguration>config - the configuration as returned by HttpExternalImageProvider.getConfiguration()protected String getImageURL(String imageIdentifier, ConfluenceConfiguration config)
HttpExternalImageProvidergetImageURL in class HttpExternalImageProvider<ConfluenceConfiguration>imageIdentifier - the ID of the image to downloadconfig - the configuration of the image provider, can be nullprotected org.apache.http.protocol.HttpContext getRequestContext(URI imageUrl, String imageIdentifier, ConfluenceConfiguration config)
HttpExternalImageProvidergetRequestContext in class HttpExternalImageProvider<ConfluenceConfiguration>imageUrl - the URL pointing to the imageimageIdentifier - the ID of the image to getconfig - the configuration of the image provider, can be nullpublic int getTimeToLive()
ImageProvidergetTimeToLive in class ImageProviderpublic void imageChanged(String imageIdentifier)
HttpExternalUserImageProviderimageChanged in class HttpExternalUserImageProvider<ConfluenceConfiguration>imageIdentifier - the identifier of the changed image. Can be null in the case that all images have
changed.Copyright © 2019 Communote team. All rights reserved.