Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
MamboArchivingGUI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software Control System
Tango controls archiving
MamboArchivingGUI
Commits
4383fe3b
Commit
4383fe3b
authored
1 month ago
by
Raphael GIRARDOT
Browse files
Options
Downloads
Patches
Plain Diff
Don't throw error when id is not found: just return null InsetionModes
parent
c48110d6
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/fr/soleil/mambo/api/archiving/TTSArchivingManagerApi.java
+10
-5
10 additions, 5 deletions
...fr/soleil/mambo/api/archiving/TTSArchivingManagerApi.java
with
10 additions
and
5 deletions
src/main/java/fr/soleil/mambo/api/archiving/TTSArchivingManagerApi.java
+
10
−
5
View file @
4383fe3b
...
...
@@ -62,7 +62,6 @@ public class TTSArchivingManagerApi implements IArchivingManagerApi {
private
static
final
String
DOUBLE_SLASH
=
"//"
;
private
static
final
String
GROUP_NAME
=
"Check-Exported-TTS-Archivers"
;
private
static
final
String
FAILED_TO_GET_ARCHIVER_LIST
=
"Failed to get archiver list: "
;
private
static
final
String
NO_ID_FOUND_FOR
=
"no id found for "
;
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
TTSArchivingManagerApi
.
class
);
...
...
@@ -89,7 +88,8 @@ public class TTSArchivingManagerApi implements IArchivingManagerApi {
config
.
setUser
(
params
.
getUser
());
config
.
setPassword
(
params
.
getPassword
());
// TANGOARCH-833: possibility to connect to another port
config
.
setPort
(
ApiUtils
.
getProperty
(
ApiConstants
.
TTS_PORT_PROPERTY
,
ApiConstants
.
TTS_PORT_ENV
,
config
.
getPort
()));
config
.
setPort
(
ApiUtils
.
getProperty
(
ApiConstants
.
TTS_PORT_PROPERTY
,
ApiConstants
.
TTS_PORT_ENV
,
config
.
getPort
()));
config
.
setIdleTimeout
(
params
.
getInactivityTimeout
());
config
.
setMaxPoolSize
(
params
.
getMaxPoolSize
());
if
(
params
.
getHealthRegistry
()
!=
null
)
{
...
...
@@ -347,22 +347,27 @@ public class TTSArchivingManagerApi implements IArchivingManagerApi {
public
InsertionModes
getInsertionModes
(
String
attributeName
)
throws
ArchivingException
{
OptionalInt
id
;
Optional
<
InsertionModes
>
modes
;
if
(
configService
==
null
)
{
id
=
null
;
}
else
{
id
=
configService
.
getAttributeID
(
attributeName
);
}
if
(
id
==
null
||
!
id
.
isPresent
())
{
throw
new
ArchivingException
(
NO_ID_FOUND_FOR
+
attributeName
);
// No InsertionModes if id is not found
modes
=
null
;
}
else
{
modes
=
configService
.
getCurrentInsertionModes
(
id
.
getAsInt
());
}
Optional
<
InsertionModes
>
modes
=
configService
.
getCurrentInsertionModes
(
id
.
getAsInt
());
return
modes
==
null
||
!
modes
.
isPresent
()
?
null
:
modes
.
get
();
}
@Override
public
String
[]
getArchivingMode
(
String
attributeName
)
throws
ArchivingException
{
InsertionModes
modes
=
getInsertionModes
(
attributeName
);
return
ApiUtils
.
cleanToStringArray
(
ArchivingUtils
.
insertionModesToStringArray
(
new
ArrayList
<>(),
modes
));
// Return empty array if modes is null
return
modes
==
null
?
ApiConstants
.
EMPTY
:
ApiUtils
.
cleanToStringArray
(
ArchivingUtils
.
insertionModesToStringArray
(
new
ArrayList
<>(),
modes
));
}
@Override
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment