@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 JcrInstaller extends Object implements org.apache.sling.installer.api.UpdateHandler, org.osgi.service.cm.ManagedService
Modifier and Type | Field and Description |
---|---|
static int |
COUNTERS_COUNT |
static boolean |
DEFAULT_ENABLE_WRITEBACK |
static int |
DEFAULT_FOLDER_MAX_DEPTH |
static String |
DEFAULT_FOLDER_NAME_REGEXP
Default regexp for watched folders
|
static String |
DEFAULT_NEW_CONFIG_PATH |
static String[] |
DEFAULT_SEARCH_PATH |
static String |
FOLDER_NAME_REGEXP_PROPERTY
ComponentContext property that overrides the folder name regexp
|
static String |
OLD_PID
PID before refactoring.
|
static String |
PAUSE_SCAN_NODE_PATH |
static String |
PROP_ENABLE_WRITEBACK |
static String |
PROP_INSTALL_FOLDER_MAX_DEPTH
Configurable max.
|
static String |
PROP_NEW_CONFIG_PATH |
static String |
PROP_SCAN_PROP_PATH |
static 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 String |
URL_SCHEME |
Constructor and Description |
---|
JcrInstaller() |
Modifier and Type | Method and Description |
---|---|
protected void |
activate(org.osgi.service.component.ComponentContext context)
Activate this component.
|
protected void |
deactivate(org.osgi.service.component.ComponentContext context)
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.
|
void |
updated(Dictionary properties) |
public static final long RUN_LOOP_DELAY_MSEC
public static final String URL_SCHEME
public static final String OLD_PID
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 String DEFAULT_FOLDER_NAME_REGEXP
@Property(value=".*/(install|config)$") public static final String FOLDER_NAME_REGEXP_PROPERTY
public static final int DEFAULT_FOLDER_MAX_DEPTH
@Property(intValue=4) public static final String PROP_INSTALL_FOLDER_MAX_DEPTH
@Property(value={"/libs:100","/apps:200"}, unbounded=ARRAY) public static final String PROP_SEARCH_PATH
public static final String[] DEFAULT_SEARCH_PATH
public static final String DEFAULT_NEW_CONFIG_PATH
@Property(value="sling/install") public static final String PROP_NEW_CONFIG_PATH
public static final String PAUSE_SCAN_NODE_PATH
@Property(value="/system/sling/installer/jcr/pauseInstallation") public static final String PROP_SCAN_PROP_PATH
public static final boolean DEFAULT_ENABLE_WRITEBACK
@Property(boolValue=true) public static final String PROP_ENABLE_WRITEBACK
protected void activate(org.osgi.service.component.ComponentContext context)
protected void deactivate(org.osgi.service.component.ComponentContext context)
public void updated(Dictionary properties) throws org.osgi.service.cm.ConfigurationException
updated
in interface org.osgi.service.cm.ManagedService
org.osgi.service.cm.ConfigurationException
ManagedService.updated(java.util.Dictionary)
public void runOneCycle(InstallerConfig cfg, javax.jcr.Session session)
public org.apache.sling.installer.api.UpdateResult handleRemoval(String resourceType, String id, String url)
handleRemoval
in interface org.apache.sling.installer.api.UpdateHandler
UpdateHandler.handleRemoval(java.lang.String, java.lang.String, java.lang.String)
public org.apache.sling.installer.api.UpdateResult handleUpdate(String resourceType, String id, String url, Dictionary<String,Object> dict, Map<String,Object> attributes)
handleUpdate
in interface org.apache.sling.installer.api.UpdateHandler
UpdateHandler.handleUpdate(java.lang.String, java.lang.String, java.lang.String, java.util.Dictionary, Map)
public org.apache.sling.installer.api.UpdateResult handleUpdate(String resourceType, String id, String url, InputStream is, Map<String,Object> attributes)
handleUpdate
in interface org.apache.sling.installer.api.UpdateHandler
UpdateHandler.handleUpdate(java.lang.String, java.lang.String, java.lang.String, java.io.InputStream, Map)
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.