org.apache.sling.jcr.classloader.internal

## Class ClassLoaderWriterImpl

- java.lang.Object
- - org.apache.sling.jcr.classloader.internal.ClassLoaderWriterImpl

All Implemented Interfaces:
  org.apache.sling.commons.classloader.ClassLoaderWriter

    @Service(value=org.apache.sling.commons.classloader.ClassLoaderWriter.class,
             serviceFactory=true)
     @Property(name="service.vendor",value="The Apache Software Foundation") @Property(name="service.description",value="Repository based classloader writer")
    public class ClassLoaderWriterImpl
    extends Object
    implements org.apache.sling.commons.classloader.ClassLoaderWriter

The `DynamicClassLoaderProviderImpl` provides a class loader which loads classes from configured paths in the repository. It implements the `ClassLoaderWriter` interface for clients to use for writing and reading such classes and resources.

### Constructor Summary

Constructors
Constructor and Description
`ClassLoaderWriterImpl()`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected void` `activate(org.osgi.service.component.ComponentContext componentContext, Map<String,Object> properties)` Activate this component.
`javax.jcr.Session` `createSession()` Return a new session.
`protected void` `deactivate()` Deactivate this component.
`boolean` `delete(String name)`
`ClassLoader` `getClassLoader()`
`InputStream` `getInputStream(String name)`
`long` `getLastModified(String name)`
`OutputStream` `getOutputStream(String name)`
`boolean` `isActivate()` Is this still active?
`boolean` `rename(String oldName, String newName)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ClassLoaderWriterImpl

    public ClassLoaderWriterImpl()

### Method Detail

#### activate

    @Activate
    protected void activate(org.osgi.service.component.ComponentContext componentContext,
                                      Map<String,Object> properties)

Activate this component.

Parameters:
  `componentContext` - The component context
  `properties` - The configuration properties

#### deactivate

    @Deactivate
    protected void deactivate()

Deactivate this component.

#### createSession

    public javax.jcr.Session createSession()
                                    throws javax.jcr.RepositoryException

Return a new session.

Throws:
  `javax.jcr.RepositoryException`

#### isActivate

    public boolean isActivate()

Is this still active?

#### delete

    public boolean delete(String name)

Specified by:
  `delete` in interface `org.apache.sling.commons.classloader.ClassLoaderWriter`
See Also:
  `ClassLoaderWriter.delete(java.lang.String)`

#### getOutputStream

    public OutputStream getOutputStream(String name)

Specified by:
  `getOutputStream` in interface `org.apache.sling.commons.classloader.ClassLoaderWriter`
See Also:
  `ClassLoaderWriter.getOutputStream(java.lang.String)`

#### rename

    public boolean rename(String oldName,
                          String newName)

Specified by:
  `rename` in interface `org.apache.sling.commons.classloader.ClassLoaderWriter`
See Also:
  `ClassLoaderWriter.rename(java.lang.String, java.lang.String)`

#### getInputStream

    public InputStream getInputStream(String name)
                               throws IOException

Specified by:
  `getInputStream` in interface `org.apache.sling.commons.classloader.ClassLoaderWriter`
Throws:
  `IOException`
See Also:
  `ClassLoaderWriter.getInputStream(java.lang.String)`

#### getLastModified

    public long getLastModified(String name)

Specified by:
  `getLastModified` in interface `org.apache.sling.commons.classloader.ClassLoaderWriter`
See Also:
  `ClassLoaderWriter.getLastModified(java.lang.String)`

#### getClassLoader

    public ClassLoader getClassLoader()

Specified by:
  `getClassLoader` in interface `org.apache.sling.commons.classloader.ClassLoaderWriter`
See Also:
  `ClassLoaderWriter.getClassLoader()`