Class AuthenticatedResourceProvider


  • public class AuthenticatedResourceProvider
    extends Object
    This AuthenticatedResourceProvider implementation keeps a resource provider and the authentication information (through the ResolveContext). The methods are similar to those of ResourceProvider.
    • Constructor Detail

      • AuthenticatedResourceProvider

        public AuthenticatedResourceProvider​(@NotNull
                                             @NotNull ResourceProviderHandler providerHandler,
                                             boolean useRAS,
                                             @NotNull
                                             @NotNull org.apache.sling.spi.resource.provider.ResolveContext<Object> resolveContext,
                                             @NotNull
                                             @NotNull org.apache.sling.resourceresolver.impl.ResourceAccessSecurityTracker tracker)
    • Method Detail

      • getResolveContext

        @NotNull
        public @NotNull org.apache.sling.spi.resource.provider.ResolveContext<Object> getResolveContext()
        Get the resolve context.
        Returns:
        The resolve context
      • refresh

        public void refresh()
      • isLive

        public boolean isLive()
      • getParent

        public org.apache.sling.api.resource.Resource getParent​(org.apache.sling.api.resource.Resource child)
      • getResource

        public org.apache.sling.api.resource.Resource getResource​(String path,
                                                                  org.apache.sling.api.resource.Resource parent,
                                                                  Map<String,​String> parameters)
      • listChildren

        public Iterator<org.apache.sling.api.resource.Resource> listChildren​(org.apache.sling.api.resource.Resource parent)
      • getAttributeNames

        public void getAttributeNames​(Set<String> attributeNames)
      • getAttribute

        public Object getAttribute​(String name)
      • create

        public org.apache.sling.api.resource.Resource create​(org.apache.sling.api.resource.ResourceResolver resolver,
                                                             String path,
                                                             Map<String,​Object> properties)
                                                      throws org.apache.sling.api.resource.PersistenceException
        Throws:
        org.apache.sling.api.resource.PersistenceException
      • orderBefore

        public boolean orderBefore​(@NotNull
                                   @NotNull org.apache.sling.api.resource.Resource parent,
                                   @NotNull
                                   @NotNull String name,
                                   @Nullable
                                   @Nullable String followingSiblingName)
                            throws org.apache.sling.api.resource.PersistenceException
        Throws:
        org.apache.sling.api.resource.PersistenceException
      • delete

        public void delete​(org.apache.sling.api.resource.Resource resource)
                    throws org.apache.sling.api.resource.PersistenceException
        Throws:
        org.apache.sling.api.resource.PersistenceException
      • revert

        public void revert()
      • commit

        public void commit()
                    throws org.apache.sling.api.resource.PersistenceException
        Throws:
        org.apache.sling.api.resource.PersistenceException
      • hasChanges

        public boolean hasChanges()
      • getSupportedLanguages

        public String[] getSupportedLanguages()
      • findResources

        public Iterator<org.apache.sling.api.resource.Resource> findResources​(String query,
                                                                              String language)
      • adaptTo

        public <AdapterType> AdapterType adaptTo​(Class<AdapterType> type)
      • copy

        public boolean copy​(String srcAbsPath,
                            String destAbsPath)
                     throws org.apache.sling.api.resource.PersistenceException
        Throws:
        org.apache.sling.api.resource.PersistenceException
      • move

        public boolean move​(String srcAbsPath,
                            String destAbsPath)
                     throws org.apache.sling.api.resource.PersistenceException
        Throws:
        org.apache.sling.api.resource.PersistenceException