|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.sling.installer.provider.jcr.impl.JcrInstaller
@Properties(value={@Property(name="service.description",value="Sling JCR Install Service"),@Property(name="service.vendor",value="The Apache Software Foundation"),@Property(name="handler.schemes",value="jcrinstall",unbounded=ARRAY),@Property(name="service.ranking",intValue=100)})
@Service(value=org.apache.sling.installer.api.UpdateHandler.class)
public class JcrInstallerMain 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 | |
|---|---|
static int |
COUNTERS_COUNT
|
static int |
DEFAULT_FOLDER_MAX_DEPTH
|
static java.lang.String |
DEFAULT_FOLDER_NAME_REGEXP
Default regexp for watched folders |
static java.lang.String[] |
DEFAULT_SEARCH_PATH
|
static java.lang.String |
FOLDER_NAME_REGEXP_PROPERTY
ComponentContext property that overrides the folder name regexp |
static java.lang.String |
PROP_INSTALL_FOLDER_MAX_DEPTH
Configurable max. path depth for watched folders |
static java.lang.String |
PROP_SEARCH_PATH
Configurable search path, with per-path priorities. |
static int |
RUN_LOOP_COUNTER
|
static long |
RUN_LOOP_DELAY_MSEC
|
static int |
SCAN_FOLDERS_COUNTER
|
static int |
UPDATE_FOLDERS_LIST_COUNTER
|
static java.lang.String |
URL_SCHEME
|
| Fields inherited from interface org.apache.sling.installer.api.UpdateHandler |
|---|
PROPERTY_SCHEMES |
| Constructor Summary | |
|---|---|
JcrInstaller()
|
|
| Method Summary | |
|---|---|
protected void |
activate(org.osgi.service.component.ComponentContext context)
Activate this component. |
protected void |
deactivate(org.osgi.service.component.ComponentContext context)
Deactivate this component |
protected java.lang.Object |
getPropertyValue(org.osgi.service.component.ComponentContext ctx,
java.lang.String name)
Get a property value from the component context or bundle context |
org.apache.sling.installer.api.UpdateResult |
handleRemoval(java.lang.String resourceType,
java.lang.String id,
java.lang.String url)
|
org.apache.sling.installer.api.UpdateResult |
handleUpdate(java.lang.String resourceType,
java.lang.String id,
java.lang.String url,
java.util.Dictionary<java.lang.String,java.lang.Object> dict,
java.util.Map<java.lang.String,java.lang.Object> attributes)
|
org.apache.sling.installer.api.UpdateResult |
handleUpdate(java.lang.String resourceType,
java.lang.String id,
java.lang.String url,
java.io.InputStream is,
java.util.Map<java.lang.String,java.lang.Object> attributes)
|
void |
onEvent(javax.jcr.observation.EventIterator it)
|
void |
runOneCycle()
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 |
|---|
public static final long RUN_LOOP_DELAY_MSEC
public static final java.lang.String URL_SCHEME
public static final int SCAN_FOLDERS_COUNTER
public static final int UPDATE_FOLDERS_LIST_COUNTER
public static final int RUN_LOOP_COUNTER
public static final int COUNTERS_COUNT
public static final java.lang.String DEFAULT_FOLDER_NAME_REGEXP
@Property(value=".*/install$") public static final java.lang.String FOLDER_NAME_REGEXP_PROPERTY
public static final int DEFAULT_FOLDER_MAX_DEPTH
@Property(intValue=4) public static final java.lang.String PROP_INSTALL_FOLDER_MAX_DEPTH
@Property(value={"/libs:100","/apps:200"},
unbounded=ARRAY)
public static final java.lang.String PROP_SEARCH_PATH
public static final java.lang.String[] DEFAULT_SEARCH_PATH
| Constructor Detail |
|---|
public JcrInstaller()
| Method Detail |
|---|
protected void activate(org.osgi.service.component.ComponentContext context)
protected void deactivate(org.osgi.service.component.ComponentContext context)
protected java.lang.Object getPropertyValue(org.osgi.service.component.ComponentContext ctx,
java.lang.String name)
public void onEvent(javax.jcr.observation.EventIterator it)
onEvent in interface javax.jcr.observation.EventListenerpublic void runOneCycle()
public org.apache.sling.installer.api.UpdateResult handleRemoval(java.lang.String resourceType,
java.lang.String id,
java.lang.String url)
handleRemoval in interface org.apache.sling.installer.api.UpdateHandlerUpdateHandler.handleRemoval(java.lang.String, java.lang.String, java.lang.String)
public org.apache.sling.installer.api.UpdateResult handleUpdate(java.lang.String resourceType,
java.lang.String id,
java.lang.String url,
java.util.Dictionary<java.lang.String,java.lang.Object> dict,
java.util.Map<java.lang.String,java.lang.Object> attributes)
handleUpdate in interface org.apache.sling.installer.api.UpdateHandlerUpdateHandler.handleUpdate(java.lang.String, java.lang.String, java.lang.String, java.util.Dictionary, Map)
public org.apache.sling.installer.api.UpdateResult handleUpdate(java.lang.String resourceType,
java.lang.String id,
java.lang.String url,
java.io.InputStream is,
java.util.Map<java.lang.String,java.lang.Object> attributes)
handleUpdate in interface org.apache.sling.installer.api.UpdateHandlerUpdateHandler.handleUpdate(java.lang.String, java.lang.String, java.lang.String, java.io.InputStream, Map)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||