<?xml version="1.0"?>
<!--
- Copyright (C) 2024 Nordix Foundation.
+ Copyright (C) 2024-2026 OpenInfra Foundation Europe. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
<property name="tokens" value="VARIABLE_DEF,PARAMETER_DEF"/>
<property name="validateEnhancedForLoopVariable" value="true"/>
</module>
+ <module name="UnusedLocalVariable"/>
<module name="UnusedImports"/>
</module>
-</module>
\ No newline at end of file
+</module>
if (exception instanceof ProvMnSException) {
return (ProvMnSException) exception;
}
- final ProvMnSException provMnSException = new ProvMnSException();
- provMnSException.setHttpMethodName(httpMethodName);
- provMnSException.setTitle(exception.getMessage());
- provMnSException.setBadOp(badOp);
final HttpStatus httpStatus;
if (exception instanceof PolicyExecutorException) {
httpStatus = CONFLICT;
} else {
httpStatus = INTERNAL_SERVER_ERROR;
}
- provMnSException.setHttpStatus(httpStatus);
- log.warn("ProvMns Exception: {}", provMnSException.getTitle());
- return provMnSException;
+ log.warn("ProvMns Exception: {}", exception.getMessage());
+ return new ProvMnSException(httpMethodName, httpStatus, exception.getMessage(), badOp);
}
}
package org.onap.cps.ncmp.api.exceptions;
import lombok.Getter;
-import lombok.NoArgsConstructor;
-import lombok.Setter;
import org.springframework.http.HttpStatus;
@Getter
-@Setter
-@NoArgsConstructor
public class ProvMnSException extends RuntimeException {
- private String httpMethodName;
- private HttpStatus httpStatus;
- private String title;
- private String badOp;
+ private final String httpMethodName;
+ private final HttpStatus httpStatus;
+ private final String title;
+ private final String badOp;
/**
* Constructor.
package org.onap.cps.ncmp.impl.provmns;
import jakarta.servlet.http.HttpServletRequest;
+import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.onap.cps.ncmp.api.exceptions.ProvMnSException;
import org.springframework.http.HttpStatus;
-@NoArgsConstructor
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class ParameterHelper {
public static final String NO_OP = null;
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021-2025 OpenInfra Foundation Europe. All rights reserved.
+ * Copyright (C) 2021-2026 OpenInfra Foundation Europe. All rights reserved.
* Modifications Copyright (C) 2020-2022 Bell Canada.
* Modifications Copyright (C) 2021 Pantheon.tech
* Modifications Copyright (C) 2022-2025 Deutsche Telekom AG
description = "Time taken to delete all data nodes for multiple anchors")
public void deleteDataNodes(final String dataspaceName, final Collection<String> anchorNames,
final OffsetDateTime observedTimestamp) {
- final boolean deltaNotification = false;
cpsValidator.validateNameCharacters(dataspaceName);
cpsValidator.validateNameCharacters(anchorNames);
cpsDataPersistenceService.deleteDataNodes(dataspaceName, anchorNames);