aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp
diff options
context:
space:
mode:
authorTomasz Golabek <tomasz.golabek@nokia.com>2019-07-02 12:07:50 +0200
committerOren Kleks <orenkle@amdocs.com>2019-07-07 12:39:11 +0000
commit6185ebc6d0e1e002029764dadd43818c71ab1120 (patch)
tree7d7336d483d7472504915a5911ef3f69db5bbfbf /openecomp-be/api/openecomp-sdc-rest-webapp
parent958a87de8f3c19ce51d969047f750692da2ba833 (diff)
Autowired annotation for openecomp-be
Injection of the properties moved to the constructor replacing field annotations. Change-Id: I5ea031c9ab414859d810cb8686de3ce6ccebfd0a Issue-ID: SDC-2406 Signed-off-by: Tomasz Golabek <tomasz.golabek@nokia.com>
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/src/main/java/org/openecomp/sdcrests/action/rest/services/ActionsImpl.java12
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/services/ApplicationConfigurationImpl.java9
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/externaltesting-rest/externaltesting-rest-services/src/main/java/org/openecomp/sdcrests/externaltesting/rest/services/ExternalTestingImpl.java5
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/src/main/java/org/openecomp/sdcrests/validation/rest/services/ValidationImpl.java9
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ProcessesImpl.java8
5 files changed, 37 insertions, 6 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/src/main/java/org/openecomp/sdcrests/action/rest/services/ActionsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/src/main/java/org/openecomp/sdcrests/action/rest/services/ActionsImpl.java
index 2927a7fdd3..7154d997c7 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/src/main/java/org/openecomp/sdcrests/action/rest/services/ActionsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/src/main/java/org/openecomp/sdcrests/action/rest/services/ActionsImpl.java
@@ -16,6 +16,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
+ * Modifications copyright (c) 2019 Nokia
+ * ================================================================================
*/
package org.openecomp.sdcrests.action.rest.services;
@@ -146,8 +148,9 @@ import javax.ws.rs.core.Response;
public class ActionsImpl implements Actions {
private static final Logger LOGGER = LoggerFactory.getLogger(ActionsImpl.class);
- @Autowired
- private ActionManager actionManager;
+
+ private final ActionManager actionManager;
+
private String whitespaceCharacters = "\\s" /* dummy empty string for homogeneity */
+ "\\u0009" // CHARACTER TABULATION
+ "\\u000A" // LINE FEED (LF)
@@ -180,6 +183,11 @@ public class ActionsImpl implements Actions {
private String whitespaceRegex = ".*[" + whitespaceCharacters + "].*";
private String invalidFilenameRegex = ".*[" + whitespaceCharacters + invalidFilenameChars + "].*";
+ @Autowired
+ public ActionsImpl(ActionManager actionManager) {
+ this.actionManager = actionManager;
+ }
+
/**
* Calculate the checksum for a given input
*
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/services/ApplicationConfigurationImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/services/ApplicationConfigurationImpl.java
index 9a722a237b..349ec87276 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/services/ApplicationConfigurationImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/services/ApplicationConfigurationImpl.java
@@ -16,6 +16,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
+ * Modifications copyright (c) 2019 Nokia
+ * ================================================================================
*/
package org.openecomp.sdcrests.applicationconfig.rest.services;
@@ -47,8 +49,13 @@ import java.util.Collection;
@Service("applicationConfiguration")
@Scope(value = "prototype")
public class ApplicationConfigurationImpl implements ApplicationConfiguration {
+
+ private final ApplicationConfigManager applicationConfigManager;
+
@Autowired
- private ApplicationConfigManager applicationConfigManager;
+ public ApplicationConfigurationImpl(ApplicationConfigManager applicationConfigManager) {
+ this.applicationConfigManager = applicationConfigManager;
+ }
@Override
public Response insertToTable(String namespace, String key, InputStream fileContainingSchema) {
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/externaltesting-rest/externaltesting-rest-services/src/main/java/org/openecomp/sdcrests/externaltesting/rest/services/ExternalTestingImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/externaltesting-rest/externaltesting-rest-services/src/main/java/org/openecomp/sdcrests/externaltesting/rest/services/ExternalTestingImpl.java
index 4e8134ff69..1ce89b6748 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/externaltesting-rest/externaltesting-rest-services/src/main/java/org/openecomp/sdcrests/externaltesting/rest/services/ExternalTestingImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/externaltesting-rest/externaltesting-rest-services/src/main/java/org/openecomp/sdcrests/externaltesting/rest/services/ExternalTestingImpl.java
@@ -12,6 +12,9 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
+ * ============LICENSE_END=========================================================
+ * Modifications copyright (c) 2019 Nokia
+ * ================================================================================
*/
package org.openecomp.sdcrests.externaltesting.rest.services;
@@ -39,7 +42,7 @@ import java.util.stream.Collectors;
@Scope(value = "prototype")
public class ExternalTestingImpl implements ExternalTesting {
- private ExternalTestingManager testingManager;
+ private final ExternalTestingManager testingManager;
private static final Logger logger =
LoggerFactory.getLogger(ExternalTestingImpl.class);
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/src/main/java/org/openecomp/sdcrests/validation/rest/services/ValidationImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/src/main/java/org/openecomp/sdcrests/validation/rest/services/ValidationImpl.java
index 559adca4f4..1ece6f75f8 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/src/main/java/org/openecomp/sdcrests/validation/rest/services/ValidationImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/src/main/java/org/openecomp/sdcrests/validation/rest/services/ValidationImpl.java
@@ -16,6 +16,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
+ * Modifications copyright (c) 2019 Nokia
+ * ================================================================================
*/
package org.openecomp.sdcrests.validation.rest.services;
@@ -39,8 +41,13 @@ import java.io.InputStream;
@Service("validation")
@Scope(value = "prototype")
public class ValidationImpl implements Validation {
+
+ private final UploadValidationManager uploadValidationManager;
+
@Autowired
- private UploadValidationManager uploadValidationManager;
+ public ValidationImpl(UploadValidationManager uploadValidationManager) {
+ this.uploadValidationManager = uploadValidationManager;
+ }
@Override
public Response validateFile(String type, InputStream fileToValidate) {
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ProcessesImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ProcessesImpl.java
index bc22230dde..3a03b1f73b 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ProcessesImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ProcessesImpl.java
@@ -16,6 +16,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
+ * Modifications copyright (c) 2019 Nokia
+ * ================================================================================
*/
package org.openecomp.sdcrests.vsp.rest.services;
@@ -36,8 +38,12 @@ import javax.ws.rs.core.Response;
@Scope(value = "prototype")
public class ProcessesImpl implements Processes {
+ private final ComponentProcesses componentProcesses;
+
@Autowired
- private ComponentProcesses componentProcesses;
+ public ProcessesImpl(ComponentProcesses componentProcesses) {
+ this.componentProcesses = componentProcesses;
+ }
@Override
public Response list(String vspId, String versionId, String user) {