From 7ff0c3562a128ac74f786e537a82f64075149a33 Mon Sep 17 00:00:00 2001 From: Daniel Linsley Date: Sat, 30 Sep 2017 20:48:07 -0700 Subject: [PATCH] move services to their own package Signed-off-by: Daniel Linsley --- .../vmware/o11n/plugin/crypto/model/CryptoCertificate.java | 1 + .../o11n/plugin/crypto/model/CryptoCertificateManager.java | 1 + .../com/vmware/o11n/plugin/crypto/model/CryptoDigest.java | 1 + .../com/vmware/o11n/plugin/crypto/model/CryptoEncoding.java | 1 + .../vmware/o11n/plugin/crypto/model/CryptoEncryption.java | 1 + .../java/com/vmware/o11n/plugin/crypto/model/CryptoRSA.java | 1 + .../crypto/{model => service}/CryptoCertificateService.java | 4 +++- .../crypto/{model => service}/CryptoDigestService.java | 2 +- .../crypto/{model => service}/CryptoEncodingService.java | 2 +- .../crypto/{model => service}/CryptoEncryptionService.java | 2 +- .../plugin/crypto/{model => service}/CryptoRSAService.java | 4 +++- .../o11n/plugin/crypto/CryptoCertificateServiceTest.java | 2 +- .../vmware/o11n/plugin/crypto/CryptoDigestServiceTest.java | 4 ++-- .../o11n/plugin/crypto/CryptoEncodingServiceTest.java | 4 ++-- .../o11n/plugin/crypto/CryptoEncryptionServiceTest.java | 6 +++--- .../com/vmware/o11n/plugin/crypto/CryptoRSAServiceTest.java | 4 ++-- 16 files changed, 25 insertions(+), 15 deletions(-) rename o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/{model => service}/CryptoCertificateService.java (98%) rename o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/{model => service}/CryptoDigestService.java (98%) rename o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/{model => service}/CryptoEncodingService.java (99%) rename o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/{model => service}/CryptoEncryptionService.java (99%) rename o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/{model => service}/CryptoRSAService.java (98%) diff --git a/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoCertificate.java b/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoCertificate.java index cee37c3..e0c15ff 100644 --- a/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoCertificate.java +++ b/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoCertificate.java @@ -23,6 +23,7 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import com.vmware.o11n.plugin.crypto.service.CryptoCertificateService; import com.vmware.o11n.plugin.sdk.annotation.VsoConstructor; import com.vmware.o11n.plugin.sdk.annotation.VsoMethod; import com.vmware.o11n.plugin.sdk.annotation.VsoObject; diff --git a/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoCertificateManager.java b/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoCertificateManager.java index d6328df..9148e81 100644 --- a/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoCertificateManager.java +++ b/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoCertificateManager.java @@ -18,6 +18,7 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import com.vmware.o11n.plugin.crypto.service.CryptoCertificateService; import com.vmware.o11n.plugin.sdk.annotation.VsoMethod; import com.vmware.o11n.plugin.sdk.annotation.VsoObject; import com.vmware.o11n.plugin.sdk.spring.AbstractSpringPluginFactory; diff --git a/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoDigest.java b/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoDigest.java index 62fc707..27ab2a4 100644 --- a/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoDigest.java +++ b/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoDigest.java @@ -8,6 +8,7 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import com.vmware.o11n.plugin.crypto.service.CryptoDigestService; import com.vmware.o11n.plugin.sdk.annotation.VsoMethod; import com.vmware.o11n.plugin.sdk.annotation.VsoObject; import com.vmware.o11n.plugin.sdk.annotation.VsoParam; diff --git a/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoEncoding.java b/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoEncoding.java index 6c29034..ca00719 100644 --- a/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoEncoding.java +++ b/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoEncoding.java @@ -11,6 +11,7 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import com.vmware.o11n.plugin.crypto.service.CryptoEncodingService; import com.vmware.o11n.plugin.sdk.annotation.VsoMethod; import com.vmware.o11n.plugin.sdk.annotation.VsoObject; import com.vmware.o11n.plugin.sdk.annotation.VsoParam; diff --git a/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoEncryption.java b/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoEncryption.java index f022a86..62cd5b8 100644 --- a/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoEncryption.java +++ b/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoEncryption.java @@ -16,6 +16,7 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import com.vmware.o11n.plugin.crypto.service.CryptoEncryptionService; import com.vmware.o11n.plugin.sdk.annotation.VsoMethod; import com.vmware.o11n.plugin.sdk.annotation.VsoObject; import com.vmware.o11n.plugin.sdk.annotation.VsoParam; diff --git a/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoRSA.java b/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoRSA.java index 5654a9e..475bd2b 100644 --- a/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoRSA.java +++ b/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoRSA.java @@ -18,6 +18,7 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import com.vmware.o11n.plugin.crypto.service.CryptoRSAService; import com.vmware.o11n.plugin.sdk.annotation.VsoMethod; import com.vmware.o11n.plugin.sdk.annotation.VsoObject; import com.vmware.o11n.plugin.sdk.annotation.VsoParam; diff --git a/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoCertificateService.java b/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/service/CryptoCertificateService.java similarity index 98% rename from o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoCertificateService.java rename to o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/service/CryptoCertificateService.java index e6bb09e..5b1775b 100644 --- a/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoCertificateService.java +++ b/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/service/CryptoCertificateService.java @@ -2,7 +2,7 @@ * Copyright (c) 2017 VMware, Inc. All Rights Reserved. * SPDX-License-Identifier: BSD-2-Clause */ -package com.vmware.o11n.plugin.crypto.model; +package com.vmware.o11n.plugin.crypto.service; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -39,6 +39,8 @@ import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; +import com.vmware.o11n.plugin.crypto.model.CryptoUtil; + @Component public class CryptoCertificateService { diff --git a/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoDigestService.java b/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/service/CryptoDigestService.java similarity index 98% rename from o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoDigestService.java rename to o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/service/CryptoDigestService.java index 293401b..1208c50 100644 --- a/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoDigestService.java +++ b/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/service/CryptoDigestService.java @@ -2,7 +2,7 @@ * Copyright (c) 2017 VMware, Inc. All Rights Reserved. * SPDX-License-Identifier: BSD-2-Clause */ -package com.vmware.o11n.plugin.crypto.model; +package com.vmware.o11n.plugin.crypto.service; import org.apache.commons.codec.binary.Base64; import org.apache.commons.codec.digest.DigestUtils; diff --git a/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoEncodingService.java b/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/service/CryptoEncodingService.java similarity index 99% rename from o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoEncodingService.java rename to o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/service/CryptoEncodingService.java index cb9bc0b..c637ba7 100644 --- a/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoEncodingService.java +++ b/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/service/CryptoEncodingService.java @@ -2,7 +2,7 @@ * Copyright (c) 2017 VMware, Inc. All Rights Reserved. * SPDX-License-Identifier: BSD-2-Clause */ -package com.vmware.o11n.plugin.crypto.model; +package com.vmware.o11n.plugin.crypto.service; import java.io.UnsupportedEncodingException; import java.nio.charset.StandardCharsets; diff --git a/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoEncryptionService.java b/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/service/CryptoEncryptionService.java similarity index 99% rename from o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoEncryptionService.java rename to o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/service/CryptoEncryptionService.java index bf372f7..634437b 100644 --- a/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoEncryptionService.java +++ b/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/service/CryptoEncryptionService.java @@ -2,7 +2,7 @@ * Copyright (c) 2017 VMware, Inc. All Rights Reserved. * SPDX-License-Identifier: BSD-2-Clause */ -package com.vmware.o11n.plugin.crypto.model; +package com.vmware.o11n.plugin.crypto.service; import java.io.IOException; import java.security.InvalidAlgorithmParameterException; diff --git a/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoRSAService.java b/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/service/CryptoRSAService.java similarity index 98% rename from o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoRSAService.java rename to o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/service/CryptoRSAService.java index 3344108..b700d02 100644 --- a/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/model/CryptoRSAService.java +++ b/o11nplugin-crypto-core/src/main/java/com/vmware/o11n/plugin/crypto/service/CryptoRSAService.java @@ -2,7 +2,7 @@ * Copyright (c) 2017 VMware, Inc. All Rights Reserved. * SPDX-License-Identifier: BSD-2-Clause */ -package com.vmware.o11n.plugin.crypto.model; +package com.vmware.o11n.plugin.crypto.service; import java.io.IOException; import java.security.InvalidKeyException; @@ -26,6 +26,8 @@ import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; +import com.vmware.o11n.plugin.crypto.model.CryptoUtil; + @Component public class CryptoRSAService { private final Logger log = LoggerFactory.getLogger(CryptoRSAService.class); diff --git a/o11nplugin-crypto-core/src/test/java/com/vmware/o11n/plugin/crypto/CryptoCertificateServiceTest.java b/o11nplugin-crypto-core/src/test/java/com/vmware/o11n/plugin/crypto/CryptoCertificateServiceTest.java index a584dfb..8decbef 100644 --- a/o11nplugin-crypto-core/src/test/java/com/vmware/o11n/plugin/crypto/CryptoCertificateServiceTest.java +++ b/o11nplugin-crypto-core/src/test/java/com/vmware/o11n/plugin/crypto/CryptoCertificateServiceTest.java @@ -24,8 +24,8 @@ import org.junit.Test; -import com.vmware.o11n.plugin.crypto.model.CryptoCertificateService; import com.vmware.o11n.plugin.crypto.model.CryptoUtil; +import com.vmware.o11n.plugin.crypto.service.CryptoCertificateService; public class CryptoCertificateServiceTest { diff --git a/o11nplugin-crypto-core/src/test/java/com/vmware/o11n/plugin/crypto/CryptoDigestServiceTest.java b/o11nplugin-crypto-core/src/test/java/com/vmware/o11n/plugin/crypto/CryptoDigestServiceTest.java index 11bdba9..4d3b9dd 100644 --- a/o11nplugin-crypto-core/src/test/java/com/vmware/o11n/plugin/crypto/CryptoDigestServiceTest.java +++ b/o11nplugin-crypto-core/src/test/java/com/vmware/o11n/plugin/crypto/CryptoDigestServiceTest.java @@ -11,8 +11,8 @@ import org.apache.commons.codec.DecoderException; import org.junit.Test; -import com.vmware.o11n.plugin.crypto.model.CryptoDigestService; -import com.vmware.o11n.plugin.crypto.model.CryptoEncodingService; +import com.vmware.o11n.plugin.crypto.service.CryptoDigestService; +import com.vmware.o11n.plugin.crypto.service.CryptoEncodingService; public class CryptoDigestServiceTest { diff --git a/o11nplugin-crypto-core/src/test/java/com/vmware/o11n/plugin/crypto/CryptoEncodingServiceTest.java b/o11nplugin-crypto-core/src/test/java/com/vmware/o11n/plugin/crypto/CryptoEncodingServiceTest.java index fa450c5..1e1928f 100644 --- a/o11nplugin-crypto-core/src/test/java/com/vmware/o11n/plugin/crypto/CryptoEncodingServiceTest.java +++ b/o11nplugin-crypto-core/src/test/java/com/vmware/o11n/plugin/crypto/CryptoEncodingServiceTest.java @@ -11,8 +11,8 @@ import org.apache.commons.codec.DecoderException; import org.junit.Test; -import com.vmware.o11n.plugin.crypto.model.CryptoEncodingService; -import com.vmware.o11n.plugin.crypto.model.CryptoEncryptionService; +import com.vmware.o11n.plugin.crypto.service.CryptoEncodingService; +import com.vmware.o11n.plugin.crypto.service.CryptoEncryptionService; public class CryptoEncodingServiceTest { diff --git a/o11nplugin-crypto-core/src/test/java/com/vmware/o11n/plugin/crypto/CryptoEncryptionServiceTest.java b/o11nplugin-crypto-core/src/test/java/com/vmware/o11n/plugin/crypto/CryptoEncryptionServiceTest.java index 27bb69c..7cc75d9 100644 --- a/o11nplugin-crypto-core/src/test/java/com/vmware/o11n/plugin/crypto/CryptoEncryptionServiceTest.java +++ b/o11nplugin-crypto-core/src/test/java/com/vmware/o11n/plugin/crypto/CryptoEncryptionServiceTest.java @@ -18,9 +18,9 @@ import org.apache.commons.codec.binary.Base64; import org.junit.Test; -import com.vmware.o11n.plugin.crypto.model.CryptoDigestService; -import com.vmware.o11n.plugin.crypto.model.CryptoEncodingService; -import com.vmware.o11n.plugin.crypto.model.CryptoEncryptionService; +import com.vmware.o11n.plugin.crypto.service.CryptoDigestService; +import com.vmware.o11n.plugin.crypto.service.CryptoEncodingService; +import com.vmware.o11n.plugin.crypto.service.CryptoEncryptionService; public class CryptoEncryptionServiceTest { diff --git a/o11nplugin-crypto-core/src/test/java/com/vmware/o11n/plugin/crypto/CryptoRSAServiceTest.java b/o11nplugin-crypto-core/src/test/java/com/vmware/o11n/plugin/crypto/CryptoRSAServiceTest.java index 13a4e92..7957b4a 100644 --- a/o11nplugin-crypto-core/src/test/java/com/vmware/o11n/plugin/crypto/CryptoRSAServiceTest.java +++ b/o11nplugin-crypto-core/src/test/java/com/vmware/o11n/plugin/crypto/CryptoRSAServiceTest.java @@ -17,8 +17,8 @@ import org.junit.Test; -import com.vmware.o11n.plugin.crypto.model.CryptoEncryptionService; -import com.vmware.o11n.plugin.crypto.model.CryptoRSAService; +import com.vmware.o11n.plugin.crypto.service.CryptoEncryptionService; +import com.vmware.o11n.plugin.crypto.service.CryptoRSAService; public class CryptoRSAServiceTest {