|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.cpl.service.IlpDefaultImageRepository
public class IlpDefaultImageRepository
Default implementation of the IlpImageRepository.
| Constructor Summary | |
|---|---|
IlpDefaultImageRepository(IlpContext context)
Creates an image repository. |
|
IlpDefaultImageRepository(IlpContext context,
String defaultImageName)
Creates an image repository. |
|
| Method Summary | |
|---|---|
protected Image |
createDefaultImage()
Creates a default image, which is used when a requested image can not be resolved. |
protected IlpContext |
getContext()
Returns the application context. |
Image |
getImage(String location)
Gets an image by location. |
String |
getImageLocation(Image image)
Gets the location string associated with an image in the repository. |
List |
getImageLocations()
Gets a list of all the image locations currently in the repository. |
URL |
getImageURL(Image image)
Gets the location of an image in the repository as a URL. |
protected Image |
getLocalImage(String location)
Returns the image that corresponds to the given location, if it is already loaded, otherwise returns null |
protected Map |
getRepository()
Accessor to repository for test purpose |
void |
removeImage(String location)
Removes an image from the repository. |
protected void |
setLocalImage(String location,
Image im)
Registers the given image. |
protected void |
setRepository(Map map)
Setter for repository for test purpose |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IlpDefaultImageRepository(IlpContext context)
context - The service context used to get the URL Access service used by
the repository to load data.
public IlpDefaultImageRepository(IlpContext context,
String defaultImageName)
context - The service context used to get the URL Access service used by
the repository to load data.defaultImageName - The name of the default image used if an image cannot be loaded.| Method Detail |
|---|
protected IlpContext getContext()
protected Image getLocalImage(String location)
null
protected void setLocalImage(String location,
Image im)
location - Image locationim - Imagepublic Image getImage(String location)
getImage in interface IlpImageRepositorylocation - Relative path of the image.
public String getImageLocation(Image image)
null otherwise.
getImageLocation in interface IlpImageRepositoryimage - The image to search for.
null if the image was
not found.public List getImageLocations()
getImageLocations in interface IlpImageRepositoryString instances for the images
currently in the repository.public URL getImageURL(Image image)
null otherwise.
getImageURL in interface IlpImageRepositoryimage - The image to search for.
null if the image was
not found.public void removeImage(String location)
removeImage in interface IlpImageRepositorylocation - Location string associated with the image to be removed.protected Image createDefaultImage()
protected Map getRepository()
protected void setRepository(Map map)
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||