@Test public void testBuilderSave() throws ConfigurationException, IOException { ImmutableConfiguration mpfPropertiesconfig = mpfPropertiesConfigurationBuilder.getCompleteConfiguration(); List<PropertyModel> newCustomPropertyModels = new ArrayList<>(); newCustomPropertyModels.add(new PropertyModel(FRAME_INTERVAL_KEY, "4", false)); newCustomPropertyModels.add(new PropertyModel(MODELS_DIR_KEY, "${" + SHARE_PATH_KEY +"}/new/dir/", false)); newCustomPropertyModels.add(new PropertyModel(TIMEOUT_KEY, "60", false)); ImmutableConfiguration newMpfPropertiesConfig = mpfPropertiesConfigurationBuilder.setAndSaveCustomProperties(newCustomPropertyModels); String mpfHome = System.getenv(MPF_HOME_ENV_VAR); Assert.assertNotNull(mpfHome); Assert.assertEquals(1, mpfPropertiesconfig.getInt(FRAME_INTERVAL_KEY)); Assert.assertEquals(mpfHome + "/share/models/", mpfPropertiesconfig.getString(MODELS_DIR_KEY)); Assert.assertEquals(30, mpfPropertiesconfig.getInt(TIMEOUT_KEY)); mpfPropertiesconfig = newMpfPropertiesConfig; Assert.assertEquals(4, mpfPropertiesconfig.getInt(FRAME_INTERVAL_KEY)); Assert.assertEquals(mpfHome + "/share/new/dir/", mpfPropertiesconfig.getString(MODELS_DIR_KEY)); Assert.assertEquals(30, mpfPropertiesconfig.getInt(TIMEOUT_KEY)); Configurations configs = new Configurations(); FileBasedConfigurationBuilder<PropertiesConfiguration> mpfCustomPropertiesConfigBuilder = configs.propertiesBuilder(customPropFile.getURL()); Configuration mpfCustomPropertiesConfig = mpfCustomPropertiesConfigBuilder.getConfiguration(); Assert.assertEquals(4, mpfCustomPropertiesConfig.getInt(FRAME_INTERVAL_KEY)); Assert.assertEquals("${" + SHARE_PATH_KEY +"}/new/dir/", mpfCustomPropertiesConfig.getString(MODELS_DIR_KEY)); Assert.assertEquals(60, mpfCustomPropertiesConfig.getInt(TIMEOUT_KEY)); mpfCustomPropertiesConfig.clear(); mpfCustomPropertiesConfigBuilder.save(); }
public void setAndSaveCustomProperties(List<PropertyModel> propertyModels) { mpfPropertiesConfig = mpfPropertiesConfigBuilder.setAndSaveCustomProperties(propertyModels); }
PropertiesUtil { public void setAndSaveCustomProperties(List<PropertyModel> propertyModels) { mpfPropertiesConfig = mpfPropertiesConfigBuilder.setAndSaveCustomProperties(propertyModels); } }
PropertiesUtil { public void setAndSaveCustomProperties(List<PropertyModel> propertyModels) { mpfPropertiesConfig = mpfPropertiesConfigBuilder.setAndSaveCustomProperties(propertyModels); }  }
PropertiesUtil { public void setAndSaveCustomProperties(List<PropertyModel> propertyModels) { mpfPropertiesConfig = mpfPropertiesConfigBuilder.setAndSaveCustomProperties(propertyModels); }  String lookup(String propertyName); void setAndSaveCustomProperties(List<PropertyModel> propertyModels); List<PropertyModel> getCustomProperties(); List<PropertyModel> getImmutableCustomProperties(); List<PropertyModel> getMutableCustomProperties(); SystemPropertiesSnapshot createSystemPropertiesSnapshot(); boolean isAmqBrokerEnabled(); String getAmqBrokerJmxUri(); String getAmqBrokerAdminUsername(); String getAmqBrokerAdminPassword(); Set<String> getAmqBrokerPurgeWhiteList(); String getSiteId(); boolean isOutputObjectsEnabled(); boolean isOutputObjectsArtifactsAndExemplarsOnly(); boolean isOutputObjectsLastTaskOnly(); String getSharePath(); File getJobArtifactsDirectory(long jobId); File createArtifactDirectory(long jobId, long mediaId, int taskIndex,
                                        int actionIndex); File getOutputObjectsDirectory(); File getJobOutputObjectsDirectory(long jobId); Path createDetectionOutputObjectFile(long jobId); File createOutputObjectsDirectory(long jobId); File createStreamingOutputObjectsFile(Instant time, File parentDir); File getRemoteMediaDirectory(); File getTemporaryMediaDirectory(); File getJobMarkupDirectory(long jobId); Path createMarkupPath(long jobId, long mediaId, String extension); ArtifactExtractionPolicy getArtifactExtractionPolicy(); Set<String> getArtifactExtractionNonVisualTypesList(); int getSamplingInterval(); int getJmsPriority(); WritableResource getAlgorithmDefinitions(); WritableResource getActionDefinitions(); WritableResource getTaskDefinitions(); WritableResource getPipelineDefinitions(); WritableResource getNodeManagerPalette(); WritableResource getNodeManagerConfigResource(); WritableResource getStreamingServices(); WritableResource getComponentInfoFile(); File getUploadedComponentsDirectory(); Path getPluginDeploymentPath(); boolean isStartupAutoRegistrationSkipped(); Set<String> getCoreMpfNodes(); String getLogParentDir(); int getWebSessionTimeout(); String getServerMediaTreeRoot(); int getWebMaxFileUploadCnt(); boolean isBroadcastJobStatusEnabled(); String getSemanticVersion(); String getOutputObjectVersion(); FileSystemResource getMediaTypesFile(); FileSystemResource getUserFile(); String getAmqUri(); long getStreamingJobHealthReportCallbackRate(); long getStreamingJobStallAlertThreshold(); String getAnsibleCompDeployPath(); String getAnsibleCompRemovePath(); boolean isAnsibleLocalOnly(); int getRemoteMediaDownloadRetries(); int getRemoteMediaDownloadSleep(); boolean isNodeAutoConfigEnabled(); boolean isNodeAutoUnconfigEnabled(); int getNodeAutoConfigNumServices(); static void createParentDir(Resource resource); int getNginxStorageUploadThreadCount(); int getNginxStorageUploadSegmentSize(); int getHttpStorageUploadRetryCount(); Resource getWorkflowPropertiesFile(); boolean dockerProfileEnabled(); int getHttpCallbackTimeoutMs(); int getHttpCallbackRetryCount(); }
