Class AuthenticatedResourceProvider
- java.lang.Object
-
- org.apache.sling.resourceresolver.impl.providers.stateful.AuthenticatedResourceProvider
-
public class AuthenticatedResourceProvider extends Object
ThisAuthenticatedResourceProviderimplementation keeps a resource provider and the authentication information (through theResolveContext). The methods are similar to those ofResourceProvider.
-
-
Field Summary
Fields Modifier and Type Field Description static AuthenticatedResourceProviderUNAUTHENTICATED_PROVIDER
-
Constructor Summary
Constructors Constructor Description AuthenticatedResourceProvider(@NotNull ResourceProviderHandler providerHandler, boolean useRAS, @NotNull org.apache.sling.spi.resource.provider.ResolveContext<Object> resolveContext, @NotNull org.apache.sling.resourceresolver.impl.ResourceAccessSecurityTracker tracker)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <AdapterType>
AdapterTypeadaptTo(Class<AdapterType> type)voidcommit()booleancopy(String srcAbsPath, String destAbsPath)org.apache.sling.api.resource.Resourcecreate(org.apache.sling.api.resource.ResourceResolver resolver, String path, Map<String,Object> properties)voiddelete(org.apache.sling.api.resource.Resource resource)Iterator<org.apache.sling.api.resource.Resource>findResources(String query, String language)ObjectgetAttribute(String name)voidgetAttributeNames(Set<String> attributeNames)org.apache.sling.api.resource.ResourcegetParent(org.apache.sling.api.resource.Resource child)@NotNull org.apache.sling.spi.resource.provider.ResolveContext<Object>getResolveContext()Get the resolve context.org.apache.sling.api.resource.ResourcegetResource(String path, org.apache.sling.api.resource.Resource parent, Map<String,String> parameters)String[]getSupportedLanguages()booleanhasChanges()booleanisLive()Iterator<org.apache.sling.api.resource.Resource>listChildren(org.apache.sling.api.resource.Resource parent)booleanmove(String srcAbsPath, String destAbsPath)booleanorderBefore(@NotNull org.apache.sling.api.resource.Resource parent, @NotNull String name, @Nullable String followingSiblingName)Iterator<Map<String,Object>>queryResources(String query, String language)voidrefresh()voidrevert()StringtoString()
-
-
-
Field Detail
-
UNAUTHENTICATED_PROVIDER
public static final AuthenticatedResourceProvider UNAUTHENTICATED_PROVIDER
-
-
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)
-
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
-
-