-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(job): Added JobServiceSetting 'job.step.property.value.length.ma…
…x' as soft limit for JobStepProperty.propertyValue Signed-off-by: Alberto Codutti <[email protected]>
- Loading branch information
Showing
3 changed files
with
126 additions
and
2 deletions.
There are no files selected for viewing
53 changes: 53 additions & 0 deletions
53
.../src/main/java/org/eclipse/kapua/service/job/internal/settings/JobServiceSettingKeys.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2023, 2022 Eurotech and/or its affiliates and others | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Eurotech - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.kapua.service.job.internal.settings; | ||
|
||
import org.eclipse.kapua.commons.setting.SettingKey; | ||
import org.eclipse.kapua.service.job.step.definition.JobStepProperty; | ||
|
||
/** | ||
* {@link SettingKey}s for {@link JobServiceSettings}. | ||
* | ||
* @since 2.0.0 | ||
*/ | ||
public enum JobServiceSettingKeys implements SettingKey { | ||
|
||
/** | ||
* Max length of {@link JobStepProperty#getPropertyValue()}. | ||
* | ||
* @since 2.0.0 | ||
*/ | ||
JOB_STEP_PROPERTY_VALUE_LENGTH_MAX("job.step.property.value.length.max"); | ||
|
||
/** | ||
* The key value of the {@link SettingKey}. | ||
* | ||
* @since 120.0 | ||
*/ | ||
private final String key; | ||
|
||
/** | ||
* Constructor. | ||
* | ||
* @param key The key value of the {@link SettingKey}. | ||
* @since 2.0.0 | ||
*/ | ||
private JobServiceSettingKeys(String key) { | ||
this.key = key; | ||
} | ||
|
||
@Override | ||
public String key() { | ||
return key; | ||
} | ||
} |
57 changes: 57 additions & 0 deletions
57
...nal/src/main/java/org/eclipse/kapua/service/job/internal/settings/JobServiceSettings.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2016, 2022 Eurotech and/or its affiliates and others | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Eurotech - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.kapua.service.job.internal.settings; | ||
|
||
import org.eclipse.kapua.commons.setting.AbstractKapuaSetting; | ||
|
||
/** | ||
* {@link AbstractKapuaSetting} for {@code kapua-job-internal} module. | ||
* | ||
* @see AbstractKapuaSetting | ||
* @since 2.0.0 | ||
*/ | ||
public class JobServiceSettings extends AbstractKapuaSetting<JobServiceSettingKeys> { | ||
|
||
/** | ||
* Setting filename. | ||
* | ||
* @since 2.0.0 | ||
*/ | ||
private static final String JOB_SERVICE_SETTING_RESOURCE = "job-service-settings.properties"; | ||
|
||
/** | ||
* Singleton instance. | ||
* | ||
* @since 2.0.0 | ||
*/ | ||
private static final JobServiceSettings INSTANCE = new JobServiceSettings(); | ||
|
||
/** | ||
* Constructor. | ||
* | ||
* @since 2.0.0 | ||
*/ | ||
private JobServiceSettings() { | ||
super(JOB_SERVICE_SETTING_RESOURCE); | ||
} | ||
|
||
/** | ||
* Gets a singleton instance of {@link JobServiceSettings}. | ||
* | ||
* @return A singleton instance of {@link JobServiceSettings}. | ||
* @since 2.0.0 | ||
*/ | ||
public static JobServiceSettings getInstance() { | ||
return INSTANCE; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters