Class ComponentImpl
- java.lang.Object
-
- org.apache.sling.cms.core.internal.models.ComponentImpl
-
- All Implemented Interfaces:
Component
@Model(adaptables=org.apache.sling.api.resource.Resource.class, adapters=org.apache.sling.cms.Component.class) public class ComponentImpl extends Object implements ComponentA model representing a sling:Component
-
-
Constructor Summary
Constructors Constructor Description ComponentImpl(org.apache.sling.api.resource.Resource resource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)String[]getComponentType()StringgetEditPath()Returns the path for the editor for this resource if availableorg.apache.sling.api.resource.ResourcegetEditResource()Returns the resource for the editor for this resource if availableorg.apache.sling.api.resource.ResourcegetResource()StringgetTitle()inthashCode()booleanisContainer()booleanisEditable()booleanisReloadPage()booleanisType(String type)Returns true if the only component type on the component is the specified type.StringtoString()
-
-
-
Method Detail
-
getComponentType
public String[] getComponentType()
- Specified by:
getComponentTypein interfaceComponent- Returns:
- the componentType
-
getEditPath
public String getEditPath()
Returns the path for the editor for this resource if available- Specified by:
getEditPathin interfaceComponent- Returns:
- the editor path or null
-
getEditResource
public org.apache.sling.api.resource.Resource getEditResource()
Returns the resource for the editor for this resource if available- Specified by:
getEditResourcein interfaceComponent- Returns:
- the editor resource or null
-
getResource
public org.apache.sling.api.resource.Resource getResource()
- Specified by:
getResourcein interfaceComponent- Returns:
- the resource
-
isContainer
public boolean isContainer()
- Specified by:
isContainerin interfaceComponent
-
isEditable
public boolean isEditable()
- Specified by:
isEditablein interfaceComponent
-
isReloadPage
public boolean isReloadPage()
- Specified by:
isReloadPagein interfaceComponent
-
isType
public boolean isType(String type)
Returns true if the only component type on the component is the specified type.
-
-