PropertiesUtil { public void setAndSaveCustomProperties(List<PropertyModel> propertyModels) { mpfPropertiesConfig = mpfPropertiesConfigBuilder.setAndSaveCustomProperties(propertyModels); }  String lookup(String propertyName); void setAndSaveCustomProperties(List<PropertyModel> propertyModels); List<PropertyModel> getCustomProperties(); List<PropertyModel> getImmutableCustomProperties(); List<PropertyModel> getMutableCustomProperties(); SystemPropertiesSnapshot createSystemPropertiesSnapshot(); boolean isAmqBrokerEnabled(); String getAmqBrokerJmxUri(); String getAmqBrokerAdminUsername(); String getAmqBrokerAdminPassword(); Set<String> getAmqBrokerPurgeWhiteList(); String getSiteId(); boolean isOutputObjectsEnabled(); boolean isOutputObjectsArtifactsAndExemplarsOnly(); boolean isOutputObjectsLastTaskOnly(); String getSharePath(); File getJobArtifactsDirectory(long jobId); File createArtifactDirectory(long jobId, long mediaId, int taskIndex,
                                        int actionIndex); File getOutputObjectsDirectory(); File getJobOutputObjectsDirectory(long jobId); Path createDetectionOutputObjectFile(long jobId); File createOutputObjectsDirectory(long jobId); File createStreamingOutputObjectsFile(Instant time, File parentDir); File getRemoteMediaDirectory(); File getTemporaryMediaDirectory(); File getJobMarkupDirectory(long jobId); Path createMarkupPath(long jobId, long mediaId, String extension); ArtifactExtractionPolicy getArtifactExtractionPolicy(); Set<String> getArtifactExtractionNonVisualTypesList(); int getSamplingInterval(); int getJmsPriority(); WritableResource getAlgorithmDefinitions(); WritableResource getActionDefinitions(); WritableResource getTaskDefinitions(); WritableResource getPipelineDefinitions(); WritableResource getNodeManagerPalette(); WritableResource getNodeManagerConfigResource(); WritableResource getStreamingServices(); WritableResource getComponentInfoFile(); File getUploadedComponentsDirectory(); Path getPluginDeploymentPath(); boolean isStartupAutoRegistrationSkipped(); Set<String> getCoreMpfNodes(); String getLogParentDir(); int getWebSessionTimeout(); String getServerMediaTreeRoot(); int getWebMaxFileUploadCnt(); boolean isBroadcastJobStatusEnabled(); String getSemanticVersion(); String getOutputObjectVersion(); FileSystemResource getMediaTypesFile(); FileSystemResource getUserFile(); String getAmqUri(); long getStreamingJobHealthReportCallbackRate(); long getStreamingJobStallAlertThreshold(); String getAnsibleCompDeployPath(); String getAnsibleCompRemovePath(); boolean isAnsibleLocalOnly(); int getRemoteMediaDownloadRetries(); int getRemoteMediaDownloadSleep(); boolean isNodeAutoConfigEnabled(); boolean isNodeAutoUnconfigEnabled(); int getNodeAutoConfigNumServices(); static void createParentDir(Resource resource); int getNginxStorageUploadThreadCount(); int getNginxStorageUploadSegmentSize(); int getHttpStorageUploadRetryCount(); Resource getWorkflowPropertiesFile(); boolean dockerProfileEnabled(); int getHttpCallbackTimeoutMs(); int getHttpCallbackRetryCount();  }