public DefinitionsManager(COMServicesProvider comServices) { this.defs = new HashMap<Long, Element>(); if (comServices != null) { this.eventService = comServices.getEventService(); this.archiveService = comServices.getArchiveService(); this.activityTrackingService = comServices.getActivityTrackingService(); this.comServices = comServices; } else { this.eventService = null; this.archiveService = null; this.activityTrackingService = null; this.comServices = null; } }
"Initializing services..."); comServices.init(); comServices.initArchiveSync(); this, confId, comServices.getArchiveService() );
Long eventId = this.getCOMServices().getEventService().generateAndStoreEvent( AppsLauncherHelper.STOPPING_OBJECT_TYPE, ConfigurationProviderSingleton.getDomain(), null); final URI uri = this.getCOMServices().getEventService().getConnectionProvider().getConnectionDetails().getProviderURI(); this.getCOMServices().getEventService().publishEvent(uri, eventId, AppsLauncherHelper.STOPPING_OBJECT_TYPE, null, source, null); } catch (IOException ex) { Long eventId2 = this.getCOMServices().getEventService().generateAndStoreEvent( AppsLauncherHelper.STOPPED_OBJECT_TYPE, ConfigurationProviderSingleton.getDomain(), this.getCOMServices().getEventService().publishEvent(uri, eventId2, AppsLauncherHelper.STOPPED_OBJECT_TYPE, null, source, null); } catch (IOException ex) { this.getCOMServices().closeAll();
public Long update(Long statLinkId, StatisticCreationRequest statLink, SingleConnectionDetails connectionDetails) { // requirement: 3.3.2.5 Long newLinkDefId; if (comServices.getArchiveService() == null) { newLinkDefId = ++uniqueObjIdLinkDef; // This line as to go before any writing (because it's initialized as zero and that's the wildcard) } else { try { StatisticLinkDetailsList links = new StatisticLinkDetailsList(); links.add(statLink.getLinkDetails()); LongList linkDefIds = comServices.getArchiveService().store( //requirement: 3.6.15.2.i true, StatisticHelper.STATISTICLINKDEFINITION_OBJECT_TYPE, ConfigurationProviderSingleton.getDomain(), HelperArchive.generateArchiveDetailsList(statLinkId, null, connectionDetails), links, null); newLinkDefId = linkDefIds.get(0); } catch (MALException ex) { Logger.getLogger(StatisticManager.class.getName()).log(Level.SEVERE, null, ex); return null; } catch (MALInteractionException ex) { Logger.getLogger(StatisticManager.class.getName()).log(Level.SEVERE, null, ex); return null; } } // requirement: 3.7.2.13 this.statLinks.put(statLinkId, statLink); this.statLinkDefIdsByStatLinkIds.put(statLinkId, newLinkDefId); return newLinkDefId; }
"Sending event to app: {0} (Name: ''{1}'')", new Object[]{appInstId, appDirectoryNames.get(i)}); this.setRunning(appInstId, false, interaction.getInteraction()); sourceList.add(super.getCOMServices().getActivityTrackingService().storeCOMOperationActivity(interaction.getInteraction(), null)); final LongList objIds = super.getCOMServices().getEventService().generateAndStoreEvents(objType, ConfigurationProviderSingleton.getDomain(), appInstIds, sourceList, interaction.getInteraction()); super.getCOMServices().getEventService().publishEvents(uri, objIds, objType, appInstIds, sourceList, appDirectoryNames); } catch (IOException ex) { Logger.getLogger(AppsLauncherManager.class.getName()).log(Level.SEVERE, null, ex);
private void publishConfigurationStoredFailure(Long related) { // Publish event: Failure with the objId of the Configuration stored ObjectType objTypeEvent = ConfigurationHelper.CONFIGURATIONSTORED_OBJECT_TYPE; BooleanList bool = new BooleanList(); bool.add(false); // Failure ObjectId eventSource = null; // It was not stored... try { comServices.getEventService().publishEvent( providerURI, null, objTypeEvent, related, eventSource, bool ); } catch (IOException ex) { Logger.getLogger(ConfigurationEventAdapter.class.getName()).log(Level.SEVERE, null, ex); } }
protected ObjectId storeCOMOperationActivity(final MALInteraction interaction) { if (comServices.getActivityTrackingService() != null) { return comServices.getActivityTrackingService().storeCOMOperationActivity(interaction, null); } else { return null; } }
this.comServices.init(); this.heartbeatService.init(); this.applicationsManagerService.init(comServices, directoryService); this.packageManagementService.init(comServices, packageManagementBackend); this.comServices.initArchiveSync(); super.reconfigurableServices.add(this.applicationsManagerService); this.startMCServices(mcAdapter); new ObjectKey(ConfigurationProviderSingleton.getDomain(), DEFAULT_PROVIDER_CONFIGURATION_OBJID)); super.providerConfiguration = new PersistProviderConfiguration(this, confId, comServices.getArchiveService());
Long eventId = this.getCOMServices().getEventService().generateAndStoreEvent( AppsLauncherHelper.STOPPING_OBJECT_TYPE, ConfigurationProviderSingleton.getDomain(), null); final URI uri = this.getCOMServices().getEventService().getConnectionProvider().getConnectionDetails().getProviderURI(); this.getCOMServices().getEventService().publishEvent(uri, eventId, AppsLauncherHelper.STOPPING_OBJECT_TYPE, null, source, null); } catch (IOException ex) { Long eventId2 = this.getCOMServices().getEventService().generateAndStoreEvent( AppsLauncherHelper.STOPPED_OBJECT_TYPE, ConfigurationProviderSingleton.getDomain(), this.getCOMServices().getEventService().publishEvent(uri, eventId2, AppsLauncherHelper.STOPPED_OBJECT_TYPE, null, source, null); } catch (IOException ex) { this.getCOMServices().closeAll();
public Long storeAndGenerateStatValueInsobjId(StatisticValue sVal, Long related, SingleConnectionDetails connectionDetails, ObjectId source) { if (comServices.getArchiveService() == null) { uniqueObjIdAIns++; if (uniqueObjIdAIns % SAVING_PERIOD == 0) // It is used to avoid constant saving every time we generate a new obj Inst identifier. LongList objIds = comServices.getArchiveService().store( //requirement: 3.6.6.c true,
private void publishConfigurationStoredSuccess(Long objId, Long related) { // Publish event: Success with the objId of the Configuration stored ObjectType objTypeEvent = ConfigurationHelper.CONFIGURATIONSTORED_OBJECT_TYPE; BooleanList bool = new BooleanList(); bool.add(true); // Success ObjectId eventSource = new ObjectId(); eventSource.setType(ConfigurationHelper.CONFIGURATIONOBJECTS_OBJECT_TYPE); eventSource.setKey(new ObjectKey(providerDomain, objId)); try { comServices.getEventService().publishEvent( providerURI, objId, objTypeEvent, related, eventSource, bool ); } catch (IOException ex) { Logger.getLogger(ConfigurationEventAdapter.class.getName()).log(Level.SEVERE, null, ex); } }
protected MCManager(COMServicesProvider comServices) { this.identitiesToNamesMap = new HashMap<Long, Identifier>(); this.namesToPairsMap = new HashMap<Identifier, ObjectInstancePair>(); this.objIdToDefMap = new HashMap<Long, Element>(); if (comServices != null) { this.eventService = comServices.getEventService(); this.archiveService = comServices.getArchiveService(); this.activityTrackingService = comServices.getActivityTrackingService(); this.comServices = comServices; } else { this.eventService = null; this.archiveService = null; this.activityTrackingService = null; this.comServices = null; } try { groupService.init(archiveService); } catch (MALException ex) { Logger.getLogger(MCManager.class.getName()).log(Level.SEVERE, null, ex); } }
comServices.init(); comServices.initArchiveSync(); } catch (MALException ex) { Logger.getLogger(NanoSatMOConnectorImpl.class.getName()).log(Level.SEVERE, new ObjectKey(ConfigurationProviderSingleton.getDomain(), DEFAULT_PROVIDER_CONFIGURATION_OBJID)); super.providerConfiguration = new PersistProviderConfiguration(this, confId, comServices.getArchiveService());
Long eventId = this.getCOMServices().getEventService().generateAndStoreEvent( AppsLauncherHelper.STOPPING_OBJECT_TYPE, ConfigurationProviderSingleton.getDomain(), null); final URI uri = this.getCOMServices().getEventService().getConnectionProvider().getIPCConnectionDetails().getProviderURI(); this.getCOMServices().getEventService().publishEvent(uri, eventId, AppsLauncherHelper.STOPPING_OBJECT_TYPE, null, source, null); } catch (IOException ex) { Long eventId2 = this.getCOMServices().getEventService().generateAndStoreEvent( AppsLauncherHelper.STOPPED_OBJECT_TYPE, ConfigurationProviderSingleton.getDomain(), this.getCOMServices().getEventService().publishEvent(uri, eventId2, AppsLauncherHelper.STOPPED_OBJECT_TYPE, null, source, null); } catch (IOException ex) { this.getCOMServices().closeAll();
public StatisticManager(COMServicesProvider comServices, ParameterManager parameterManager, ExternalStatisticFunctionsInterface externalStatFunctions) { this.comServices = comServices; this.parameterManager = parameterManager; this.externalStatFunctions = externalStatFunctions; this.statFunctions = new HashMap<Long, StatisticFunctionDetails>(); this.statLinks = new HashMap<Long, StatisticCreationRequest>(); this.statEvaluationReports = new HashMap<Long, StatisticEvaluationReport>(); this.statLinkDefIdsByStatLinkIds = new HashMap<Long, Long>(); this.dataSets = new DataSets(); if (comServices != null) { // Do we have COM services? if (comServices.getArchiveService() == null) { // No Archive? this.uniqueObjIdLink = new Long(0); // The zeroth value will not be used (reserved for the wildcard) this.uniqueObjIdAIns = new Long(0); // The zeroth value will not be used (reserved for the wildcard) // this.load(); // Load the file } else { } } // Insert the default statistic functions requirements: 3.6.4.a, b, c, d, e this.statFunctions.put(new Long(1), new StatisticFunctionDetails(new Identifier(STR_STAT_FUNC_NAME_MAXIMUM), "")); this.statFunctions.put(new Long(2), new StatisticFunctionDetails(new Identifier(STR_STAT_FUNC_NAME_MINIMUM), "")); this.statFunctions.put(new Long(3), new StatisticFunctionDetails(new Identifier(STR_STAT_FUNC_NAME_MEAN_AVERAGE), "")); this.statFunctions.put(new Long(4), new StatisticFunctionDetails(new Identifier(STR_STAT_FUNC_NAME_STD_DEVIATION), "")); }
Long newLinkDefId; if (comServices.getArchiveService() == null) { LongList linkIds = comServices.getArchiveService().store( //requirement: 3.6.6.b, 3.6.13.2.i true, linkDetails.add(statLink.getLinkDetails()); LongList linkDefIds = comServices.getArchiveService().store( //requirement: 3.6.6.b, 3.6.13.2.i true,
groupService.init(manager.getCOMservices().getArchiveService());
comServices.getArchiveService(), obj.getType(), obj.getKey().getDomain(), obj.getKey().getInstId()); LongList objIds = comServices.getArchiveService().store( true, objType,