org.apache.sling.installer.provider.jcr.impl

## Class JcrInstaller

- java.lang.Object
- - org.apache.sling.installer.provider.jcr.impl.JcrInstaller

All Implemented Interfaces:
  org.apache.sling.installer.api.UpdateHandler

    public class JcrInstaller
    extends Object
    implements org.apache.sling.installer.api.UpdateHandler

Main class of jcrinstall, runs as a service, observes the repository for changes in folders having names that match configurable regular expressions, and registers resources found in those folders with the OSGi installer for installation.

### Field Summary

Fields
`static int` `COUNTERS_COUNT`
`static int` `RUN_LOOP_COUNTER`
`static long` `RUN_LOOP_DELAY_MSEC`
`static int` `SCAN_FOLDERS_COUNTER`
`static int` `UPDATE_FOLDERS_LIST_COUNTER`
`static String` `URL_SCHEME`

### Fields inherited from interface org.apache.sling.installer.api.UpdateHandler

`PROPERTY_SCHEMES`

### Constructor Summary

Constructors
Constructor and Description
`JcrInstaller()`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected void` `activate(org.apache.sling.installer.provider.jcr.impl.JcrInstaller.Configuration configuration)` Activate this component.
`protected void` `deactivate()` Deactivate this component
`org.apache.sling.installer.api.UpdateResult` `handleRemoval(String resourceType, String id, String url)`
`org.apache.sling.installer.api.UpdateResult` `handleUpdate(String resourceType, String id, String url, Dictionary<String,Object> dict, Map<String,Object> attributes)`
`org.apache.sling.installer.api.UpdateResult` `handleUpdate(String resourceType, String id, String url, InputStream is, Map<String,Object> attributes)`
`void` `runOneCycle(InstallerConfig cfg, javax.jcr.Session session)` Run periodic scans of our watched folders, and watch for folders creations/deletions.

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

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

### Field Detail

#### RUN_LOOP_DELAY_MSEC

    public static final long RUN_LOOP_DELAY_MSEC

See Also:
  Constant Field Values

#### URL_SCHEME

    public static final String URL_SCHEME

See Also:
  Constant Field Values

#### SCAN_FOLDERS_COUNTER

    public static final int SCAN_FOLDERS_COUNTER

See Also:
  Constant Field Values

#### UPDATE_FOLDERS_LIST_COUNTER

    public static final int UPDATE_FOLDERS_LIST_COUNTER

See Also:
  Constant Field Values

#### RUN_LOOP_COUNTER

    public static final int RUN_LOOP_COUNTER

See Also:
  Constant Field Values

#### COUNTERS_COUNT

    public static final int COUNTERS_COUNT

See Also:
  Constant Field Values

### Constructor Detail

#### JcrInstaller

    public JcrInstaller()

### Method Detail

#### activate

    protected void activate(org.apache.sling.installer.provider.jcr.impl.JcrInstaller.Configuration configuration)
                     throws javax.jcr.RepositoryException

Activate this component.

Throws:
  `javax.jcr.RepositoryException`

#### deactivate

    protected void deactivate()

Deactivate this component

#### runOneCycle

    public void runOneCycle(InstallerConfig cfg,
                            javax.jcr.Session session)

Run periodic scans of our watched folders, and watch for folders creations/deletions.

#### handleRemoval

    public org.apache.sling.installer.api.UpdateResult handleRemoval(String resourceType,
                                                                     String id,
                                                                     String url)

Specified by:
  `handleRemoval` in interface `org.apache.sling.installer.api.UpdateHandler`
See Also:
  `UpdateHandler.handleRemoval(java.lang.String, java.lang.String, java.lang.String)`

#### handleUpdate

    public org.apache.sling.installer.api.UpdateResult handleUpdate(String resourceType,
                                                                    String id,
                                                                    String url,
                                                                    Dictionary<String,Object> dict,
                                                                    Map<String,Object> attributes)

Specified by:
  `handleUpdate` in interface `org.apache.sling.installer.api.UpdateHandler`
See Also:
  `UpdateHandler.handleUpdate(java.lang.String, java.lang.String, java.lang.String, java.util.Dictionary, Map)`

#### handleUpdate

    public org.apache.sling.installer.api.UpdateResult handleUpdate(String resourceType,
                                                                    String id,
                                                                    String url,
                                                                    InputStream is,
                                                                    Map<String,Object> attributes)

Specified by:
  `handleUpdate` in interface `org.apache.sling.installer.api.UpdateHandler`
See Also:
  `UpdateHandler.handleUpdate(java.lang.String, java.lang.String, java.lang.String, java.io.InputStream, Map)`