|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.turbine.services.BaseInitable org.apache.turbine.services.BaseService org.apache.turbine.services.TurbineBaseService org.apache.turbine.services.ui.TurbineUIService
The UI service provides for shared access to User Interface (skin) files, as well as the ability for non-default skin files to inherit properties from a default skin. Use 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.
UIService
,
UITool
Field Summary | |
static java.lang.String |
SKIN_PROPERTY_DEFAULT
Default skin name. |
Fields inherited from class org.apache.turbine.services.BaseService |
configuration, name, serviceBroker |
Fields inherited from class org.apache.turbine.services.BaseInitable |
initableBroker, isInitialized |
Fields inherited from interface org.apache.turbine.services.ui.UIService |
SERVICE_NAME |
Constructor Summary | |
TurbineUIService()
|
Method Summary | |
java.lang.String |
get(java.lang.String key)
Retrieve a skin property from the default skin for the webapp. |
java.lang.String |
get(java.lang.String skinName,
java.lang.String key)
Retrieve a skin property from the named skin. |
java.lang.String |
getScript(java.lang.String skinName,
java.lang.String filename)
Retrieve the URL for a given script that is part of a skin. |
java.lang.String |
getScript(java.lang.String skinName,
java.lang.String filename,
ServerData serverData)
Retrieve the URL for a given script that is part of a skin. |
java.lang.String[] |
getSkinNames()
Provide access to the list of available skin names. |
java.lang.String |
getStylecss(java.lang.String skinName)
Retrieve the URL for the style sheet that is part of a skin. |
java.lang.String |
getStylecss(java.lang.String skinName,
ServerData serverData)
Retrieve the URL for the style sheet that is part of a skin. |
java.lang.String |
getWebappSkinName()
Get the name of the default skin name for the web application from the TurbineResources.properties file. |
java.lang.String |
image(java.lang.String skinName,
java.lang.String imageId)
Retrieve the URL for an image that is part of a skin. |
java.lang.String |
image(java.lang.String skinName,
java.lang.String imageId,
ServerData serverData)
Retrieve the URL for an image that is part of a skin. |
void |
init()
Initializes the service. |
void |
refresh()
Refresh the service by clearing all skins. |
void |
refresh(java.lang.String skinName)
Refresh a particular skin by clearing it. |
void |
shutdown()
Returns to uninitialized state. |
Methods inherited from class org.apache.turbine.services.TurbineBaseService |
init, init, init |
Methods inherited from class org.apache.turbine.services.BaseService |
getConfiguration, getName, getProperties, getServiceBroker, setName, setServiceBroker |
Methods inherited from class org.apache.turbine.services.BaseInitable |
getInit, getInitableBroker, setInit, setInitableBroker |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.turbine.services.Service |
getConfiguration, getName, getProperties, setName, setServiceBroker |
Methods inherited from interface org.apache.turbine.services.Initable |
getInit, init, setInitableBroker |
Field Detail |
public static final java.lang.String SKIN_PROPERTY_DEFAULT
Constructor Detail |
public TurbineUIService()
Method Detail |
public void refresh()
refresh
in interface UIService
public void refresh(java.lang.String skinName)
refresh
in interface UIService
skinName
- the name of the skin to clear.public java.lang.String get(java.lang.String skinName, java.lang.String key)
null
will be returned.
get
in interface UIService
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.public java.lang.String get(java.lang.String key)
null
will be returned.
get
in interface UIService
key
- the key to retrieve.
null
, depending on
whether or not the property or skins exist.public java.lang.String[] getSkinNames()
getSkinNames
in interface UIService
public java.lang.String getWebappSkinName()
getWebappSkinName
in interface UIService
public java.lang.String image(java.lang.String skinName, java.lang.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.
image
in interface UIService
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.public java.lang.String image(java.lang.String skinName, java.lang.String imageId)
image
in interface UIService
skinName
- the name of the skin to retrieve the image from.imageId
- the id of the image whose URL will be generated.public java.lang.String getStylecss(java.lang.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.
getStylecss
in interface UIService
skinName
- the name of the skin to retrieve the style sheet from.serverData
- the serverData to use as the basis for the URL.public java.lang.String getStylecss(java.lang.String skinName)
getStylecss
in interface UIService
skinName
- the name of the skin to retrieve the style sheet from.public java.lang.String getScript(java.lang.String skinName, java.lang.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.
getScript
in interface UIService
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.public java.lang.String getScript(java.lang.String skinName, java.lang.String filename)
getScript
in interface UIService
skinName
- the name of the skin to retrieve the image from.filename
- the name of the script file.public void init() throws InitializationException
init
in interface Initable
init
in class TurbineBaseService
InitializationException
public void shutdown()
shutdown
in interface Initable
shutdown
in class TurbineBaseService
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |