@Service(value="wcmRenderUtils") public class WebCmsRenderUtilityService extends Object
| Constructor and Description |
|---|
WebCmsRenderUtilityService() |
| Modifier and Type | Method and Description |
|---|---|
WebCmsComponentModel |
component(String componentName)
Retrieve a component by name from the default scope.
|
WebCmsComponentModel |
componentFromScope(String componentName,
String scopeName)
Retrieve a component by name from the specified scope.
|
WebCmsComponentModel |
componentFromScope(String componentName,
String scopeName,
boolean searchParentScopes)
Retrieve a component by name from the specified scope.
|
String |
imageUrl(ImageWebCmsComponentModel imageComponent)
Build a url to the original image file of the image configured on a
WebCmsImage. |
String |
imageUrl(ImageWebCmsComponentModel imageComponent,
int boxWidth,
int boxHeight)
Build a url to the image file of the image configured on a
WebCmsImage. |
String |
imageUrl(WebCmsImage image)
Build a url to the original image file of a
WebCmsImage. |
String |
imageUrl(WebCmsImage image,
int boxWidth,
int boxHeight)
Build a url to the image file of the
WebCmsImage. |
WebCmsComponentModel |
member(String componentName,
WebCmsComponentModel container)
Retrieve a container member by name.
|
List<WebCmsComponentModel> |
members(WebCmsComponentModel container)
Retrieve the member components of a container.
|
String |
url(WebCmsAsset asset)
Retrieve the primary URL for a specific asset.
|
public String imageUrl(ImageWebCmsComponentModel imageComponent)
WebCmsImage.imageComponent - that contains the imagenull if no image was presentpublic String imageUrl(ImageWebCmsComponentModel imageComponent, int boxWidth, int boxHeight)
WebCmsImage.
If possible the resulting image should be scaled down to fit in the box dimensions specified.
Note that it depends on the actual WebCmsImageConnector used if this will be the case.imageComponent - that contains the imageboxWidth - image should be scaled down to this maximum widthboxHeight - image should be scaled down to this maximum heightnull if no image was presentpublic String imageUrl(WebCmsImage image)
WebCmsImage.image - to generate the url forpublic String imageUrl(WebCmsImage image, int boxWidth, int boxHeight)
WebCmsImage.
If possible the resulting image should be scaled down to fit in the box dimensions specified.
Note that it depends on the actual WebCmsImageConnector used if this will be the case.image - to generate the url forboxWidth - image should be scaled down to this maximum widthboxHeight - image should be scaled down to this maximum heightpublic WebCmsComponentModel component(String componentName)
componentName - name of the componentnull if not foundpublic WebCmsComponentModel componentFromScope(String componentName, String scopeName)
componentName - name of the componentscopeName - scope in which to search for the componentnull if not foundpublic WebCmsComponentModel componentFromScope(String componentName, String scopeName, boolean searchParentScopes)
componentName - name of the componentscopeName - scope in which to search for the componentsearchParentScopes - should parent scopes be searchednull if not foundpublic WebCmsComponentModel member(String componentName, WebCmsComponentModel container)
null.
If the container is a proxy component, the target component will be investigated.componentName - name of the member componentcontainer - in which to searchnull if not found or container was nullpublic List<WebCmsComponentModel> members(WebCmsComponentModel container)
container - for which to fetch the memberspublic String url(WebCmsAsset asset)
asset - to get the primary URL fornullCopyright © 2020. All rights reserved.