Provided classes - 3.1

Below table lists what objects are provided by Slice v. 3.1.0 out of the box. Please note that some objects are available only if they are declared with binding annotation (it especially concerns String objects). There are also objects available both with and without annotation, e.g. org.apache.sling.api.resource.Resource.

The CQ related objects are available only when Slice CQ Addons are provided.

ClassBinding annotationDescriptionModule
Guice
com.google.inject.Injector-Injector which is used 
Slice
com.cognifide.slice.api.provider.ModelProvider-Default implementation of ModelProviderSliceModule
com.cognifide.slice.api.provider.ChildrenProvider-Default implementation of ChildrenProvider 
com.cognifide.slice.api.provider.ClassToKeyMapper-Default implementation of ClassToKeyMapper 
com.cognifide.slice.api.context.ContextFactory-  
org.apache.sling.api.resource.Resourcecom.cognifide.slice.api.qualifier.RequestedResourceoriginally requested resource. Please note that it doesn't correspond to request.getResource(), because this method returns different resources for each component included by cq:include tag. 
java.lang.Stringcom.cognifide.slice.api.qualifier.RequestedResourcePathpath of originally requested resource. 
java.lang.Stringcom.cognifide.slice.api.qualifier.CurrentResourcePathpath of current resource, i.e. resource from the top of Execution stack. Usually, a resource of currently included component. 
java.lang.Stringcom.cognifide.slice.api.qualifier.InjectorNameA name under which the injector is registered. 
com.cognifide.slice.api.execution.ExecutionContextStack-Execution stack. It should not be used outside of Slice 
com.cognifide.slice.api.link.LinkBuilderFactory-Default LinkBuilderFactory which is used for obtaining LinkBuilderLinkModule
com.cognifide.slice.api.link.LinkExternalizer-

Default implementation of LinkExternalizer

 
com.cognifide.slice.api.link.PathMapper-Default implementation of PathMapper 
com.cognifide.slice.api.context.ContextProviderFactory-Default implementation of ContextProviderFactoryContextModule
Sling
javax.servlet.ServletRequest-ServletRequest associated with current processingSlingModule
javax.servlet.ServletResponse-ServletResponse associated with current processing 
org.apache.sling.api.SlingHttpServletRequest-Sling request associated with current processing 
org.apache.sling.api.SlingHttpServletResponse-Sling response associated with current processing 
org.apache.sling.api.resource.Resource-Current resource, i.e. resource from the top of Execution stack 
org.apache.sling.api.resource.ResourceResolver-ResourceResolver associated with current user session (request) 
org.apache.sling.api.request.RequestPathInfo-RequestPathInfo object associated with request 
java.lang.Stringcom.cognifide.slice.api.qualifier.ExtensionRequest extension in terms of Sling nomenclature 
java.lang.Stringcom.cognifide.slice.api.qualifier.SuffixRequest suffix in terms of Sling nomenclature 
java.lang.String[]com.cognifide.slice.api.qualifier.SelectorsAn array of all selectors of the request. If request has no selectors, empty array is returned. 
java.util.List<String>com.cognifide.slice.api.qualifier.SelectorsList of all selectors of the request. If request has no selectors, empty list is returned. 
java.lang.Stringcom.cognifide.slice.api.qualifier.SelectorStringSelector string in terms of Sling nomenclature. null if request has no selectors. 
JCR
javax.jcr.query.QueryManager-JCR's QueryManagerJcrModule
CQ
com.cognifide.slice.mapper.api.Mapper-Mapper containing all processors and post processors available in SliceCQMapperModule
com.cognifide.slice.cq.PageChildrenProvider-Default implementation of PageChildrenProviderCQModule
com.day.cq.wcm.api.PageManager-CQ's PageManager 
com.day.cq.wcm.api.Pagecom.cognifide.slice.cq.qualifier.CurrentPageA page which contains current resource. It doesn't have to correspond to requested page.CurrentPageModule
java.lang.Stringcom.cognifide.slice.cq.qualifier.CurrentPagePathPath to a current page 
com.day.cq.wcm.api.Pagecom.cognifide.slice.cq.qualifier.RequestedPageA page which contains originally requested resource.RequestedPageModule
java.lang.Stringcom.cognifide.slice.cq.qualifier.RequestedPagePathPath to a requested page 
com.cognifide.slice.api.link.Linkcom.cognifide.slice.cq.qualifier.RequestedLinkLink which corresponds to original requestLinkModule
com.day.cq.dam.api.Asset-Asset adapted from current resource. null, if current resource is not an asset.DamModule
com.day.cq.wcm.api.WCMMode-Current WCMMode assigned with the requestCQModule
java.lang.Stringcom.cognifide.slice.cq.qualifier.CurrentTemplatePathPath to a template of current page.TemplateModule