热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

org.ogema.core.application.ApplicationManager.getResourceAccess()方法的使用及代码示例

本文整理了Java中org.ogema.core.application.ApplicationManager.getResourceAccess()方法的一些代码示例

本文整理了Java中org.ogema.core.application.ApplicationManager.getResourceAccess()方法的一些代码示例,展示了ApplicationManager.getResourceAccess()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ApplicationManager.getResourceAccess()方法的具体详情如下:
包路径:org.ogema.core.application.ApplicationManager
类名称:ApplicationManager
方法名:getResourceAccess

ApplicationManager.getResourceAccess介绍

暂无

代码示例

代码示例来源:origin: org.smartrplace.apps/smartrplace-util-proposed

/** Overwrite this method to provide a different set of resources
*
* @param req
* @return
*/
public List getResourcesInTable(OgemaHttpRequest req) {
return appMan.getResourceAccess().getResources(resourceType);
}

代码示例来源:origin: org.ogema.messaging/message-settings

public XmppTemplate(ResourceList list, ApplicationManager am,
DynamicTable table, Alert alert, WidgetPage page) {
this.list = list;
this.table = table;
this.alert = alert;
this.page = page;
this.am = am;
this.logger = am.getLogger();
this.ra = am.getResourceAccess();
}

代码示例来源:origin: org.ogema.messaging/message-settings

public SmsTemplate(ResourceList list, ApplicationManager am, DynamicTable table,
Alert alert, WidgetPage page) {
this.list = list;
this.table = table;
this.alert = alert;
this.page = page;
this.am = am;
this.logger = am.getLogger();
this.ra = am.getResourceAccess();
}

代码示例来源:origin: org.ogema.widgets/widget-extended

@Override
public Resource run() {
return am.getResourceAccess().getResource(path);
}
});

代码示例来源:origin: org.ogema.drivers/homematic-xmlrpc-hl

@Override
public void stop(AppStopReason asr) {
if (appman != null) {
appman.getResourceAccess().removeResourceDemand(HmLogicInterface.class, configListener);
}
final Iterator it = connections.values().iterator();
while (it.hasNext()) {
final HmConnection cOnn= it.next();
it.remove();
conn.close();
}
}

代码示例来源:origin: org.ogema.sim/roomsimulation-service

@Override
public void buildConfigurations(RoomsimulationServicePattern pattern, List cfgs, RoomSimConfigPattern simPattern) {
// Add here configuration values that can be edited by the user, see example below
RoomVolume volume = new RoomVolume(pattern.volume);
cfgs.add(volume);
cfgs.add(new RoomConfig(simPattern, appManager.getResourceAccess(), this));
}

代码示例来源:origin: org.smartrplace.apps/smartrplace-util-proposed

public static Map getValuesToSetForReferencingDropdown(Class type,
ApplicationManager appMan) {
List optiOns=
appMan.getResourceAccess().getResources(type);
Map valuesToSet = new HashMap<>();
for(T opt: options) {
valuesToSet.put(opt, ResourceUtils.getHumanReadableName(opt));
}
return valuesToSet;
}

代码示例来源:origin: org.smartrplace.tools/profile-preferences

@Override
public Future> getProfileIds(String templateId) {
Objects.requireNonNull(templateId);
return appManFuture.thenApplyAsync(appMan -> {
return appMan.getResourceAccess().getResources(ProfileConfiguration.class).stream()
.filter(cfg -> templateId.equals(cfg.profileTemplateId().getValue()))
.map(ProfileConfiguration::id)
.map(StringResource::getValue)
.filter(value -> value != null && !value.isEmpty())
.collect(Collectors.toList());
});
}

代码示例来源:origin: org.ogema.drivers/homematic-xmlrpc-hl

@Override
public void timerElapsed(Timer timer) {
logger.info("HomeMatic driver ready, configuration pending");
appman.getResourceAccess().addResourceDemand(HmLogicInterface.class, configListener);
t.destroy();
}
});

代码示例来源:origin: org.ogema.widgets/widget-extended

@SuppressWarnings({ "unchecked", "rawtypes" })
protected void updateOnGet() {
List newResources;
if (currentType != null)
newResources = am.getResourceAccess().getResources(currentType);
else
newResources = Collections.emptyList();
updateRows((List) newResources);
}

