From 02ed3263ac9b9349b1a51010b4bf8ae32bb6dbbe Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1s=C3=A1ry=20D=C3=A1niel?= Date: Mon, 25 Mar 2024 12:14:18 +0100 Subject: [PATCH] Nexio restore config bug --- .../server/steps/TSMExtendedRetrieveStep.java | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/server/user.jobengine.executors/src/user/jobengine/server/steps/TSMExtendedRetrieveStep.java b/server/user.jobengine.executors/src/user/jobengine/server/steps/TSMExtendedRetrieveStep.java index 8f81dde8..ade2d941 100644 --- a/server/user.jobengine.executors/src/user/jobengine/server/steps/TSMExtendedRetrieveStep.java +++ b/server/user.jobengine.executors/src/user/jobengine/server/steps/TSMExtendedRetrieveStep.java @@ -12,8 +12,9 @@ import user.jobengine.server.IJobRuntime; import user.jobengine.server.steps.shared.EscortFiles; public class TSMExtendedRetrieveStep extends TSMRestoreStep { - private static String NEXIO_HOST = System.getProperty("nexio.host"); - // private static String NEXIO_HOST = SystemConfiguration.getInstance().value("services.nexio.host"); + private static String NEXIO_HOST = "10.10.1.55"; + // private static String NEXIO_HOST = + // SystemConfiguration.getInstance().value("services.nexio.host"); private static final Logger logger = LogManager.getLogger(); private boolean useNexioTarget; @@ -22,7 +23,8 @@ public class TSMExtendedRetrieveStep extends TSMRestoreStep { private String nexioAgency; @Override - protected void afterRestore(StoreUri targetUri, String targetPath, int killDateDays, String targetFileName) throws Exception { + protected void afterRestore(StoreUri targetUri, String targetPath, int killDateDays, String targetFileName) + throws Exception { if (useNexioTarget) { EscortFiles.setNEXIOKillDate(killDateDays, targetFileName, nexioAgency, targetUri); } else { @@ -37,7 +39,8 @@ public class TSMExtendedRetrieveStep extends TSMRestoreStep { newTargetName = targetName.substring(0, targetName.lastIndexOf('.')); if (useNexioTarget) if (targetURI.fileExists(newTargetName + ".mxf")) - throw new Exception(String.format("%s-The newly created file name is existed.", getClass().getSimpleName())); + throw new Exception( + String.format("%s-The newly created file name is existed.", getClass().getSimpleName())); } @Override @@ -64,9 +67,10 @@ public class TSMExtendedRetrieveStep extends TSMRestoreStep { } @StepEntry - public Object[] execute(ArchivedMedia archivedMedia, String targetPath, String targetNamePattern, String successRecipient, int killDateDays, - String localRetrievePath, String globalRetrievePath, boolean useNexioTarget, String nexioAgency, int nexioPort, String nexioUserName, - String nexioPassword, IJobEngine jobEngine, IJobRuntime jobRuntime) throws Exception { + public Object[] execute(ArchivedMedia archivedMedia, String targetPath, String targetNamePattern, + String successRecipient, int killDateDays, String localRetrievePath, String globalRetrievePath, + boolean useNexioTarget, String nexioAgency, int nexioPort, String nexioUserName, String nexioPassword, + IJobEngine jobEngine, IJobRuntime jobRuntime) throws Exception { this.useNexioTarget = useNexioTarget; this.nexioAgency = nexioAgency; this.nexioPort = nexioPort; @@ -76,17 +80,19 @@ public class TSMExtendedRetrieveStep extends TSMRestoreStep { throw new NullPointerException("System is not configured properly, 'nexioPort' input parameter missing."); } if (nexioUserName == null) { - throw new NullPointerException("System is not configured properly, 'nexioUserName' input parameter missing."); + throw new NullPointerException( + "System is not configured properly, 'nexioUserName' input parameter missing."); } if (nexioPassword == null) { - throw new NullPointerException("System is not configured properly, 'nexioPassword' input parameter missing."); + throw new NullPointerException( + "System is not configured properly, 'nexioPassword' input parameter missing."); } if (nexioAgency == null) { throw new NullPointerException("System is not configured properly, 'nexioAgency' input parameter missing."); } - return super.execute(archivedMedia.getMedia(), targetPath, targetNamePattern, successRecipient, killDateDays, localRetrievePath, globalRetrievePath, - jobEngine, jobRuntime); + return super.execute(archivedMedia.getMedia(), targetPath, targetNamePattern, successRecipient, killDateDays, + localRetrievePath, globalRetrievePath, jobEngine, jobRuntime); } } -- 2.54.0