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 Component
A 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 boolean
equals(Object obj)
String[]
getComponentType()
String
getEditPath()
Returns the path for the editor for this resource if availableorg.apache.sling.api.resource.Resource
getEditResource()
Returns the resource for the editor for this resource if availableorg.apache.sling.api.resource.Resource
getResource()
String
getTitle()
int
hashCode()
boolean
isContainer()
boolean
isEditable()
boolean
isReloadPage()
boolean
isType(String type)
Returns true if the only component type on the component is the specified type.String
toString()
-
-
-
Method Detail
-
getComponentType
public String[] getComponentType()
- Specified by:
getComponentType
in interfaceComponent
- Returns:
- the componentType
-
getEditPath
public String getEditPath()
Returns the path for the editor for this resource if available- Specified by:
getEditPath
in 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:
getEditResource
in interfaceComponent
- Returns:
- the editor resource or null
-
getResource
public org.apache.sling.api.resource.Resource getResource()
- Specified by:
getResource
in interfaceComponent
- Returns:
- the resource
-
isContainer
public boolean isContainer()
- Specified by:
isContainer
in interfaceComponent
-
isEditable
public boolean isEditable()
- Specified by:
isEditable
in interfaceComponent
-
isReloadPage
public boolean isReloadPage()
- Specified by:
isReloadPage
in interfaceComponent
-
isType
public boolean isType(String type)
Returns true if the only component type on the component is the specified type.
-
-