Provided classes - 3.2
Below table lists what objects are provided by Slice v. 3.2.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
Class | Binding annotation | Description | Module |
---|---|---|---|
Guice | |||
com.google.inject.Injector | - | Injector which is used | |
Slice | |||
com.cognifide.slice.api.provider.ModelProvider | - | Default implementation of ModelProvider | SliceModule |
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 | - | ||
| com.cognifide.slice.api.qualifier.RequestedResource | originally 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.String | com.cognifide.slice.api.qualifier.RequestedResourcePath | path of originally requested resource. | |
java.lang.String | com.cognifide.slice.api.qualifier.CurrentResourcePath | path of current resource, i.e. resource from the top of Execution stack. Usually, a resource of currently included component. | |
java.lang.String | com.cognifide.slice.api.qualifier.InjectorName | A 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 LinkBuilder | LinkModule |
com.cognifide.slice.api.link.LinkExternalizer | - | Default | |
com.cognifide.slice.api.link.PathMapper | - | Default implementation of PathMapper | |
com.cognifide.slice.api.context.ContextProviderFactory | - | Default implementation of ContextProviderFactory | ContextModule |
Sling | |||
javax.servlet.ServletRequest | - | ServletRequest associated with current processing | SlingModule |
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.String | com.cognifide.slice.api.qualifier.Extension | Request extension in terms of Sling nomenclature | |
java.lang.String | com.cognifide.slice.api.qualifier.Suffix | Request suffix in terms of Sling nomenclature | |
java.lang.String[] | com.cognifide.slice.api.qualifier.Selectors | An 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.Selectors | A List of all selectors of the request. If request has no selectors, empty list is returned. | |
java.lang.String | com.cognifide.slice.api.qualifier.SelectorString | Selector string in terms of Sling nomenclature. null if request has no selectors. | |
JCR | |||
javax.jcr.query.QueryManager | - | JCR's QueryManager | JcrModule |
CQ | |||
com.cognifide.slice.mapper.api.Mapper | - | Mapper containing all processors and post processors available in Slice | CQMapperModule |
com.cognifide.slice.cq.PageChildrenProvider | - | Default implementation of PageChildrenProvider | CQModule |
com.day.cq.wcm.api.PageManager | - | CQ's PageManager | |
com.day.cq.wcm.api.Page | com.cognifide.slice.cq.qualifier.CurrentPage | A page which contains current resource. It doesn't have to correspond to requested page. | CurrentPageModule |
java.lang.String | com.cognifide.slice.cq.qualifier.CurrentPagePath | Path to a current page | |
com.day.cq.wcm.api.Page | com.cognifide.slice.cq.qualifier.RequestedPage | A page which contains originally requested resource. | RequestedPageModule |
java.lang.String | com.cognifide.slice.cq.qualifier.RequestedPagePath | Path to a requested page | |
com.cognifide.slice.api.link.Link | com.cognifide.slice.cq.qualifier.RequestedLink | A Link which corresponds to original request | LinkModule |
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 request | CQModule |
java.lang.String | com.cognifide.slice.cq.qualifier.CurrentTemplatePath | Path to a template of current page. | TemplateModule |