Aem 捆绑包不可配置
我正在使用scheduler创建一个OSGI包。 安装后,我无法通过CQ5/AEM中的系统控制台配置捆绑包 下面是我使用的注释Aem 捆绑包不可配置,aem,osgi-bundle,Aem,Osgi Bundle,我正在使用scheduler创建一个OSGI包。 安装后,我无法通过CQ5/AEM中的系统控制台配置捆绑包 下面是我使用的注释 @Component(immediate = true, metatype = false, label = "SiteMap manager Service") @Service(value = Runnable.class) @Properties({ @Property(name = "scheduler.expression", value = "0 0
@Component(immediate = true, metatype = false, label = "SiteMap manager Service")
@Service(value = Runnable.class)
@Properties({
@Property(name = "scheduler.expression", value = "0 0/2 * * * ?"),
@Property(name = "scheduler.concurrent", boolValue = false),
@Property(name = "prop.enabled", boolValue = false),
@Property(name = "inputPath", value = "changeme"),
@Property(name = "outputPath", value = "changeme"),
@Property(name = "username", value = "changeme"),
@Property(name = "password", value = "changeme") })
public class SiteMapManager implements Runnable {
private static final Logger LOGGER = LoggerFactory
.getLogger(SiteMapManager.class);
private String inboundDirectory;
private String extractionDirectory;
private String failDirectory;
private String username;
private String password;
private Boolean enabled;
private static AtomicBoolean runningInstances = new AtomicBoolean(false);
@Reference
private SlingRepository repository;
@Reference
ResourceResolverFactory factory;
@Reference
private Replicator replicator;
protected void activate(ComponentContext componentContext) {
LOGGER.debug("Start Article Ingestor Configuration");
configure(componentContext.getProperties());
}
public void configure(Dictionary<?, ?> properties) {
this.username = PropertiesUtil.toString(properties.get("username"),null);
this.password = PropertiesUtil.toString(properties.get("password"),
null);
this.enabled = PropertiesUtil.toBoolean(properties.get("prop.enabled"),false);
}
public void run() {
LOGGER.debug("Running");
}
}
@Component(immediate=true,metatype=false,label=“SiteMap manager服务”)
@服务(值=Runnable.class)
@性质({
@属性(name=“scheduler.expression”,value=“0/2***?”),
@属性(name=“scheduler.concurrent”,boolValue=false),
@属性(name=“prop.enabled”,boolValue=false),
@属性(name=“inputPath”,value=“changeme”),
@属性(name=“outputPath”,value=“changeme”),
@属性(name=“username”,value=“changeme”),
@属性(name=“password”,value=“changeme”)})
公共类SiteMapManager实现可运行{
专用静态最终记录器记录器=记录器工厂
.getLogger(SiteMapManager.class);
边界目录中的私有字符串;
私有字符串提取目录;
私有字符串目录;
私有字符串用户名;
私有字符串密码;
启用私有布尔值;
私有静态AtomicBoolean runningInstances=new AtomicBoolean(false);
@参考文献
私有SlingRepository存储库;
@参考文献
资源工厂;
@参考文献
私有复制子复制子;
受保护的无效激活(ComponentContext ComponentContext){
调试(“启动项目摄食器配置”);
配置(componentContext.getProperties());
}
公共void配置(字典属性){
this.username=PropertiesUtil.toString(properties.get(“用户名”),null);
this.password=PropertiesUtil.toString(properties.get(“password”),
无效);
this.enabled=PropertiesUtil.toBoolean(properties.get(“prop.enabled”),false);
}
公开募捐{
调试(“运行”);
}
}
简单明了:
元类型=true
阅读手册:它简单明了:
元类型=true
阅读手册: