public final class MockComponentContext
extends java.lang.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() |
java.lang.Object |
getAttribute(java.lang.String name) |
com.day.cq.wcm.api.designer.Cell |
getCell() |
com.day.cq.wcm.api.components.Component |
getComponent() |
java.util.Set<java.lang.String> |
getCssClassNames() |
java.lang.String |
getDecorationTagName() |
java.lang.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() |
java.lang.Object |
setAttribute(java.lang.String name,
java.lang.Object value) |
void |
setCell(com.day.cq.wcm.api.designer.Cell cell) |
void |
setCssClassNames(java.util.Set<java.lang.String> cssClassNames) |
void |
setDecorate(boolean decorate) |
void |
setDecorationTagName(java.lang.String value) |
void |
setDefaultDecorationTagName(java.lang.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.ComponentContext
public org.apache.sling.api.resource.Resource getResource()
getResource
in interface com.day.cq.wcm.api.components.ComponentContext
public com.day.cq.wcm.api.components.Component getComponent()
getComponent
in interface com.day.cq.wcm.api.components.ComponentContext
public java.lang.Object getAttribute(java.lang.String name)
getAttribute
in interface com.day.cq.wcm.api.components.ComponentContext
public java.lang.Object setAttribute(java.lang.String name, java.lang.Object value)
setAttribute
in interface com.day.cq.wcm.api.components.ComponentContext
public boolean hasDecoration()
hasDecoration
in interface com.day.cq.wcm.api.components.ComponentContext
public void setDecorate(boolean decorate)
setDecorate
in interface com.day.cq.wcm.api.components.ComponentContext
public java.lang.String getDecorationTagName()
getDecorationTagName
in interface com.day.cq.wcm.api.components.ComponentContext
public void setDecorationTagName(java.lang.String value)
setDecorationTagName
in interface com.day.cq.wcm.api.components.ComponentContext
public java.lang.String getDefaultDecorationTagName()
getDefaultDecorationTagName
in interface com.day.cq.wcm.api.components.ComponentContext
public void setDefaultDecorationTagName(java.lang.String value)
setDefaultDecorationTagName
in interface com.day.cq.wcm.api.components.ComponentContext
public com.day.cq.wcm.api.components.EditContext getEditContext()
getEditContext
in interface com.day.cq.wcm.api.components.ComponentContext
public com.day.cq.wcm.api.designer.Cell getCell()
getCell
in interface com.day.cq.wcm.api.components.ComponentContext
public void setCell(com.day.cq.wcm.api.designer.Cell cell)
public java.util.Set<java.lang.String> getCssClassNames()
getCssClassNames
in interface com.day.cq.wcm.api.components.ComponentContext
public void setCssClassNames(java.util.Set<java.lang.String> cssClassNames)
public com.day.cq.wcm.api.components.ComponentContext getParent()
getParent
in interface com.day.cq.wcm.api.components.ComponentContext
public com.day.cq.wcm.api.components.ComponentContext getRoot()
getRoot
in interface com.day.cq.wcm.api.components.ComponentContext
public boolean isRoot()
isRoot
in interface com.day.cq.wcm.api.components.ComponentContext
public com.day.cq.wcm.api.components.AnalyzeContext getAnalyzeContext()
getAnalyzeContext
in interface com.day.cq.wcm.api.components.ComponentContext
Copyright © 2014–2021 wcm.io. All rights reserved.