Package com.composum.sling.nodes.console
Class ConsoleModel
- java.lang.Object
-
- com.composum.sling.core.AbstractSlingBean
-
- com.composum.sling.nodes.console.ConsoleSlingBean
-
- com.composum.sling.nodes.console.ConsolePage
-
- com.composum.sling.nodes.console.ConsoleModel
-
- All Implemented Interfaces:
RestrictedBean
,SlingBean
public class ConsoleModel extends ConsolePage
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
ConsoleModel.LinkModel
-
Nested classes/interfaces inherited from class com.composum.sling.core.AbstractSlingBean
AbstractSlingBean.NodeClosure
-
-
Field Summary
Fields Modifier and Type Field Description protected Consoles.Console
console
-
Fields inherited from class com.composum.sling.nodes.console.ConsolePage
SERVICE_KEY
-
Fields inherited from class com.composum.sling.core.AbstractSlingBean
context, queryManager, request, resolver, resource, response, session, sling
-
-
Constructor Summary
Constructors Constructor Description ConsoleModel()
ConsoleModel(BeanContext context)
ConsoleModel(BeanContext context, Consoles.Console console)
ConsoleModel(BeanContext context, org.apache.sling.api.resource.Resource resource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull String
getContentSrc()
@NotNull String
getDataSet()
@NotNull String
getDescription()
@NotNull String
getId()
@NotNull String
getLabel()
@NotNull ConsoleModel.LinkModel
getLink()
@NotNull String
getLinkAttributes()
@NotNull Collection<ConsoleModel>
getMenuItems()
@NotNull String
getName()
returns the name of the resource wrapped by this bean@NotNull String
getPath()
returns the path of the resource wrapped by this bean@NotNull String
getStaticUrl()
@NotNull String
getUrl()
Returns the URL to the resource of this bean (mapped and with the appropriate extension).void
initialize(BeanContext context, org.apache.sling.api.resource.Resource resource)
This basic initialization sets up the context and resource attributes only, all the other attributes are set 'lazy' during their getter calls.boolean
isMenu()
boolean
isSupportsPermissions()
boolean
isValidMenu()
@NotNull String
toString()
Default implementation: usesAbstractSlingBean.toString(StringBuilder)
.-
Methods inherited from class com.composum.sling.nodes.console.ConsolePage
getCurrentUser, getLogoutUrl, getSystemPermission, getURL, getUserPermission, getWorkspaceName
-
Methods inherited from class com.composum.sling.core.AbstractSlingBean
executeQuery, findBeans, findNodes, findNodes, findPathList, getContentResource, getDomId, getHasTitle, getInherited, getInherited, getNode, getParent, getParent, getPermissible, getProperty, getProperty, getQueryManager, getRequest, getResolver, getResource, getResponse, getServiceKey, getSession, getSling, getStringId, getTitle, getType, getUsername, initialize, isPermissible, isReadAllowed, isWriteAllowed, toString
-
-
-
-
Field Detail
-
console
protected Consoles.Console console
-
-
Constructor Detail
-
ConsoleModel
public ConsoleModel(BeanContext context, Consoles.Console console)
-
ConsoleModel
public ConsoleModel(BeanContext context, org.apache.sling.api.resource.Resource resource)
-
ConsoleModel
public ConsoleModel(BeanContext context)
-
ConsoleModel
public ConsoleModel()
-
-
Method Detail
-
initialize
public void initialize(BeanContext context, org.apache.sling.api.resource.Resource resource)
Description copied from class:AbstractSlingBean
This basic initialization sets up the context and resource attributes only, all the other attributes are set 'lazy' during their getter calls.- Specified by:
initialize
in interfaceSlingBean
- Overrides:
initialize
in classConsoleSlingBean
- Parameters:
context
- the scripting context (e.g. a JSP PageContext or a Groovy scripting context)resource
- the resource to use (normally the resource addressed by the request)- See Also:
BeanContext.withResource(Resource)
-
getId
@NotNull public @NotNull String getId()
- Overrides:
getId
in classAbstractSlingBean
-
getName
@NotNull public @NotNull String getName()
Description copied from interface:SlingBean
returns the name of the resource wrapped by this bean- Specified by:
getName
in interfaceSlingBean
- Overrides:
getName
in classAbstractSlingBean
-
getPath
@NotNull public @NotNull String getPath()
Description copied from interface:SlingBean
returns the path of the resource wrapped by this bean- Specified by:
getPath
in interfaceSlingBean
- Overrides:
getPath
in classAbstractSlingBean
-
getLabel
@NotNull public @NotNull String getLabel()
-
isSupportsPermissions
public boolean isSupportsPermissions()
-
getDescription
@NotNull public @NotNull String getDescription()
-
getContentSrc
@NotNull public @NotNull String getContentSrc()
-
getUrl
@NotNull public @NotNull String getUrl()
Description copied from class:AbstractSlingBean
Returns the URL to the resource of this bean (mapped and with the appropriate extension).- Overrides:
getUrl
in classAbstractSlingBean
- See Also:
LinkUtil.getUrl(SlingHttpServletRequest, String)
-
getStaticUrl
@NotNull public @NotNull String getStaticUrl()
-
getLink
@NotNull public @NotNull ConsoleModel.LinkModel getLink()
-
getLinkAttributes
@NotNull public @NotNull String getLinkAttributes()
-
isMenu
public boolean isMenu()
-
isValidMenu
public boolean isValidMenu()
-
getMenuItems
@NotNull public @NotNull Collection<ConsoleModel> getMenuItems()
-
toString
@NotNull public @NotNull String toString()
Description copied from class:AbstractSlingBean
Default implementation: usesAbstractSlingBean.toString(StringBuilder)
.- Overrides:
toString
in classAbstractSlingBean
- Returns:
- a string representation for debugging.
-
getDataSet
@NotNull public @NotNull String getDataSet()
-
-