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.ViewbrowserView-
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.ContentgetContent()@NotNull StringgetFileIcon()@NotNull StringgetFilePath()@NotNull ResourceHandlegetFileResource()@NotNull StringgetFileType()@NotNull StringgetId()@NotNull StringgetMappedUrl()@NotNull StringgetMimeType()the content mime type declared for the current resource@NotNull StringgetMimeTypeCss()@NotNull StringgetTabResourceType()BrowserViews.View.ToolbargetToolbar()@NotNull StringgetUnmappedUrl()@NotNull StringgetViewResourceType()@NotNull List<BrowserViews.View.Tab>getViewTabs()@NotNull StringgetViewType()voidinitialize(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.booleanisImage()'true' if the mimetype is of type imagebooleanisRenderable()booleanisVideo()'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:AbstractSlingBeanThis basic initialization sets up the context and resource attributes only, all the other attributes are set 'lazy' during their getter calls.- Specified by:
initializein interfaceSlingBean- Overrides:
initializein 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:
getIdin 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
-
-