代码示例来源:origin: org.ogema.widgets/widget-extended

@Override
public Resource run() {
if (parent == null)
return am.getResourceAccess().getResource(newResName);
else
return parent.getSubResource(newResName);
}
});

代码示例来源:origin: org.ogema.messaging/message-settings

public EmailTemplate(ResourceList list, ApplicationManager am,
DynamicTable table, Alert alert, WidgetPage page) {
this.list = list;
this.table = table;
this.alert = alert;
this.page = page;
this.am = am;
this.logger = am.getLogger();
this.ra = am.getResourceAccess();
this.resMan = am.getResourceManagement();
}

代码示例来源:origin: org.ogema.drivers/drs485de-driver

@Override
public void stop(AppStopReason reason) {
logger.info("DRS485DE-driver stopped");
appManager.getResourceAccess().removeResourceDemand(DRS485DEConfigurationModel.class, this);
for (DRS485DEDevice device : devices.values()) {
device.close();
}
devices.clear();
}

代码示例来源:origin: org.ogema.messaging/message-settings

public ReceiverTemplate(ResourceList list, ApplicationManager am,
DynamicTable table, Alert alert, WidgetPage page) {

this.receiverCOnfigs= list;
this.receiverTable = table;
this.alert = alert;
this.page = page;
this.am = am;
this.logger = am.getLogger();
this.ra = am.getResourceAccess();
this.resMan = am.getResourceManagement();
}

代码示例来源:origin: org.ogema.drivers/drs485de-driver

@Override
public void start(ApplicationManager appManager) {
this.appManager = appManager;
this.logger = appManager.getLogger();
logger.info("DRS485DE-driver started");
// register demand for DRS485DEConfigurationModel
appManager.getResourceAccess().addResourceDemand(DRS485DEConfigurationModel.class, this);
}

代码示例来源:origin: org.ogema.tools/system-supervision

@Override
public void start(final ApplicationManager appManager) {
this.appMan = appManager;
appManager.getResourceAccess().addResourceDemand(SystemSupervisionConfig.class, this);
this.shellInitial = new ShellCommandsInitial(appManager, appManager.getAppID().getBundle().getBundleContext());
}

代码示例来源:origin: org.ogema.tools/system-supervision

@Override
public void stop(AppStopReason reason) {
final ShellCommandsInitial initial = this.shellInitial;
this.shellInitial = null;
if (initial != null)
initial.close();
stopInternal();
if (appMan != null)
appMan.getResourceAccess().removeResourceDemand(SystemSupervisionConfig.class, this);
appMan = null;
}

代码示例来源:origin: org.smartrplace.logging/fendodb-ogema-tagging

@Override
public void databaseStarted(DataRecorderReference db) {
final Path path = Paths.get(getLogdataRecorderPath(ctx, factory));
if (!path.equals(db.getPath()))
return;
try (CloseableDataRecorder recorder = db.getDataRecorder()) {
cOntinuousTagger= new ContinuousTagger(recorder, appManager.getResourceAccess());
} catch (Exception e) {
appManager.getLogger().warn("Failed to register continuous log data tagger",e);
}
}

代码示例来源:origin: org.ogema.tools/resource-manipulators

public static boolean checkForHistoricalSchedule(AbsoluteSchedule schedule, ApplicationManager am) {
AbsoluteSchedule localizedSchedule = am.getResourceAccess().getResource(schedule.getLocation());
if (!localizedSchedule.getName().equals("historicalData"))
return false;
if (LOG_DATA_LIFETIME == null) {
// throw new RuntimeException("Log data lifetime not set... cannot backup log data.");
return true;
}
SingleValueResource parent = localizedSchedule.getParent();
persistLogData(parent, am);
return true;
}

代码示例来源:origin: org.ogema.drivers/hm-hl

private void activate(ThermostatPattern device) {
// do not activate value resources, since they do not contain sensible values yet
ResourceUtils.activateComplexResources(device.model, true, appManager.getResourceAccess());
device.model.valve().setting().controllable().setValue(false); // valve is not directly controllable, only via temp setting
device.model.valve().setting().controllable().activate(false);
}

推荐阅读
author-avatar
smile
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有