public interface UIService extends Service
TurbineUI
to access skin properties from your screen
classes and action code. UITool is provided as a pull tool for accessing
skin properties from your templates.
Skins are lazy loaded in that they are not loaded until first used.
Modifier and Type | Field and Description |
---|---|
static String |
SERVICE_NAME
The service identifier.
|
Modifier and Type | Method and Description |
---|---|
String |
get(String key)
Retrieve a skin property from the default skin for the webapp.
|
String |
get(String skinName,
String key)
Retrieve a skin property from the named skin.
|
String |
getScript(String skinName,
String filename)
Retrieve the URL for a given script that is part of a skin.
|
String |
getScript(String skinName,
String filename,
ServerData serverData)
Retrieve the URL for a given script that is part of a skin.
|
String[] |
getSkinNames()
Provide access to the list of available skin names.
|
String |
getStylecss(String skinName)
Retrieve the URL for the style sheet that is part of a skin.
|
String |
getStylecss(String skinName,
ServerData serverData)
Retrieve the URL for the style sheet that is part of a skin.
|
String |
getWebappSkinName()
Get the name of the default skin name for the web application from the
TurbineResources.properties file.
|
String |
image(String skinName,
String imageId)
Retrieve the URL for an image that is part of a skin.
|
String |
image(String skinName,
String imageId,
ServerData serverData)
Retrieve the URL for an image that is part of a skin.
|
void |
refresh()
Refresh all skins.
|
void |
refresh(String skinName)
Refresh a particular skin.
|
getConfiguration, getName, getProperties, setName, setServiceBroker
static final String SERVICE_NAME
void refresh()
void refresh(String skinName)
skinName
- the name of the skin to clear.String[] getSkinNames()
String getWebappSkinName()
String get(String skinName, String key)
null
will be returned.skinName
- the name of the skin to retrieve the property from.key
- the key to retrieve from the skin.null
,
depending on whether or not the property or skins exist.String get(String key)
null
will be returned.key
- the key to retrieve.null
, depending on
whether or not the property or skins exist.String image(String skinName, String imageId, ServerData serverData)
Use this if for some reason your server name, server scheme, or server port change on a per request basis. I'm not sure if this would happen in a load balanced situation. I think in most cases the image(String image) method would probably be enough, but I'm not absolutely positive.
skinName
- the name of the skin to retrieve the image from.imageId
- the id of the image whose URL will be generated.serverData
- the serverData to use as the basis for the URL.String image(String skinName, String imageId)
skinName
- the name of the skin to retrieve the image from.imageId
- the id of the image whose URL will be generated.String getStylecss(String skinName, ServerData serverData)
Use this if for some reason your server name, server scheme, or server port change on a per request basis. I'm not sure if this would happen in a load balanced situation. I think in most cases the style() method would probably be enough, but I'm not absolutely positive.
skinName
- the name of the skin to retrieve the style sheet from.serverData
- the serverData to use as the basis for the URL.String getStylecss(String skinName)
skinName
- the name of the skin to retrieve the style sheet from.String getScript(String skinName, String filename, ServerData serverData)
Use this if for some reason your server name, server scheme, or server port change on a per request basis. I'm not sure if this would happen in a load balanced situation. I think in most cases the style() method would probably be enough, but I'm not absolutely positive.
skinName
- the name of the skin to retrieve the image from.filename
- the name of the script file.serverData
- the serverData to use as the basis for the URL.String getScript(String skinName, String filename)
skinName
- the name of the skin to retrieve the image from.filename
- the name of the script file.Copyright © 2000-2015 The Apache Software Foundation. All Rights Reserved.