public final class MockComponentContext extends Object implements com.day.cq.wcm.api.components.ComponentContext
ComponentContext.| Constructor and Description |
|---|
MockComponentContext(@NotNull com.day.cq.wcm.api.Page currentPage,
@NotNull org.apache.sling.api.SlingHttpServletRequest request) |
| Modifier and Type | Method and Description |
|---|---|
com.day.cq.wcm.api.components.AnalyzeContext |
getAnalyzeContext() |
Object |
getAttribute(String name) |
com.day.cq.wcm.api.designer.Cell |
getCell() |
com.day.cq.wcm.api.components.Component |
getComponent() |
Set<String> |
getCssClassNames() |
String |
getDecorationTagName() |
String |
getDefaultDecorationTagName() |
com.day.cq.wcm.api.components.EditContext |
getEditContext() |
com.day.cq.wcm.api.Page |
getPage() |
com.day.cq.wcm.api.components.ComponentContext |
getParent() |
org.apache.sling.api.resource.Resource |
getResource() |
com.day.cq.wcm.api.components.ComponentContext |
getRoot() |
boolean |
hasDecoration() |
boolean |
isRoot() |
Object |
setAttribute(String name,
Object value) |
void |
setCell(com.day.cq.wcm.api.designer.Cell cell) |
void |
setCssClassNames(Set<String> cssClassNames) |
void |
setDecorate(boolean decorate) |
void |
setDecorationTagName(String value) |
void |
setDefaultDecorationTagName(String value) |
public MockComponentContext(@NotNull
@NotNull com.day.cq.wcm.api.Page currentPage,
@NotNull
@NotNull org.apache.sling.api.SlingHttpServletRequest request)
currentPage - Current pagerequest - Requestpublic com.day.cq.wcm.api.Page getPage()
getPage in interface com.day.cq.wcm.api.components.ComponentContextpublic org.apache.sling.api.resource.Resource getResource()
getResource in interface com.day.cq.wcm.api.components.ComponentContextpublic com.day.cq.wcm.api.components.Component getComponent()
getComponent in interface com.day.cq.wcm.api.components.ComponentContextpublic Object getAttribute(String name)
getAttribute in interface com.day.cq.wcm.api.components.ComponentContextpublic Object setAttribute(String name, Object value)
setAttribute in interface com.day.cq.wcm.api.components.ComponentContextpublic boolean hasDecoration()
hasDecoration in interface com.day.cq.wcm.api.components.ComponentContextpublic void setDecorate(boolean decorate)
setDecorate in interface com.day.cq.wcm.api.components.ComponentContextpublic String getDecorationTagName()
getDecorationTagName in interface com.day.cq.wcm.api.components.ComponentContextpublic void setDecorationTagName(String value)
setDecorationTagName in interface com.day.cq.wcm.api.components.ComponentContextpublic String getDefaultDecorationTagName()
getDefaultDecorationTagName in interface com.day.cq.wcm.api.components.ComponentContextpublic void setDefaultDecorationTagName(String value)
setDefaultDecorationTagName in interface com.day.cq.wcm.api.components.ComponentContextpublic com.day.cq.wcm.api.components.EditContext getEditContext()
getEditContext in interface com.day.cq.wcm.api.components.ComponentContextpublic com.day.cq.wcm.api.designer.Cell getCell()
getCell in interface com.day.cq.wcm.api.components.ComponentContextpublic void setCell(com.day.cq.wcm.api.designer.Cell cell)
public Set<String> getCssClassNames()
getCssClassNames in interface com.day.cq.wcm.api.components.ComponentContextpublic com.day.cq.wcm.api.components.ComponentContext getParent()
getParent in interface com.day.cq.wcm.api.components.ComponentContextpublic com.day.cq.wcm.api.components.ComponentContext getRoot()
getRoot in interface com.day.cq.wcm.api.components.ComponentContextpublic boolean isRoot()
isRoot in interface com.day.cq.wcm.api.components.ComponentContextpublic com.day.cq.wcm.api.components.AnalyzeContext getAnalyzeContext()
getAnalyzeContext in interface com.day.cq.wcm.api.components.ComponentContextCopyright © 2014–2020 wcm.io. All rights reserved.