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; } }
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); } }
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; }
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,
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,
this, confId, comServices.getArchiveService() );
new ObjectKey(ConfigurationProviderSingleton.getDomain(), DEFAULT_PROVIDER_CONFIGURATION_OBJID)); super.providerConfiguration = new PersistProviderConfiguration(this, confId, comServices.getArchiveService());
new ObjectKey(ConfigurationProviderSingleton.getDomain(), DEFAULT_PROVIDER_CONFIGURATION_OBJID)); super.providerConfiguration = new PersistProviderConfiguration(this, confId, comServices.getArchiveService());
groupService.init(manager.getCOMservices().getArchiveService());
comServices.getArchiveService(), obj.getType(), obj.getKey().getDomain(), obj.getKey().getInstId()); LongList objIds = comServices.getArchiveService().store( true, objType,