use of org.onosproject.core.DefaultApplication in project onos by opennetworkinglab.
the class SimpleApplicationStore method loadFromDisk.
private void loadFromDisk() {
for (String name : getApplicationNames()) {
ApplicationId appId = idStore.registerApplication(name);
ApplicationDescription appDesc = getApplicationDescription(name);
DefaultApplication app = DefaultApplication.builder(appDesc).withAppId(appId).build();
apps.put(appId, app);
states.put(appId, isActive(name) ? INSTALLED : ACTIVE);
// load app permissions
}
}
use of org.onosproject.core.DefaultApplication in project onos by opennetworkinglab.
the class SimpleApplicationStore method create.
@Override
public Application create(InputStream appDescStream) {
ApplicationDescription appDesc = saveApplication(appDescStream);
ApplicationId appId = idStore.registerApplication(appDesc.name());
DefaultApplication app = DefaultApplication.builder(appDesc).withAppId(appId).build();
apps.put(appId, app);
states.put(appId, INSTALLED);
delegate.notify(new ApplicationEvent(APP_INSTALLED, app));
return app;
}
Aggregations