public class PluginPropertyServiceImpl extends Object implements PluginPropertyService
PluginPropertyService
Constructor and Description |
---|
PluginPropertyServiceImpl(String symbolicName)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Map<String,String> |
getAllApplicationProperties()
Returns all application properties for this bundle.
|
Map<String,String> |
getAllApplicationProperties(String symbolicName)
Returns all application properties for the given bundle.
|
Map<String,String> |
getAllClientProperties()
Returns all client properties for this bundle.
|
Map<String,String> |
getAllClientProperties(String symbolicName)
Returns all client properties for the given bundle.
|
String |
getApplicationProperty(String key)
Returns an application property for this bundle.
|
String |
getApplicationProperty(String symbolicName,
String key)
Returns an application property for a specific bundle.
|
String |
getApplicationPropertyWithDefault(String key,
String defaultValue)
Returns an application property for this bundle.
|
String |
getApplicationPropertyWithDefault(String symbolicName,
String key,
String defaultValue)
Returns an application property for a specific bundle with default value.
|
String |
getClientProperty(String key)
Returns a property within the current clients scope.
|
String |
getClientProperty(String symbolicName,
String key)
Returns a property within the current clients scope for the given bundle.
|
<T extends Serializable> |
getClientPropertyAsObject(String key,
Class<T> clazz)
Returns an instance of the given object.
|
<T extends Serializable> |
getClientPropertyAsObject(String symbolicName,
String key,
Class<T> clazz)
Returns a property within the current clients scope for the given bundle.
|
String |
getClientPropertyWithDefault(String key,
String defaultValue)
* Returns a property within the current clients scope.
|
String |
getClientPropertyWithDefault(String symbolicName,
String key,
String defaultValue)
Returns a property within the current clients scope for the given bundle.
|
void |
setApplicationProperty(String key,
String value)
Sets an application property.
|
void |
setClientProperty(String key,
String value)
Sets a client property.
|
void |
setClientPropertyAsObject(String key,
Serializable value)
Sets a client property from an object.
|
public PluginPropertyServiceImpl(String symbolicName)
symbolicName
- Symbolic name for the concrete service.public Map<String,String> getAllApplicationProperties()
getAllApplicationProperties
in interface PluginPropertyService
public Map<String,String> getAllApplicationProperties(String symbolicName)
getAllApplicationProperties
in interface PluginPropertyService
symbolicName
- Symbolic name of the bundle.public Map<String,String> getAllClientProperties()
getAllClientProperties
in interface PluginPropertyService
public Map<String,String> getAllClientProperties(String symbolicName)
getAllClientProperties
in interface PluginPropertyService
symbolicName
- Symbolic name of the bundle.public String getApplicationProperty(String key) throws PluginPropertyServiceException
PluginPropertyService
getApplicationProperty
in interface PluginPropertyService
key
- The key of the property.PluginPropertyServiceException
- Exception.public String getApplicationProperty(String symbolicName, String key) throws PluginPropertyServiceException
getApplicationProperty
in interface PluginPropertyService
symbolicName
- Symbolic name of the bundle, the property should be read from.key
- The key of the property.PluginPropertyServiceException
public String getApplicationPropertyWithDefault(String key, String defaultValue) throws PluginPropertyServiceException
getApplicationPropertyWithDefault
in interface PluginPropertyService
key
- The key of the property.defaultValue
- The default value.PluginPropertyServiceException
public String getApplicationPropertyWithDefault(String symbolicName, String key, String defaultValue) throws PluginPropertyServiceException
getApplicationPropertyWithDefault
in interface PluginPropertyService
symbolicName
- Symbolic name of the bundle.key
- The key of the property.defaultValue
- The default value.PluginPropertyServiceException
- Exception.public String getClientProperty(String key)
getClientProperty
in interface PluginPropertyService
key
- The key of the property.public String getClientProperty(String symbolicName, String key)
getClientProperty
in interface PluginPropertyService
symbolicName
- Symbolic name of the bundle to use.key
- The key of the property.public <T extends Serializable> T getClientPropertyAsObject(String key, Class<T> clazz) throws PluginPropertyServiceException
getClientPropertyAsObject
in interface PluginPropertyService
T
- Type of the value.key
- The key of the property.clazz
- Class containing the result type.PluginPropertyServiceException
- Exception.public <T extends Serializable> T getClientPropertyAsObject(String symbolicName, String key, Class<T> clazz) throws PluginPropertyServiceException
getClientPropertyAsObject
in interface PluginPropertyService
T
- Type of the value.symbolicName
- Symbolic name of the bundle to use.key
- The key of the property.clazz
- Class containing the result type.PluginPropertyServiceException
- Exception..public String getClientPropertyWithDefault(String key, String defaultValue)
getClientPropertyWithDefault
in interface PluginPropertyService
key
- The key of the property.defaultValue
- The default value.public String getClientPropertyWithDefault(String symbolicName, String key, String defaultValue)
getClientPropertyWithDefault
in interface PluginPropertyService
symbolicName
- Symbolic name of the bundle to use.key
- The key of the property.defaultValue
- The default value.public void setApplicationProperty(String key, String value) throws AuthorizationException
PluginPropertyService
setApplicationProperty
in interface PluginPropertyService
key
- The key of the property.value
- The value of the property.AuthorizationException
- in case the current client is not the global clientpublic void setClientProperty(String key, String value)
setClientProperty
in interface PluginPropertyService
key
- The key of the property.value
- The value. Set this to "null" to delete the property.public void setClientPropertyAsObject(String key, Serializable value) throws PluginPropertyServiceException
setClientPropertyAsObject
in interface PluginPropertyService
key
- The key of the property.value
- The value. Set this to "null" to delete the property.PluginPropertyServiceException
- Exception.Copyright © 2019 Communote team. All rights reserved.