what is difference between adaptables and adapters in aem
해결되었습니다! 솔루션으로 이동.
토픽은 커뮤니티 콘텐츠를 분류하여 관련성 있는 콘텐츠를 찾는 데 도움이 됩니다.
조회 수
답글
좋아요 수
Adapters define the behavior and structure that Adaptables are converted to.
An Adaptable is an object that can be "adapted" into another type.
Purpose: It provides a flexible way to convert an object of one type into another type that may be required in a particular context.
Example:
SlingHttpServletRequest
Resource
Page
An Adapter is the target type that an Adaptable can be converted into.
Purpose: Adapters are the interfaces or classes into which an Adaptable can be transformed.
Example:
ValueMap
ResourceResolver
Adaptable is source objects that can be adapted, for example Resource.
Adapter is the Target object produced after adaptation, for example, Page.
Call .adaptTo(Class) on an Adaptable, where the result of that method is Adapter.
Adapters define the behavior and structure that Adaptables are converted to.
An Adaptable is an object that can be "adapted" into another type.
Purpose: It provides a flexible way to convert an object of one type into another type that may be required in a particular context.
Example:
SlingHttpServletRequest
Resource
Page
An Adapter is the target type that an Adaptable can be converted into.
Purpose: Adapters are the interfaces or classes into which an Adaptable can be transformed.
Example:
ValueMap
ResourceResolver
In AEM:
In short: Adaptables are objects that can be adapted; adapters are the logic that performs the adaptation.