Package com.composum.sling.core
Class ResourceModel
- java.lang.Object
-
- com.composum.sling.core.AbstractSlingBean
-
- com.composum.sling.core.ResourceModel
-
- All Implemented Interfaces:
RestrictedBean
,SlingBean
public class ResourceModel extends AbstractSlingBean
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
ResourceModel.GenericMap
class
ResourceModel.GenericProperty
-
Nested classes/interfaces inherited from class com.composum.sling.core.AbstractSlingBean
AbstractSlingBean.NodeClosure
-
-
Field Summary
Fields Modifier and Type Field Description static String
SERVICE_KEY
-
Fields inherited from class com.composum.sling.core.AbstractSlingBean
context, queryManager, request, resolver, resource, response, session, sling
-
-
Constructor Summary
Constructors Constructor Description ResourceModel()
if this constructor is used, the bean must be initialized using the 'initialize' method!ResourceModel(BeanContext context)
initialize bean using the context with the 'resource' attribute withinResourceModel(BeanContext context, org.apache.sling.api.resource.Resource resource)
initialize bean using the context an the resource given explicitly
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull org.apache.sling.api.resource.ValueMap
getProperty()
<T> T
getProperty(String name, Class<T> type)
<T> T
getProperty(String name, T defaultValue)
org.apache.sling.api.resource.ValueMap
getValues()
-
Methods inherited from class com.composum.sling.core.AbstractSlingBean
executeQuery, findBeans, findNodes, findNodes, findPathList, getContentResource, getDomId, getHasTitle, getId, getInherited, getInherited, getName, getNode, getParent, getParent, getPath, getPermissible, getQueryManager, getRequest, getResolver, getResource, getResponse, getServiceKey, getSession, getSling, getStringId, getTitle, getType, getUrl, getUsername, initialize, initialize, isPermissible, isReadAllowed, isWriteAllowed, toString, toString
-
-
-
-
Field Detail
-
SERVICE_KEY
public static final String SERVICE_KEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ResourceModel
public ResourceModel(BeanContext context, org.apache.sling.api.resource.Resource resource)
initialize bean using the context an the resource given explicitly
-
ResourceModel
public ResourceModel(BeanContext context)
initialize bean using the context with the 'resource' attribute within
-
ResourceModel
public ResourceModel()
if this constructor is used, the bean must be initialized using the 'initialize' method!
-
-
Method Detail
-
getProperty
public <T> T getProperty(String name, T defaultValue)
- Overrides:
getProperty
in classAbstractSlingBean
-
getProperty
public <T> T getProperty(String name, Class<T> type)
- Overrides:
getProperty
in classAbstractSlingBean
-
getValues
public org.apache.sling.api.resource.ValueMap getValues()
-
getProperty
@NotNull public @NotNull org.apache.sling.api.resource.ValueMap getProperty()
-
-