Package com.composum.sling.nodes.browser
Class GenericView
- java.lang.Object
-
- com.composum.sling.core.AbstractSlingBean
-
- com.composum.sling.core.AbstractServletBean
-
- com.composum.sling.nodes.console.ConsoleServletBean
-
- com.composum.sling.nodes.browser.GenericView
-
- All Implemented Interfaces:
RestrictedBean
,SlingBean
public class GenericView extends ConsoleServletBean
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.composum.sling.core.AbstractSlingBean
AbstractSlingBean.NodeClosure
-
-
Field Summary
Fields Modifier and Type Field Description protected BrowserViews.View
browserView
-
Fields inherited from class com.composum.sling.core.AbstractSlingBean
context, queryManager, request, resolver, resource, response, session, sling
-
-
Constructor Summary
Constructors Constructor Description GenericView()
GenericView(BeanContext context)
GenericView(BeanContext context, org.apache.sling.api.resource.Resource resource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BrowserViews.View.Content
getContent()
@NotNull String
getFileIcon()
@NotNull String
getFilePath()
@NotNull ResourceHandle
getFileResource()
@NotNull String
getFileType()
@NotNull String
getId()
@NotNull String
getMappedUrl()
@NotNull String
getMimeType()
the content mime type declared for the current resource@NotNull String
getMimeTypeCss()
@NotNull String
getTabResourceType()
BrowserViews.View.Toolbar
getToolbar()
@NotNull String
getUnmappedUrl()
@NotNull String
getViewResourceType()
@NotNull List<BrowserViews.View.Tab>
getViewTabs()
@NotNull String
getViewType()
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
isImage()
'true' if the mimetype is of type imageboolean
isRenderable()
boolean
isVideo()
'true' if the mimetype is of type video-
Methods inherited from class com.composum.sling.core.AbstractServletBean
initialize
-
Methods inherited from class com.composum.sling.core.AbstractSlingBean
executeQuery, findBeans, findNodes, findNodes, findPathList, getContentResource, getDomId, getHasTitle, getInherited, getInherited, getName, getNode, getParent, getParent, getPath, getPermissible, getProperty, getProperty, getQueryManager, getRequest, getResolver, getResource, getResponse, getServiceKey, getSession, getSling, getStringId, getTitle, getType, getUrl, getUsername, isPermissible, isReadAllowed, isWriteAllowed, toString, toString
-
-
-
-
Field Detail
-
browserView
protected BrowserViews.View browserView
-
-
Constructor Detail
-
GenericView
public GenericView(BeanContext context, org.apache.sling.api.resource.Resource resource)
-
GenericView
public GenericView(BeanContext context)
-
GenericView
public GenericView()
-
-
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 classConsoleServletBean
- 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
-
getMappedUrl
@NotNull public @NotNull String getMappedUrl()
-
getUnmappedUrl
@NotNull public @NotNull String getUnmappedUrl()
-
getViewResourceType
@NotNull public @NotNull String getViewResourceType()
-
getTabResourceType
@NotNull public @NotNull String getTabResourceType()
-
getViewTabs
@NotNull public @NotNull List<BrowserViews.View.Tab> getViewTabs()
-
getToolbar
@NotNull public BrowserViews.View.Toolbar getToolbar()
-
getContent
@NotNull public BrowserViews.View.Content getContent()
-
getViewType
@NotNull public @NotNull String getViewType()
-
getFileType
@NotNull public @NotNull String getFileType()
-
getFilePath
@NotNull public @NotNull String getFilePath()
-
getFileResource
@NotNull public @NotNull ResourceHandle getFileResource()
-
isRenderable
public boolean isRenderable()
-
getFileIcon
@NotNull public @NotNull String getFileIcon()
-
getMimeTypeCss
@NotNull public @NotNull String getMimeTypeCss()
-
getMimeType
@NotNull public @NotNull String getMimeType()
the content mime type declared for the current resource
-
isImage
public boolean isImage()
'true' if the mimetype is of type image
-
isVideo
public boolean isVideo()
'true' if the mimetype is of type video
-
-