public class DefaultIconRepository extends Object implements ConfigurableIconRepository, org.osgi.service.cm.ManagedService
Constructor and Description |
---|
DefaultIconRepository() |
Modifier and Type | Method and Description |
---|---|
void |
addIconMapping(String iconKey,
String iconId)
Adds a custom icon mapping.
|
boolean |
contains(String iconKey)
Verifies if a mapping for the provided icon Key is defined.
|
String |
getSVGIconId(String iconKey)
Maps the provided
iconKey to an SVG id element. |
void |
removeIconMapping(String iconKey)
Removes the given
iconKey from this IconRepository . |
void |
save()
Persists this
IconRepository . |
void |
updated(Dictionary<String,?> properties) |
public boolean contains(String iconKey)
IconRepository
contains
in interface IconRepository
iconKey
- the icon keypublic String getSVGIconId(String iconKey)
IconRepository
iconKey
to an SVG id element.
If no mapping is defined, null
is returned.getSVGIconId
in interface IconRepository
iconKey
- The icon key to look uppublic void addIconMapping(String iconKey, String iconId)
ConfigurableIconRepository
iconKey
must be unique in this IconRepository
.addIconMapping
in interface ConfigurableIconRepository
iconKey
- The icon keyiconId
- The icon id for the icon keypublic void removeIconMapping(String iconKey)
ConfigurableIconRepository
iconKey
from this IconRepository
.removeIconMapping
in interface ConfigurableIconRepository
iconKey
- The icon key to removepublic void save()
ConfigurableIconRepository
IconRepository
.
Should be invoked if changes to this IconRepository
should be persisted permanently (e.g. on disk)save
in interface ConfigurableIconRepository
public void updated(Dictionary<String,?> properties) throws org.osgi.service.cm.ConfigurationException
updated
in interface org.osgi.service.cm.ManagedService
org.osgi.service.cm.ConfigurationException
Copyright © 2018. All rights reserved.