public interface WebCmsComponentModelService
WebCmsComponentModels.| Modifier and Type | Method and Description |
|---|---|
WebCmsComponentModelSet |
buildComponentModelSetForOwner(WebCmsObject object,
boolean eager)
Build a
WebCmsComponentModelSet for all components owned by the WebCmsObject,
and attached to the current domain. |
WebCmsComponentModelSet |
buildComponentModelSetForOwner(WebCmsObject object,
WebCmsDomain domain,
boolean eager)
Build a
WebCmsComponentModelSet for all components owned by the WebCmsObject,
and attached to the specified domain. |
WebCmsComponentModel |
buildModelForComponent(WebCmsComponent component)
Build the
WebCmsComponentModel for a particular WebCmsComponent entity. |
<U extends WebCmsComponentModel> |
buildModelForComponent(WebCmsComponent component,
Class<U> expectedType)
Build the
WebCmsComponentModel for a particular WebCmsComponent entity. |
<U extends WebCmsComponentModel> |
createComponentModel(String componentTypeKey,
Class<U> expectedType)
Create a new component model for a specific component type.
|
<U extends WebCmsComponentModel> |
createComponentModel(String componentTypeKey,
WebCmsDomain domain,
Class<U> expectedType)
Create a new component model for a specific component type on the specified domain.
|
<U extends WebCmsComponentModel> |
createComponentModel(WebCmsComponentType componentType,
Class<U> expectedType)
Create a new component model for a specific component type, on the current domain.
|
WebCmsComponentModel |
getComponentModel(String objectId)
Get the component model for a specific
WebCmsComponent identified by its object id. |
<U extends WebCmsComponentModel> |
getComponentModel(String objectId,
Class<U> expectedType)
Get the component model for a specific
WebCmsComponent identified by its object id. |
WebCmsComponentModel |
getComponentModelByName(String componentName,
WebCmsObject owner)
Get a single
WebCmsComponentModel for a specific owner by name. |
<U extends WebCmsComponentModel> |
getComponentModelByName(String componentName,
WebCmsObject owner,
Class<U> expectedType)
Get a single
WebCmsComponentModel by name. |
WebCmsComponentModel |
getComponentModelByNameAndDomain(String componentName,
WebCmsObject owner,
WebCmsDomain domain)
Get a single
WebCmsComponentModel for a specific owner by name and domain. |
<U extends WebCmsComponentModel> |
getComponentModelByNameAndDomain(String componentName,
WebCmsObject owner,
WebCmsDomain domain,
Class<U> expectedType)
Get a single
WebCmsComponentModel for a specific owner by name and domain. |
Collection<WebCmsComponentModel> |
getComponentModelsForOwner(WebCmsObject object)
Return all components owned by the
WebCmsObject on the current domain, according to their sort order. |
Collection<WebCmsComponentModel> |
getComponentModelsForOwner(WebCmsObject object,
WebCmsDomain domain)
Return all components owned by the
WebCmsObject on the specific domain, according to their sort order. |
WebCmsComponentType |
getComponentType(String componentTypeKey)
Get the component type represented by the type key.
|
WebCmsComponentType |
getComponentType(String componentTypeKey,
WebCmsDomain domain)
Get the component type represented by the type key on the specified domain.
|
WebCmsComponent |
save(WebCmsComponent component)
Save a
WebCmsComponent to the repository. |
WebCmsComponent |
save(WebCmsComponentModel componentModel)
Save a
WebCmsComponentModel to the repository. |
WebCmsComponentType getComponentType(String componentTypeKey)
componentTypeKey - type keynull if not foundWebCmsComponentType getComponentType(String componentTypeKey, WebCmsDomain domain)
componentTypeKey - type keydomain - to scannull if not found<U extends WebCmsComponentModel> U createComponentModel(String componentTypeKey, Class<U> expectedType)
componentTypeKey - to create model forexpectedType - type to coerce to<U extends WebCmsComponentModel> U createComponentModel(String componentTypeKey, WebCmsDomain domain, Class<U> expectedType)
componentTypeKey - to create model forexpectedType - type to coerce to<U extends WebCmsComponentModel> U createComponentModel(WebCmsComponentType componentType, Class<U> expectedType)
componentType - to create model forexpectedType - type to coerce toWebCmsComponentModel getComponentModel(String objectId)
WebCmsComponent identified by its object id.objectId - of the componentnull if not a valid component<U extends WebCmsComponentModel> U getComponentModel(String objectId, Class<U> expectedType)
WebCmsComponent identified by its object id.objectId - of the componentexpectedType - type to coerce tonull if not a valid componentWebCmsComponentModel getComponentModelByName(String componentName, WebCmsObject owner)
WebCmsComponentModel for a specific owner by name.
Calls getComponentModelByNameAndDomain(String, WebCmsObject, WebCmsDomain) with the
domain of the owner object, if it is an instance of WebCmsComponentType, otherwise with the
domain provided by com.foreach.across.modules.webcms.domain.domain.WebCmsMultiDomainService#getCurrentDomainForType(Class) .componentName - name of the componentowner - of the componentWebCmsComponentModel getComponentModelByNameAndDomain(String componentName, WebCmsObject owner, WebCmsDomain domain)
WebCmsComponentModel for a specific owner by name and domain.componentName - name of the componentowner - of the componentdomain - domain of the component<U extends WebCmsComponentModel> U getComponentModelByName(String componentName, WebCmsObject owner, Class<U> expectedType)
WebCmsComponentModel by name.
Will use the context-bound domain to lookup the component.componentName - name of the componentowner - of the componentexpectedType - type to coerce to<U extends WebCmsComponentModel> U getComponentModelByNameAndDomain(String componentName, WebCmsObject owner, WebCmsDomain domain, Class<U> expectedType)
WebCmsComponentModel for a specific owner by name and domain.componentName - name of the componentowner - of the componentdomain - domain of the componentexpectedType - type to coerce toCollection<WebCmsComponentModel> getComponentModelsForOwner(WebCmsObject object)
WebCmsObject on the current domain, according to their sort order.object - ownerCollection<WebCmsComponentModel> getComponentModelsForOwner(WebCmsObject object, WebCmsDomain domain)
WebCmsObject on the specific domain, according to their sort order.object - ownerdomain - the components should be attached toWebCmsComponentModelSet buildComponentModelSetForOwner(WebCmsObject object, boolean eager)
WebCmsComponentModelSet for all components owned by the WebCmsObject,
and attached to the current domain.
The returned set only contains components with a configured name.
object - ownereager - true if component models should all be fetched eagerly,
if false the set will only fetch the component when it is being requestedWebCmsComponentModelSet buildComponentModelSetForOwner(WebCmsObject object, WebCmsDomain domain, boolean eager)
WebCmsComponentModelSet for all components owned by the WebCmsObject,
and attached to the specified domain.
The returned set only contains components with a configured name.
object - ownerdomain - the components should be attached toeager - true if component models should all be fetched eagerly,
if false the set will only fetch the component when it is being requestedWebCmsComponentModel buildModelForComponent(WebCmsComponent component)
WebCmsComponentModel for a particular WebCmsComponent entity.component - to build the model for<U extends WebCmsComponentModel> U buildModelForComponent(WebCmsComponent component, Class<U> expectedType)
WebCmsComponentModel for a particular WebCmsComponent entity.component - to build the model forexpectedType - type to coerce toWebCmsComponent save(WebCmsComponent component)
WebCmsComponent to the repository. If the component is a new component, this will build the
component model before saving, ensuring support for component templates.component - to saveWebCmsComponent save(WebCmsComponentModel componentModel)
WebCmsComponentModel to the repository.
The return value is the main WebCmsComponent that this model represents.componentModel - to saveCopyright © 2020. All rights reserved.