From bf2f19f08dcd36ff2cb9dd6591e759c4c2e50945 Mon Sep 17 00:00:00 2001 From: Bruk Ori Date: Tue, 23 Jul 2024 22:24:17 +0300 Subject: [PATCH] [#1] provide naming conventions Signed-off-by: Ori Bruk --- README.md | 28 +++++----- client/pom.xml | 8 +-- .../FrostFS/sdk/services/NetmapClient.java | 13 ----- .../FrostFS/sdk/services/ToolsClient.java | 8 --- .../sdk/constants/CryptoConst.java | 2 +- .../sdk/jdo/ClientEnvironment.java | 8 +-- .../sdk/jdo/ClientSettings.java | 2 +- .../{FrostFS => frostfs}/sdk/jdo/ECDsa.java | 4 +- .../sdk/jdo/NetworkSettings.java | 2 +- .../sdk/jdo/PutObjectParameters.java | 4 +- .../sdk/services/ContainerClient.java | 6 +- .../sdk/services/ContextAccessor.java | 4 +- .../sdk/services/FrostFSClient.java | 36 ++++++------ .../frostfs/sdk/services/NetmapClient.java | 13 +++++ .../sdk/services/ObjectClient.java | 14 ++--- .../sdk/services/SessionClient.java | 4 +- .../frostfs/sdk/services/ToolsClient.java | 8 +++ .../sdk/services/impl/ContainerService.java | 53 +++++++++--------- .../sdk/services/impl/NetmapService.java | 30 +++++----- .../sdk/services/impl/ObjectReader.java | 8 +-- .../sdk/services/impl/ObjectService.java | 56 +++++++++---------- .../sdk/services/impl/ObjectTools.java | 44 +++++++-------- .../sdk/services/impl/ObjectWriter.java | 6 +- .../sdk/services/impl/SearchReader.java | 8 +-- .../sdk/services/impl/SessionService.java | 27 ++++----- .../sdk/tools/GrpcClient.java | 2 +- .../sdk/tools/MessageHelper.java | 2 +- .../sdk/tools/RequestConstructor.java | 22 ++++---- .../sdk/tools/RequestSigner.java | 44 +++++++-------- .../sdk/tools/Verifier.java | 31 +++++----- cryptography/pom.xml | 4 +- .../{FrostFS => frostfs}/sdk/ArrayHelper.java | 2 +- .../info/{FrostFS => frostfs}/sdk/Base58.java | 6 +- .../info/{FrostFS => frostfs}/sdk/Helper.java | 2 +- .../sdk/KeyExtension.java | 6 +- models/pom.xml | 8 +-- .../sdk/UUIDExtension.java | 2 +- .../sdk/constants/AppConst.java | 2 +- .../sdk/constants/FieldConst.java | 2 +- .../sdk/constants/XHeaderConst.java | 2 +- .../sdk/dto/MetaHeader.java | 2 +- .../{FrostFS => frostfs}/sdk/dto/OwnerId.java | 6 +- .../sdk/dto/SessionToken.java | 2 +- .../sdk/dto/Signature.java | 4 +- .../{FrostFS => frostfs}/sdk/dto/Split.java | 6 +- .../{FrostFS => frostfs}/sdk/dto/SplitId.java | 6 +- .../{FrostFS => frostfs}/sdk/dto/Status.java | 4 +- .../{FrostFS => frostfs}/sdk/dto/Version.java | 2 +- .../sdk/dto/container/Container.java | 8 +-- .../sdk/dto/container/ContainerId.java | 6 +- .../sdk/dto/netmap/NetmapSnapshot.java | 2 +- .../sdk/dto/netmap/NodeInfo.java | 6 +- .../sdk/dto/netmap/PlacementPolicy.java | 2 +- .../sdk/dto/netmap/Replica.java | 2 +- .../sdk/dto/object/LargeObject.java | 6 +- .../sdk/dto/object/LinkObject.java | 8 +-- .../sdk/dto/object/ObjectAttribute.java | 2 +- .../sdk/dto/object/ObjectFilter.java | 8 +-- .../sdk/dto/object/ObjectFrostFS.java | 8 +-- .../sdk/dto/object/ObjectHeader.java | 12 ++-- .../sdk/dto/object/ObjectId.java | 6 +- .../sdk/enums/BasicAcl.java | 2 +- .../sdk/enums/NodeState.java | 2 +- .../sdk/enums/ObjectMatchType.java | 2 +- .../sdk/enums/ObjectType.java | 2 +- .../sdk/enums/SignatureScheme.java | 2 +- .../sdk/enums/StatusCode.java | 2 +- .../sdk/mappers/MetaHeaderMapper.java | 6 +- .../sdk/mappers/OwnerIdMapper.java | 6 +- .../sdk/mappers/SessionMapper.java | 4 +- .../sdk/mappers/SignatureMapper.java | 6 +- .../sdk/mappers/StatusMapper.java | 8 +-- .../sdk/mappers/VersionMapper.java | 6 +- .../mappers/container/ContainerIdMapper.java | 6 +- .../mappers/container/ContainerMapper.java | 16 +++--- .../mappers/netmap/NetmapSnapshotMapper.java | 6 +- .../sdk/mappers/netmap/NodeInfoMapper.java | 16 +++--- .../mappers/netmap/PlacementPolicyMapper.java | 8 +-- .../sdk/mappers/netmap/ReplicaMapper.java | 6 +- .../mappers/object/ObjectAttributeMapper.java | 6 +- .../mappers/object/ObjectFilterMapper.java | 8 +-- .../mappers/object/ObjectFrostFSMapper.java | 8 +-- .../mappers/object/ObjectHeaderMapper.java | 16 +++--- .../sdk/mappers/object/ObjectIdMapper.java | 6 +- pom.xml | 4 +- protos/pom.xml | 4 +- .../src/main/proto/accounting/service.proto | 2 +- protos/src/main/proto/accounting/types.proto | 2 +- protos/src/main/proto/acl/types.proto | 2 +- .../src/main/proto/apemanager/service.proto | 2 +- protos/src/main/proto/apemanager/types.proto | 2 +- protos/src/main/proto/container/service.proto | 2 +- protos/src/main/proto/container/types.proto | 2 +- protos/src/main/proto/lock/types.proto | 2 +- protos/src/main/proto/netmap/service.proto | 2 +- protos/src/main/proto/netmap/types.proto | 2 +- protos/src/main/proto/object/service.proto | 2 +- protos/src/main/proto/object/types.proto | 2 +- protos/src/main/proto/refs/types.proto | 2 +- protos/src/main/proto/session/service.proto | 2 +- protos/src/main/proto/session/types.proto | 2 +- protos/src/main/proto/status/types.proto | 2 +- protos/src/main/proto/tombstone/types.proto | 2 +- 103 files changed, 416 insertions(+), 417 deletions(-) delete mode 100644 client/src/main/java/info/FrostFS/sdk/services/NetmapClient.java delete mode 100644 client/src/main/java/info/FrostFS/sdk/services/ToolsClient.java rename client/src/main/java/info/{FrostFS => frostfs}/sdk/constants/CryptoConst.java (75%) rename client/src/main/java/info/{FrostFS => frostfs}/sdk/jdo/ClientEnvironment.java (88%) rename client/src/main/java/info/{FrostFS => frostfs}/sdk/jdo/ClientSettings.java (97%) rename client/src/main/java/info/{FrostFS => frostfs}/sdk/jdo/ECDsa.java (88%) rename client/src/main/java/info/{FrostFS => frostfs}/sdk/jdo/NetworkSettings.java (99%) rename client/src/main/java/info/{FrostFS => frostfs}/sdk/jdo/PutObjectParameters.java (96%) rename client/src/main/java/info/{FrostFS => frostfs}/sdk/services/ContainerClient.java (64%) rename client/src/main/java/info/{FrostFS => frostfs}/sdk/services/ContextAccessor.java (75%) rename client/src/main/java/info/{FrostFS => frostfs}/sdk/services/FrostFSClient.java (82%) create mode 100644 client/src/main/java/info/frostfs/sdk/services/NetmapClient.java rename client/src/main/java/info/{FrostFS => frostfs}/sdk/services/ObjectClient.java (54%) rename client/src/main/java/info/{FrostFS => frostfs}/sdk/services/SessionClient.java (52%) create mode 100644 client/src/main/java/info/frostfs/sdk/services/ToolsClient.java rename client/src/main/java/info/{FrostFS => frostfs}/sdk/services/impl/ContainerService.java (68%) rename client/src/main/java/info/{FrostFS => frostfs}/sdk/services/impl/NetmapService.java (86%) rename client/src/main/java/info/{FrostFS => frostfs}/sdk/services/impl/ObjectReader.java (91%) rename client/src/main/java/info/{FrostFS => frostfs}/sdk/services/impl/ObjectService.java (90%) rename client/src/main/java/info/{FrostFS => frostfs}/sdk/services/impl/ObjectTools.java (75%) rename client/src/main/java/info/{FrostFS => frostfs}/sdk/services/impl/ObjectWriter.java (93%) rename client/src/main/java/info/{FrostFS => frostfs}/sdk/services/impl/SearchReader.java (72%) rename client/src/main/java/info/{FrostFS => frostfs}/sdk/services/impl/SessionService.java (75%) rename client/src/main/java/info/{FrostFS => frostfs}/sdk/tools/GrpcClient.java (96%) rename client/src/main/java/info/{FrostFS => frostfs}/sdk/tools/MessageHelper.java (94%) rename client/src/main/java/info/{FrostFS => frostfs}/sdk/tools/RequestConstructor.java (74%) rename client/src/main/java/info/{FrostFS => frostfs}/sdk/tools/RequestSigner.java (72%) rename client/src/main/java/info/{FrostFS => frostfs}/sdk/tools/Verifier.java (80%) rename cryptography/src/main/java/info/{FrostFS => frostfs}/sdk/ArrayHelper.java (93%) rename cryptography/src/main/java/info/{FrostFS => frostfs}/sdk/Base58.java (97%) rename cryptography/src/main/java/info/{FrostFS => frostfs}/sdk/Helper.java (97%) rename cryptography/src/main/java/info/{FrostFS => frostfs}/sdk/KeyExtension.java (98%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/UUIDExtension.java (95%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/constants/AppConst.java (79%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/constants/FieldConst.java (93%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/constants/XHeaderConst.java (89%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/dto/MetaHeader.java (96%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/dto/OwnerId.java (75%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/dto/SessionToken.java (91%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/dto/Signature.java (87%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/dto/Split.java (91%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/dto/SplitId.java (85%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/dto/Status.java (92%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/dto/Version.java (95%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/dto/container/Container.java (86%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/dto/container/ContainerId.java (85%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/dto/netmap/NetmapSnapshot.java (92%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/dto/netmap/NodeInfo.java (89%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/dto/netmap/PlacementPolicy.java (90%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/dto/netmap/Replica.java (94%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/dto/object/LargeObject.java (81%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/dto/object/LinkObject.java (74%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/dto/object/ObjectAttribute.java (92%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/dto/object/ObjectFilter.java (90%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/dto/object/ObjectFrostFS.java (92%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/dto/object/ObjectHeader.java (91%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/dto/object/ObjectId.java (83%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/enums/BasicAcl.java (95%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/enums/NodeState.java (95%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/enums/ObjectMatchType.java (87%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/enums/ObjectType.java (95%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/enums/SignatureScheme.java (87%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/enums/StatusCode.java (97%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/mappers/MetaHeaderMapper.java (78%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/mappers/OwnerIdMapper.java (73%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/mappers/SessionMapper.java (93%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/mappers/SignatureMapper.java (87%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/mappers/StatusMapper.java (78%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/mappers/VersionMapper.java (80%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/mappers/container/ContainerIdMapper.java (71%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/mappers/container/ContainerMapper.java (75%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/mappers/netmap/NetmapSnapshotMapper.java (80%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/mappers/netmap/NodeInfoMapper.java (72%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/mappers/netmap/PlacementPolicyMapper.java (80%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/mappers/netmap/ReplicaMapper.java (78%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/mappers/object/ObjectAttributeMapper.java (79%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/mappers/object/ObjectFilterMapper.java (82%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/mappers/object/ObjectFrostFSMapper.java (67%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/mappers/object/ObjectHeaderMapper.java (80%) rename models/src/main/java/info/{FrostFS => frostfs}/sdk/mappers/object/ObjectIdMapper.java (78%) diff --git a/README.md b/README.md index fec8945..ff4652e 100644 --- a/README.md +++ b/README.md @@ -21,12 +21,12 @@ neo-go wallet export -w -d ### Container ```java -import info.FrostFS.sdk.dto.container.Container; -import info.FrostFS.sdk.dto.netmap.PlacementPolicy; -import info.FrostFS.sdk.dto.netmap.Replica; -import info.FrostFS.sdk.enums.BasicAcl; -import info.FrostFS.sdk.jdo.ClientSettings; -import info.FrostFS.sdk.services.FrostFSClient; +import info.frostfs.sdk.dto.container.Container; +import info.frostfs.sdk.dto.netmap.PlacementPolicy; +import info.frostfs.sdk.dto.netmap.Replica; +import info.frostfs.sdk.enums.BasicAcl; +import info.frostfs.sdk.jdo.ClientSettings; +import info.frostfs.sdk.services.FrostFSClient; public class ContainerExample { @@ -53,13 +53,13 @@ public class ContainerExample { ### Object ```java -import info.FrostFS.sdk.enums.ObjectType; -import info.FrostFS.sdk.dto.container.ContainerId; -import info.FrostFS.sdk.dto.object.ObjectAttribute; -import info.FrostFS.sdk.dto.object.ObjectFilter; -import info.FrostFS.sdk.dto.object.ObjectHeader; -import info.FrostFS.sdk.jdo.PutObjectParameters; -import info.FrostFS.sdk.services.FrostFSClient; +import info.frostfs.sdk.enums.ObjectType; +import info.frostfs.sdk.dto.container.ContainerId; +import info.frostfs.sdk.dto.object.ObjectAttribute; +import info.frostfs.sdk.dto.object.ObjectFilter; +import info.frostfs.sdk.dto.object.ObjectHeader; +import info.frostfs.sdk.jdo.PutObjectParameters; +import info.frostfs.sdk.services.FrostFSClient; import java.io.FileInputStream; import java.io.IOException; @@ -71,7 +71,7 @@ public class ObjectExample { FrostFSClient frostFSClient = new FrostFSClient(clientSettings); // Put object - info.FrostFS.sdk.dto.object.ObjectId objectId; + info.frostfs.sdk.dto.object.ObjectId objectId; try (FileInputStream fis = new FileInputStream("cat.jpg")) { var cat = new ObjectHeader( containerId, ObjectType.REGULAR, new ObjectAttribute[]{new ObjectAttribute("Filename", "cat.jpg")} diff --git a/client/pom.xml b/client/pom.xml index 3d3426e..917fc46 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -4,8 +4,8 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - info.FrostFS.sdk - FrostFS-sdk-java + info.frostfs.sdk + frostfs-sdk-java 0.1.0 @@ -19,12 +19,12 @@ - info.FrostFS.sdk + info.frostfs.sdk cryptography 0.1.0 - info.FrostFS.sdk + info.frostfs.sdk models 0.1.0 diff --git a/client/src/main/java/info/FrostFS/sdk/services/NetmapClient.java b/client/src/main/java/info/FrostFS/sdk/services/NetmapClient.java deleted file mode 100644 index f053dfa..0000000 --- a/client/src/main/java/info/FrostFS/sdk/services/NetmapClient.java +++ /dev/null @@ -1,13 +0,0 @@ -package info.FrostFS.sdk.services; - -import info.FrostFS.sdk.dto.netmap.NetmapSnapshot; -import info.FrostFS.sdk.dto.netmap.NodeInfo; -import info.FrostFS.sdk.jdo.NetworkSettings; - -public interface NetmapClient { - NetmapSnapshot getNetmapSnapshot(); - - NodeInfo getLocalNodeInfo(); - - NetworkSettings getNetworkSettings(); -} diff --git a/client/src/main/java/info/FrostFS/sdk/services/ToolsClient.java b/client/src/main/java/info/FrostFS/sdk/services/ToolsClient.java deleted file mode 100644 index fb673a2..0000000 --- a/client/src/main/java/info/FrostFS/sdk/services/ToolsClient.java +++ /dev/null @@ -1,8 +0,0 @@ -package info.FrostFS.sdk.services; - -import info.FrostFS.sdk.dto.object.ObjectHeader; -import info.FrostFS.sdk.dto.object.ObjectId; - -public interface ToolsClient { - ObjectId calculateObjectId(ObjectHeader header); -} diff --git a/client/src/main/java/info/FrostFS/sdk/constants/CryptoConst.java b/client/src/main/java/info/frostfs/sdk/constants/CryptoConst.java similarity index 75% rename from client/src/main/java/info/FrostFS/sdk/constants/CryptoConst.java rename to client/src/main/java/info/frostfs/sdk/constants/CryptoConst.java index 742ef60..84db5c9 100644 --- a/client/src/main/java/info/FrostFS/sdk/constants/CryptoConst.java +++ b/client/src/main/java/info/frostfs/sdk/constants/CryptoConst.java @@ -1,4 +1,4 @@ -package info.FrostFS.sdk.constants; +package info.frostfs.sdk.constants; public class CryptoConst { public static final String SIGNATURE_ALGORITHM = "NONEwithECDSAinP1363Format"; diff --git a/client/src/main/java/info/FrostFS/sdk/jdo/ClientEnvironment.java b/client/src/main/java/info/frostfs/sdk/jdo/ClientEnvironment.java similarity index 88% rename from client/src/main/java/info/FrostFS/sdk/jdo/ClientEnvironment.java rename to client/src/main/java/info/frostfs/sdk/jdo/ClientEnvironment.java index f770057..2165f06 100644 --- a/client/src/main/java/info/FrostFS/sdk/jdo/ClientEnvironment.java +++ b/client/src/main/java/info/frostfs/sdk/jdo/ClientEnvironment.java @@ -1,8 +1,8 @@ -package info.FrostFS.sdk.jdo; +package info.frostfs.sdk.jdo; -import info.FrostFS.sdk.dto.OwnerId; -import info.FrostFS.sdk.dto.Version; -import info.FrostFS.sdk.services.FrostFSClient; +import info.frostfs.sdk.dto.OwnerId; +import info.frostfs.sdk.dto.Version; +import info.frostfs.sdk.services.FrostFSClient; import io.grpc.Channel; public class ClientEnvironment { diff --git a/client/src/main/java/info/FrostFS/sdk/jdo/ClientSettings.java b/client/src/main/java/info/frostfs/sdk/jdo/ClientSettings.java similarity index 97% rename from client/src/main/java/info/FrostFS/sdk/jdo/ClientSettings.java rename to client/src/main/java/info/frostfs/sdk/jdo/ClientSettings.java index c7f5de0..03b83ad 100644 --- a/client/src/main/java/info/FrostFS/sdk/jdo/ClientSettings.java +++ b/client/src/main/java/info/frostfs/sdk/jdo/ClientSettings.java @@ -1,4 +1,4 @@ -package info.FrostFS.sdk.jdo; +package info.frostfs.sdk.jdo; import io.grpc.ChannelCredentials; import org.apache.commons.lang3.StringUtils; diff --git a/client/src/main/java/info/FrostFS/sdk/jdo/ECDsa.java b/client/src/main/java/info/frostfs/sdk/jdo/ECDsa.java similarity index 88% rename from client/src/main/java/info/FrostFS/sdk/jdo/ECDsa.java rename to client/src/main/java/info/frostfs/sdk/jdo/ECDsa.java index e3afee7..060eef9 100644 --- a/client/src/main/java/info/FrostFS/sdk/jdo/ECDsa.java +++ b/client/src/main/java/info/frostfs/sdk/jdo/ECDsa.java @@ -1,8 +1,8 @@ -package info.FrostFS.sdk.jdo; +package info.frostfs.sdk.jdo; import java.security.PrivateKey; -import static info.FrostFS.sdk.KeyExtension.*; +import static info.frostfs.sdk.KeyExtension.*; public class ECDsa { private final byte[] publicKeyByte; diff --git a/client/src/main/java/info/FrostFS/sdk/jdo/NetworkSettings.java b/client/src/main/java/info/frostfs/sdk/jdo/NetworkSettings.java similarity index 99% rename from client/src/main/java/info/FrostFS/sdk/jdo/NetworkSettings.java rename to client/src/main/java/info/frostfs/sdk/jdo/NetworkSettings.java index 680d3d3..1ed01a6 100644 --- a/client/src/main/java/info/FrostFS/sdk/jdo/NetworkSettings.java +++ b/client/src/main/java/info/frostfs/sdk/jdo/NetworkSettings.java @@ -1,4 +1,4 @@ -package info.FrostFS.sdk.jdo; +package info.frostfs.sdk.jdo; import java.util.HashMap; import java.util.Map; diff --git a/client/src/main/java/info/FrostFS/sdk/jdo/PutObjectParameters.java b/client/src/main/java/info/frostfs/sdk/jdo/PutObjectParameters.java similarity index 96% rename from client/src/main/java/info/FrostFS/sdk/jdo/PutObjectParameters.java rename to client/src/main/java/info/frostfs/sdk/jdo/PutObjectParameters.java index 51082a3..cd3338d 100644 --- a/client/src/main/java/info/FrostFS/sdk/jdo/PutObjectParameters.java +++ b/client/src/main/java/info/frostfs/sdk/jdo/PutObjectParameters.java @@ -1,6 +1,6 @@ -package info.FrostFS.sdk.jdo; +package info.frostfs.sdk.jdo; -import info.FrostFS.sdk.dto.object.ObjectHeader; +import info.frostfs.sdk.dto.object.ObjectHeader; import java.io.FileInputStream; diff --git a/client/src/main/java/info/FrostFS/sdk/services/ContainerClient.java b/client/src/main/java/info/frostfs/sdk/services/ContainerClient.java similarity index 64% rename from client/src/main/java/info/FrostFS/sdk/services/ContainerClient.java rename to client/src/main/java/info/frostfs/sdk/services/ContainerClient.java index 385f616..d3f7f9c 100644 --- a/client/src/main/java/info/FrostFS/sdk/services/ContainerClient.java +++ b/client/src/main/java/info/frostfs/sdk/services/ContainerClient.java @@ -1,7 +1,7 @@ -package info.FrostFS.sdk.services; +package info.frostfs.sdk.services; -import info.FrostFS.sdk.dto.container.Container; -import info.FrostFS.sdk.dto.container.ContainerId; +import info.frostfs.sdk.dto.container.Container; +import info.frostfs.sdk.dto.container.ContainerId; import java.util.List; diff --git a/client/src/main/java/info/FrostFS/sdk/services/ContextAccessor.java b/client/src/main/java/info/frostfs/sdk/services/ContextAccessor.java similarity index 75% rename from client/src/main/java/info/FrostFS/sdk/services/ContextAccessor.java rename to client/src/main/java/info/frostfs/sdk/services/ContextAccessor.java index 58f9c43..72c47dd 100644 --- a/client/src/main/java/info/FrostFS/sdk/services/ContextAccessor.java +++ b/client/src/main/java/info/frostfs/sdk/services/ContextAccessor.java @@ -1,6 +1,6 @@ -package info.FrostFS.sdk.services; +package info.frostfs.sdk.services; -import info.FrostFS.sdk.jdo.ClientEnvironment; +import info.frostfs.sdk.jdo.ClientEnvironment; public class ContextAccessor { private final ClientEnvironment context; diff --git a/client/src/main/java/info/FrostFS/sdk/services/FrostFSClient.java b/client/src/main/java/info/frostfs/sdk/services/FrostFSClient.java similarity index 82% rename from client/src/main/java/info/FrostFS/sdk/services/FrostFSClient.java rename to client/src/main/java/info/frostfs/sdk/services/FrostFSClient.java index b0c7f1b..da87a20 100644 --- a/client/src/main/java/info/FrostFS/sdk/services/FrostFSClient.java +++ b/client/src/main/java/info/frostfs/sdk/services/FrostFSClient.java @@ -1,26 +1,26 @@ -package info.FrostFS.sdk.services; +package info.frostfs.sdk.services; -import frostFS.session.Types; -import info.FrostFS.sdk.dto.SessionToken; -import info.FrostFS.sdk.dto.Version; -import info.FrostFS.sdk.dto.container.Container; -import info.FrostFS.sdk.dto.container.ContainerId; -import info.FrostFS.sdk.dto.netmap.NetmapSnapshot; -import info.FrostFS.sdk.dto.netmap.NodeInfo; -import info.FrostFS.sdk.dto.object.ObjectFilter; -import info.FrostFS.sdk.dto.object.ObjectFrostFS; -import info.FrostFS.sdk.dto.object.ObjectHeader; -import info.FrostFS.sdk.dto.object.ObjectId; -import info.FrostFS.sdk.jdo.ClientEnvironment; -import info.FrostFS.sdk.jdo.ClientSettings; -import info.FrostFS.sdk.jdo.NetworkSettings; -import info.FrostFS.sdk.jdo.PutObjectParameters; -import info.FrostFS.sdk.services.impl.*; +import frostfs.session.Types; +import info.frostfs.sdk.dto.SessionToken; +import info.frostfs.sdk.dto.Version; +import info.frostfs.sdk.dto.container.Container; +import info.frostfs.sdk.dto.container.ContainerId; +import info.frostfs.sdk.dto.netmap.NetmapSnapshot; +import info.frostfs.sdk.dto.netmap.NodeInfo; +import info.frostfs.sdk.dto.object.ObjectFilter; +import info.frostfs.sdk.dto.object.ObjectFrostFS; +import info.frostfs.sdk.dto.object.ObjectHeader; +import info.frostfs.sdk.dto.object.ObjectId; +import info.frostfs.sdk.jdo.ClientEnvironment; +import info.frostfs.sdk.jdo.ClientSettings; +import info.frostfs.sdk.jdo.NetworkSettings; +import info.frostfs.sdk.jdo.PutObjectParameters; +import info.frostfs.sdk.services.impl.*; import io.grpc.Channel; import java.util.List; -import static info.FrostFS.sdk.tools.GrpcClient.initGrpcChannel; +import static info.frostfs.sdk.tools.GrpcClient.initGrpcChannel; import static java.util.Objects.isNull; public class FrostFSClient implements ContainerClient, ObjectClient, NetmapClient, SessionClient, ToolsClient { diff --git a/client/src/main/java/info/frostfs/sdk/services/NetmapClient.java b/client/src/main/java/info/frostfs/sdk/services/NetmapClient.java new file mode 100644 index 0000000..bc34978 --- /dev/null +++ b/client/src/main/java/info/frostfs/sdk/services/NetmapClient.java @@ -0,0 +1,13 @@ +package info.frostfs.sdk.services; + +import info.frostfs.sdk.dto.netmap.NetmapSnapshot; +import info.frostfs.sdk.dto.netmap.NodeInfo; +import info.frostfs.sdk.jdo.NetworkSettings; + +public interface NetmapClient { + NetmapSnapshot getNetmapSnapshot(); + + NodeInfo getLocalNodeInfo(); + + NetworkSettings getNetworkSettings(); +} diff --git a/client/src/main/java/info/FrostFS/sdk/services/ObjectClient.java b/client/src/main/java/info/frostfs/sdk/services/ObjectClient.java similarity index 54% rename from client/src/main/java/info/FrostFS/sdk/services/ObjectClient.java rename to client/src/main/java/info/frostfs/sdk/services/ObjectClient.java index 96ae2a3..423e938 100644 --- a/client/src/main/java/info/FrostFS/sdk/services/ObjectClient.java +++ b/client/src/main/java/info/frostfs/sdk/services/ObjectClient.java @@ -1,11 +1,11 @@ -package info.FrostFS.sdk.services; +package info.frostfs.sdk.services; -import info.FrostFS.sdk.dto.container.ContainerId; -import info.FrostFS.sdk.dto.object.ObjectFilter; -import info.FrostFS.sdk.dto.object.ObjectFrostFS; -import info.FrostFS.sdk.dto.object.ObjectHeader; -import info.FrostFS.sdk.dto.object.ObjectId; -import info.FrostFS.sdk.jdo.PutObjectParameters; +import info.frostfs.sdk.dto.container.ContainerId; +import info.frostfs.sdk.dto.object.ObjectFilter; +import info.frostfs.sdk.dto.object.ObjectFrostFS; +import info.frostfs.sdk.dto.object.ObjectHeader; +import info.frostfs.sdk.dto.object.ObjectId; +import info.frostfs.sdk.jdo.PutObjectParameters; public interface ObjectClient { ObjectHeader getObjectHead(ContainerId containerId, ObjectId objectId); diff --git a/client/src/main/java/info/FrostFS/sdk/services/SessionClient.java b/client/src/main/java/info/frostfs/sdk/services/SessionClient.java similarity index 52% rename from client/src/main/java/info/FrostFS/sdk/services/SessionClient.java rename to client/src/main/java/info/frostfs/sdk/services/SessionClient.java index 6fd7f4f..16e0da0 100644 --- a/client/src/main/java/info/FrostFS/sdk/services/SessionClient.java +++ b/client/src/main/java/info/frostfs/sdk/services/SessionClient.java @@ -1,6 +1,6 @@ -package info.FrostFS.sdk.services; +package info.frostfs.sdk.services; -import info.FrostFS.sdk.dto.SessionToken; +import info.frostfs.sdk.dto.SessionToken; public interface SessionClient { SessionToken createSession(long expiration); diff --git a/client/src/main/java/info/frostfs/sdk/services/ToolsClient.java b/client/src/main/java/info/frostfs/sdk/services/ToolsClient.java new file mode 100644 index 0000000..e8ce342 --- /dev/null +++ b/client/src/main/java/info/frostfs/sdk/services/ToolsClient.java @@ -0,0 +1,8 @@ +package info.frostfs.sdk.services; + +import info.frostfs.sdk.dto.object.ObjectHeader; +import info.frostfs.sdk.dto.object.ObjectId; + +public interface ToolsClient { + ObjectId calculateObjectId(ObjectHeader header); +} diff --git a/client/src/main/java/info/FrostFS/sdk/services/impl/ContainerService.java b/client/src/main/java/info/frostfs/sdk/services/impl/ContainerService.java similarity index 68% rename from client/src/main/java/info/FrostFS/sdk/services/impl/ContainerService.java rename to client/src/main/java/info/frostfs/sdk/services/impl/ContainerService.java index a1df64c..1e2f5e7 100644 --- a/client/src/main/java/info/FrostFS/sdk/services/impl/ContainerService.java +++ b/client/src/main/java/info/frostfs/sdk/services/impl/ContainerService.java @@ -1,24 +1,25 @@ -package info.FrostFS.sdk.services.impl; +package info.frostfs.sdk.services.impl; -import frostFS.container.ContainerServiceGrpc; -import frostFS.container.Service; -import info.FrostFS.sdk.dto.container.Container; -import info.FrostFS.sdk.dto.container.ContainerId; -import info.FrostFS.sdk.jdo.ClientEnvironment; -import info.FrostFS.sdk.mappers.OwnerIdMapper; -import info.FrostFS.sdk.mappers.VersionMapper; -import info.FrostFS.sdk.mappers.container.ContainerIdMapper; -import info.FrostFS.sdk.mappers.container.ContainerMapper; -import info.FrostFS.sdk.services.ContainerClient; -import info.FrostFS.sdk.services.ContextAccessor; -import info.FrostFS.sdk.tools.Verifier; +import frostfs.container.ContainerServiceGrpc; +import frostfs.container.Service; +import info.frostfs.sdk.dto.container.Container; +import info.frostfs.sdk.dto.container.ContainerId; +import info.frostfs.sdk.jdo.ClientEnvironment; +import info.frostfs.sdk.mappers.OwnerIdMapper; +import info.frostfs.sdk.mappers.VersionMapper; +import info.frostfs.sdk.mappers.container.ContainerIdMapper; +import info.frostfs.sdk.mappers.container.ContainerMapper; +import info.frostfs.sdk.services.ContainerClient; +import info.frostfs.sdk.services.ContextAccessor; +import info.frostfs.sdk.tools.Verifier; +import info.frostfs.sdk.tools.RequestConstructor; +import info.frostfs.sdk.tools.RequestSigner; import java.util.List; import java.util.stream.Collectors; -import static info.FrostFS.sdk.tools.RequestConstructor.addMetaHeader; -import static info.FrostFS.sdk.tools.RequestSigner.sign; -import static info.FrostFS.sdk.tools.RequestSigner.signRFC6979; +import static info.frostfs.sdk.tools.RequestConstructor.addMetaHeader; +import static info.frostfs.sdk.tools.RequestSigner.signRFC6979; public class ContainerService extends ContextAccessor implements ContainerClient { private final ContainerServiceGrpc.ContainerServiceBlockingStub serviceBlockingStub; @@ -36,8 +37,8 @@ public class ContainerService extends ContextAccessor implements ContainerClient .build() ); - addMetaHeader(request); - sign(request, getContext().getKey()); + RequestConstructor.addMetaHeader(request); + RequestSigner.sign(request, getContext().getKey()); var response = serviceBlockingStub.get(request.build()); @@ -53,8 +54,8 @@ public class ContainerService extends ContextAccessor implements ContainerClient .build() ); - addMetaHeader(request); - sign(request, getContext().getKey()); + RequestConstructor.addMetaHeader(request); + RequestSigner.sign(request, getContext().getKey()); var response = serviceBlockingStub.list(request.build()); @@ -78,13 +79,13 @@ public class ContainerService extends ContextAccessor implements ContainerClient Service.PutRequest.Body.newBuilder() .setContainer(grpcContainer) .setSignature( - signRFC6979(getContext().getKey(), grpcContainer) + RequestSigner.signRFC6979(getContext().getKey(), grpcContainer) ) .build() ); - addMetaHeader(request); - sign(request, getContext().getKey()); + RequestConstructor.addMetaHeader(request); + RequestSigner.sign(request, getContext().getKey()); var response = serviceBlockingStub.put(request.build()); @@ -99,14 +100,14 @@ public class ContainerService extends ContextAccessor implements ContainerClient .setBody( Service.DeleteRequest.Body.newBuilder() .setContainerId(grpcContainerId) - .setSignature(signRFC6979( + .setSignature(RequestSigner.signRFC6979( getContext().getKey(), grpcContainerId.getValue() )) .build() ); - addMetaHeader(request); - sign(request, getContext().getKey()); + RequestConstructor.addMetaHeader(request); + RequestSigner.sign(request, getContext().getKey()); var response = serviceBlockingStub.delete(request.build()); diff --git a/client/src/main/java/info/FrostFS/sdk/services/impl/NetmapService.java b/client/src/main/java/info/frostfs/sdk/services/impl/NetmapService.java similarity index 86% rename from client/src/main/java/info/FrostFS/sdk/services/impl/NetmapService.java rename to client/src/main/java/info/frostfs/sdk/services/impl/NetmapService.java index 135e95b..19c5995 100644 --- a/client/src/main/java/info/FrostFS/sdk/services/impl/NetmapService.java +++ b/client/src/main/java/info/frostfs/sdk/services/impl/NetmapService.java @@ -1,22 +1,22 @@ -package info.FrostFS.sdk.services.impl; +package info.frostfs.sdk.services.impl; -import frostFS.netmap.NetmapServiceGrpc; -import frostFS.netmap.Service; -import frostFS.netmap.Types; -import info.FrostFS.sdk.dto.netmap.NetmapSnapshot; -import info.FrostFS.sdk.dto.netmap.NodeInfo; -import info.FrostFS.sdk.jdo.ClientEnvironment; -import info.FrostFS.sdk.jdo.NetworkSettings; -import info.FrostFS.sdk.mappers.netmap.NetmapSnapshotMapper; -import info.FrostFS.sdk.mappers.netmap.NodeInfoMapper; -import info.FrostFS.sdk.services.ContextAccessor; -import info.FrostFS.sdk.services.NetmapClient; -import info.FrostFS.sdk.tools.Verifier; +import frostfs.netmap.NetmapServiceGrpc; +import frostfs.netmap.Service; +import frostfs.netmap.Types; +import info.frostfs.sdk.dto.netmap.NetmapSnapshot; +import info.frostfs.sdk.dto.netmap.NodeInfo; +import info.frostfs.sdk.jdo.ClientEnvironment; +import info.frostfs.sdk.jdo.NetworkSettings; +import info.frostfs.sdk.mappers.netmap.NetmapSnapshotMapper; +import info.frostfs.sdk.mappers.netmap.NodeInfoMapper; +import info.frostfs.sdk.services.ContextAccessor; +import info.frostfs.sdk.services.NetmapClient; +import info.frostfs.sdk.tools.Verifier; import java.nio.charset.StandardCharsets; -import static info.FrostFS.sdk.tools.RequestConstructor.addMetaHeader; -import static info.FrostFS.sdk.tools.RequestSigner.sign; +import static info.frostfs.sdk.tools.RequestConstructor.addMetaHeader; +import static info.frostfs.sdk.tools.RequestSigner.sign; import static java.util.Objects.nonNull; public class NetmapService extends ContextAccessor implements NetmapClient { diff --git a/client/src/main/java/info/FrostFS/sdk/services/impl/ObjectReader.java b/client/src/main/java/info/frostfs/sdk/services/impl/ObjectReader.java similarity index 91% rename from client/src/main/java/info/FrostFS/sdk/services/impl/ObjectReader.java rename to client/src/main/java/info/frostfs/sdk/services/impl/ObjectReader.java index 116b3c2..62a9a70 100644 --- a/client/src/main/java/info/FrostFS/sdk/services/impl/ObjectReader.java +++ b/client/src/main/java/info/frostfs/sdk/services/impl/ObjectReader.java @@ -1,8 +1,8 @@ -package info.FrostFS.sdk.services.impl; +package info.frostfs.sdk.services.impl; -import frostFS.object.Service; -import frostFS.object.Types; -import info.FrostFS.sdk.tools.Verifier; +import frostfs.object.Service; +import frostfs.object.Types; +import info.frostfs.sdk.tools.Verifier; import java.util.Iterator; diff --git a/client/src/main/java/info/FrostFS/sdk/services/impl/ObjectService.java b/client/src/main/java/info/frostfs/sdk/services/impl/ObjectService.java similarity index 90% rename from client/src/main/java/info/FrostFS/sdk/services/impl/ObjectService.java rename to client/src/main/java/info/frostfs/sdk/services/impl/ObjectService.java index c9520e3..ca2652b 100644 --- a/client/src/main/java/info/FrostFS/sdk/services/impl/ObjectService.java +++ b/client/src/main/java/info/frostfs/sdk/services/impl/ObjectService.java @@ -1,26 +1,26 @@ -package info.FrostFS.sdk.services.impl; +package info.frostfs.sdk.services.impl; import com.google.common.collect.Iterables; import com.google.protobuf.ByteString; -import frostFS.object.ObjectServiceGrpc; -import frostFS.object.Service; -import frostFS.refs.Types; -import info.FrostFS.sdk.constants.AppConst; -import info.FrostFS.sdk.dto.Split; -import info.FrostFS.sdk.dto.container.ContainerId; -import info.FrostFS.sdk.dto.object.*; -import info.FrostFS.sdk.jdo.ClientEnvironment; -import info.FrostFS.sdk.jdo.PutObjectParameters; -import info.FrostFS.sdk.mappers.OwnerIdMapper; -import info.FrostFS.sdk.mappers.VersionMapper; -import info.FrostFS.sdk.mappers.container.ContainerIdMapper; -import info.FrostFS.sdk.mappers.object.ObjectFilterMapper; -import info.FrostFS.sdk.mappers.object.ObjectFrostFSMapper; -import info.FrostFS.sdk.mappers.object.ObjectHeaderMapper; -import info.FrostFS.sdk.mappers.object.ObjectIdMapper; -import info.FrostFS.sdk.services.ContextAccessor; -import info.FrostFS.sdk.services.ObjectClient; -import info.FrostFS.sdk.tools.Verifier; +import frostfs.object.ObjectServiceGrpc; +import frostfs.object.Service; +import frostfs.refs.Types; +import info.frostfs.sdk.constants.AppConst; +import info.frostfs.sdk.dto.Split; +import info.frostfs.sdk.dto.container.ContainerId; +import info.frostfs.sdk.dto.object.*; +import info.frostfs.sdk.jdo.ClientEnvironment; +import info.frostfs.sdk.jdo.PutObjectParameters; +import info.frostfs.sdk.mappers.OwnerIdMapper; +import info.frostfs.sdk.mappers.VersionMapper; +import info.frostfs.sdk.mappers.container.ContainerIdMapper; +import info.frostfs.sdk.mappers.object.ObjectFilterMapper; +import info.frostfs.sdk.mappers.object.ObjectFrostFSMapper; +import info.frostfs.sdk.mappers.object.ObjectHeaderMapper; +import info.frostfs.sdk.mappers.object.ObjectIdMapper; +import info.frostfs.sdk.services.ContextAccessor; +import info.frostfs.sdk.services.ObjectClient; +import info.frostfs.sdk.tools.Verifier; import org.apache.commons.collections4.CollectionUtils; import java.io.FileInputStream; @@ -29,10 +29,10 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import static info.FrostFS.sdk.Helper.getSha256; -import static info.FrostFS.sdk.tools.RequestConstructor.addMetaHeader; -import static info.FrostFS.sdk.tools.RequestConstructor.addObjectSessionToken; -import static info.FrostFS.sdk.tools.RequestSigner.sign; +import static info.frostfs.sdk.Helper.getSha256; +import static info.frostfs.sdk.tools.RequestConstructor.addMetaHeader; +import static info.frostfs.sdk.tools.RequestConstructor.addObjectSessionToken; +import static info.frostfs.sdk.tools.RequestSigner.sign; import static java.util.Objects.nonNull; public class ObjectService extends ContextAccessor implements ObjectClient { @@ -90,7 +90,7 @@ public class ObjectService extends ContextAccessor implements ObjectClient { addMetaHeader(request); addObjectSessionToken( request, sessionToken, ContainerIdMapper.toGrpcMessage(cid), ObjectIdMapper.toGrpcMessage(oid), - frostFS.session.Types.ObjectSessionContext.Verb.GET, getContext().getKey() + frostfs.session.Types.ObjectSessionContext.Verb.GET, getContext().getKey() ); sign(request, getContext().getKey()); @@ -159,7 +159,7 @@ public class ObjectService extends ContextAccessor implements ObjectClient { addMetaHeader(request); addObjectSessionToken( request, sessionToken, grpcObject.getHeader().getContainerId(), grpcObject.getObjectId(), - frostFS.session.Types.ObjectSessionContext.Verb.PUT, getContext().getKey() + frostfs.session.Types.ObjectSessionContext.Verb.PUT, getContext().getKey() ); sign(request, getContext().getKey()); @@ -170,7 +170,7 @@ public class ObjectService extends ContextAccessor implements ObjectClient { return ObjectId.fromHash(grpcObject.getObjectId().getValue().toByteArray()); } - private frostFS.object.Types.Object getObject(Service.GetRequest request) { + private frostfs.object.Types.Object getObject(Service.GetRequest request) { var iterator = getObjectInit(request); var obj = iterator.readHeader(); var payload = new byte[Math.toIntExact(obj.getHeader().getPayloadLength())]; @@ -218,7 +218,7 @@ public class ObjectService extends ContextAccessor implements ObjectClient { addMetaHeader(initRequest); addObjectSessionToken( initRequest, sessionToken, hdr.getContainerId(), oid, - frostFS.session.Types.ObjectSessionContext.Verb.PUT, getContext().getKey() + frostfs.session.Types.ObjectSessionContext.Verb.PUT, getContext().getKey() ); sign(initRequest, getContext().getKey()); diff --git a/client/src/main/java/info/FrostFS/sdk/services/impl/ObjectTools.java b/client/src/main/java/info/frostfs/sdk/services/impl/ObjectTools.java similarity index 75% rename from client/src/main/java/info/FrostFS/sdk/services/impl/ObjectTools.java rename to client/src/main/java/info/frostfs/sdk/services/impl/ObjectTools.java index 412fa66..5eb0680 100644 --- a/client/src/main/java/info/FrostFS/sdk/services/impl/ObjectTools.java +++ b/client/src/main/java/info/frostfs/sdk/services/impl/ObjectTools.java @@ -1,21 +1,21 @@ -package info.FrostFS.sdk.services.impl; +package info.frostfs.sdk.services.impl; import com.google.protobuf.ByteString; -import frostFS.object.Types; -import info.FrostFS.sdk.dto.object.ObjectFrostFS; -import info.FrostFS.sdk.dto.object.ObjectHeader; -import info.FrostFS.sdk.dto.object.ObjectId; -import info.FrostFS.sdk.jdo.ClientEnvironment; -import info.FrostFS.sdk.mappers.OwnerIdMapper; -import info.FrostFS.sdk.mappers.VersionMapper; -import info.FrostFS.sdk.mappers.object.ObjectHeaderMapper; -import info.FrostFS.sdk.mappers.object.ObjectIdMapper; -import info.FrostFS.sdk.services.ContextAccessor; -import info.FrostFS.sdk.services.ToolsClient; +import frostfs.object.Types; +import info.frostfs.sdk.dto.object.ObjectFrostFS; +import info.frostfs.sdk.dto.object.ObjectHeader; +import info.frostfs.sdk.dto.object.ObjectId; +import info.frostfs.sdk.jdo.ClientEnvironment; +import info.frostfs.sdk.mappers.OwnerIdMapper; +import info.frostfs.sdk.mappers.VersionMapper; +import info.frostfs.sdk.mappers.object.ObjectHeaderMapper; +import info.frostfs.sdk.mappers.object.ObjectIdMapper; +import info.frostfs.sdk.services.ContextAccessor; +import info.frostfs.sdk.services.ToolsClient; import org.apache.commons.collections4.ListUtils; -import static info.FrostFS.sdk.Helper.getSha256; -import static info.FrostFS.sdk.tools.RequestSigner.signData; +import static info.frostfs.sdk.Helper.getSha256; +import static info.frostfs.sdk.tools.RequestSigner.signData; import static java.util.Objects.nonNull; public class ObjectTools extends ContextAccessor implements ToolsClient { @@ -23,9 +23,9 @@ public class ObjectTools extends ContextAccessor implements ToolsClient { super(context); } - private static frostFS.refs.Types.Checksum sha256Checksum(byte[] data) { - return frostFS.refs.Types.Checksum.newBuilder() - .setType(frostFS.refs.Types.ChecksumType.SHA256) + private static frostfs.refs.Types.Checksum sha256Checksum(byte[] data) { + return frostfs.refs.Types.Checksum.newBuilder() + .setType(frostfs.refs.Types.ChecksumType.SHA256) .setSum(ByteString.copyFrom(getSha256(data))) .build(); } @@ -35,7 +35,7 @@ public class ObjectTools extends ContextAccessor implements ToolsClient { var grpcHeader = createHeader(header, new byte[]{}); return ObjectIdMapper.toModel( - frostFS.refs.Types.ObjectID.newBuilder().setValue(getSha256(grpcHeader)).build() + frostfs.refs.Types.ObjectID.newBuilder().setValue(getSha256(grpcHeader)).build() ); } @@ -58,13 +58,13 @@ public class ObjectTools extends ContextAccessor implements ToolsClient { if (nonNull(split.getParentHeader())) { var grpcParentHeader = createHeader(split.getParentHeader(), new byte[]{}); - var parent = frostFS.refs.Types.ObjectID.newBuilder().setValue(getSha256(grpcParentHeader)).build(); + var parent = frostfs.refs.Types.ObjectID.newBuilder().setValue(getSha256(grpcParentHeader)).build(); splitGrpc .setParent(parent) .setParentHeader(grpcParentHeader) .setParentSignature( - frostFS.refs.Types.Signature.newBuilder() + frostfs.refs.Types.Signature.newBuilder() .setKey(ByteString.copyFrom(getContext().getKey().getPublicKeyByte())) .setSign(ByteString.copyFrom(signData(getContext().getKey(), parent.toByteArray()))) ); @@ -78,13 +78,13 @@ public class ObjectTools extends ContextAccessor implements ToolsClient { } var grpcHeader = grpcHeaderBuilder.build(); - var objectId = frostFS.refs.Types.ObjectID.newBuilder().setValue(getSha256(grpcHeader)).build(); + var objectId = frostfs.refs.Types.ObjectID.newBuilder().setValue(getSha256(grpcHeader)).build(); return Types.Object.newBuilder() .setHeader(grpcHeader) .setObjectId(objectId) .setPayload(ByteString.copyFrom(objectFrostFs.getPayload())) .setSignature( - frostFS.refs.Types.Signature.newBuilder() + frostfs.refs.Types.Signature.newBuilder() .setKey(ByteString.copyFrom(getContext().getKey().getPublicKeyByte())) .setSign(ByteString.copyFrom(signData(getContext().getKey(), objectId.toByteArray()))) ) diff --git a/client/src/main/java/info/FrostFS/sdk/services/impl/ObjectWriter.java b/client/src/main/java/info/frostfs/sdk/services/impl/ObjectWriter.java similarity index 93% rename from client/src/main/java/info/FrostFS/sdk/services/impl/ObjectWriter.java rename to client/src/main/java/info/frostfs/sdk/services/impl/ObjectWriter.java index 01ae85e..8642dc8 100644 --- a/client/src/main/java/info/FrostFS/sdk/services/impl/ObjectWriter.java +++ b/client/src/main/java/info/frostfs/sdk/services/impl/ObjectWriter.java @@ -1,7 +1,7 @@ -package info.FrostFS.sdk.services.impl; +package info.frostfs.sdk.services.impl; -import frostFS.object.ObjectServiceGrpc; -import frostFS.object.Service; +import frostfs.object.ObjectServiceGrpc; +import frostfs.object.Service; import io.grpc.stub.StreamObserver; import static java.util.Objects.isNull; diff --git a/client/src/main/java/info/FrostFS/sdk/services/impl/SearchReader.java b/client/src/main/java/info/frostfs/sdk/services/impl/SearchReader.java similarity index 72% rename from client/src/main/java/info/FrostFS/sdk/services/impl/SearchReader.java rename to client/src/main/java/info/frostfs/sdk/services/impl/SearchReader.java index 864d6e5..873d48b 100644 --- a/client/src/main/java/info/FrostFS/sdk/services/impl/SearchReader.java +++ b/client/src/main/java/info/frostfs/sdk/services/impl/SearchReader.java @@ -1,7 +1,7 @@ -package info.FrostFS.sdk.services.impl; +package info.frostfs.sdk.services.impl; -import frostFS.object.Service; -import info.FrostFS.sdk.tools.Verifier; +import frostfs.object.Service; +import info.frostfs.sdk.tools.Verifier; import java.util.Iterator; import java.util.List; @@ -13,7 +13,7 @@ public class SearchReader { this.call = call; } - public List read() { + public List read() { if (!call.hasNext()) { return null; } diff --git a/client/src/main/java/info/FrostFS/sdk/services/impl/SessionService.java b/client/src/main/java/info/frostfs/sdk/services/impl/SessionService.java similarity index 75% rename from client/src/main/java/info/FrostFS/sdk/services/impl/SessionService.java rename to client/src/main/java/info/frostfs/sdk/services/impl/SessionService.java index 35e5967..d6bf950 100644 --- a/client/src/main/java/info/FrostFS/sdk/services/impl/SessionService.java +++ b/client/src/main/java/info/frostfs/sdk/services/impl/SessionService.java @@ -1,17 +1,18 @@ -package info.FrostFS.sdk.services.impl; +package info.frostfs.sdk.services.impl; -import frostFS.session.Service; -import frostFS.session.SessionServiceGrpc; -import frostFS.session.Types; -import info.FrostFS.sdk.dto.SessionToken; -import info.FrostFS.sdk.jdo.ClientEnvironment; -import info.FrostFS.sdk.mappers.OwnerIdMapper; -import info.FrostFS.sdk.mappers.SessionMapper; -import info.FrostFS.sdk.services.ContextAccessor; -import info.FrostFS.sdk.services.SessionClient; +import frostfs.session.Service; +import frostfs.session.SessionServiceGrpc; +import frostfs.session.Types; +import info.frostfs.sdk.dto.SessionToken; +import info.frostfs.sdk.jdo.ClientEnvironment; +import info.frostfs.sdk.mappers.OwnerIdMapper; +import info.frostfs.sdk.mappers.SessionMapper; +import info.frostfs.sdk.services.ContextAccessor; +import info.frostfs.sdk.services.SessionClient; +import info.frostfs.sdk.tools.RequestConstructor; -import static info.FrostFS.sdk.tools.RequestConstructor.addMetaHeader; -import static info.FrostFS.sdk.tools.RequestSigner.sign; +import static info.frostfs.sdk.tools.RequestConstructor.addMetaHeader; +import static info.frostfs.sdk.tools.RequestSigner.sign; public class SessionService extends ContextAccessor implements SessionClient { private final SessionServiceGrpc.SessionServiceBlockingStub serviceBlockingStub; @@ -36,7 +37,7 @@ public class SessionService extends ContextAccessor implements SessionClient { .setExpiration(expiration).build() ); - addMetaHeader(request); + RequestConstructor.addMetaHeader(request); sign(request, getContext().getKey()); return createSession(request.build()); diff --git a/client/src/main/java/info/FrostFS/sdk/tools/GrpcClient.java b/client/src/main/java/info/frostfs/sdk/tools/GrpcClient.java similarity index 96% rename from client/src/main/java/info/FrostFS/sdk/tools/GrpcClient.java rename to client/src/main/java/info/frostfs/sdk/tools/GrpcClient.java index 61cfee2..729d3e5 100644 --- a/client/src/main/java/info/FrostFS/sdk/tools/GrpcClient.java +++ b/client/src/main/java/info/frostfs/sdk/tools/GrpcClient.java @@ -1,4 +1,4 @@ -package info.FrostFS.sdk.tools; +package info.frostfs.sdk.tools; import io.grpc.Channel; import io.grpc.ChannelCredentials; diff --git a/client/src/main/java/info/FrostFS/sdk/tools/MessageHelper.java b/client/src/main/java/info/frostfs/sdk/tools/MessageHelper.java similarity index 94% rename from client/src/main/java/info/FrostFS/sdk/tools/MessageHelper.java rename to client/src/main/java/info/frostfs/sdk/tools/MessageHelper.java index 4e11b06..00f87c4 100644 --- a/client/src/main/java/info/FrostFS/sdk/tools/MessageHelper.java +++ b/client/src/main/java/info/frostfs/sdk/tools/MessageHelper.java @@ -1,4 +1,4 @@ -package info.FrostFS.sdk.tools; +package info.frostfs.sdk.tools; import com.google.protobuf.Message; import com.google.protobuf.MessageOrBuilder; diff --git a/client/src/main/java/info/FrostFS/sdk/tools/RequestConstructor.java b/client/src/main/java/info/frostfs/sdk/tools/RequestConstructor.java similarity index 74% rename from client/src/main/java/info/FrostFS/sdk/tools/RequestConstructor.java rename to client/src/main/java/info/frostfs/sdk/tools/RequestConstructor.java index 3d8d02a..9660de5 100644 --- a/client/src/main/java/info/FrostFS/sdk/tools/RequestConstructor.java +++ b/client/src/main/java/info/frostfs/sdk/tools/RequestConstructor.java @@ -1,15 +1,15 @@ -package info.FrostFS.sdk.tools; +package info.frostfs.sdk.tools; import com.google.protobuf.Message; -import frostFS.session.Types; -import info.FrostFS.sdk.dto.MetaHeader; -import info.FrostFS.sdk.jdo.ECDsa; -import info.FrostFS.sdk.mappers.MetaHeaderMapper; +import frostfs.session.Types; +import info.frostfs.sdk.dto.MetaHeader; +import info.frostfs.sdk.jdo.ECDsa; +import info.frostfs.sdk.mappers.MetaHeaderMapper; -import static info.FrostFS.sdk.constants.FieldConst.META_HEADER_FIELD_NAME; -import static info.FrostFS.sdk.tools.MessageHelper.getField; -import static info.FrostFS.sdk.tools.MessageHelper.setField; -import static info.FrostFS.sdk.tools.RequestSigner.signMessagePart; +import static info.frostfs.sdk.constants.FieldConst.META_HEADER_FIELD_NAME; +import static info.frostfs.sdk.tools.MessageHelper.getField; +import static info.frostfs.sdk.tools.MessageHelper.setField; +import static info.frostfs.sdk.tools.RequestSigner.signMessagePart; import static java.util.Objects.isNull; public class RequestConstructor { @@ -27,8 +27,8 @@ public class RequestConstructor { public static void addObjectSessionToken(Message.Builder request, Types.SessionToken sessionToken, - frostFS.refs.Types.ContainerID cid, - frostFS.refs.Types.ObjectID oid, + frostfs.refs.Types.ContainerID cid, + frostfs.refs.Types.ObjectID oid, Types.ObjectSessionContext.Verb verb, ECDsa key) { var header = (Types.RequestMetaHeader) getField(request, META_HEADER_FIELD_NAME); diff --git a/client/src/main/java/info/FrostFS/sdk/tools/RequestSigner.java b/client/src/main/java/info/frostfs/sdk/tools/RequestSigner.java similarity index 72% rename from client/src/main/java/info/FrostFS/sdk/tools/RequestSigner.java rename to client/src/main/java/info/frostfs/sdk/tools/RequestSigner.java index daca2cc..315af58 100644 --- a/client/src/main/java/info/FrostFS/sdk/tools/RequestSigner.java +++ b/client/src/main/java/info/frostfs/sdk/tools/RequestSigner.java @@ -1,9 +1,10 @@ -package info.FrostFS.sdk.tools; +package info.frostfs.sdk.tools; import com.google.protobuf.ByteString; import com.google.protobuf.Message; -import frostFS.session.Types; -import info.FrostFS.sdk.jdo.ECDsa; +import frostfs.session.Types; +import info.frostfs.sdk.jdo.ECDsa; +import info.frostfs.sdk.constants.CryptoConst; import org.apache.commons.codec.digest.DigestUtils; import org.bouncycastle.asn1.sec.SECNamedCurves; import org.bouncycastle.asn1.sec.SECObjectIdentifiers; @@ -15,10 +16,7 @@ import org.bouncycastle.crypto.signers.HMacDSAKCalculator; import java.math.BigInteger; import java.security.Signature; -import static info.FrostFS.sdk.constants.CryptoConst.SIGNATURE_ALGORITHM; -import static info.FrostFS.sdk.constants.FieldConst.*; -import static info.FrostFS.sdk.tools.MessageHelper.getField; -import static info.FrostFS.sdk.tools.MessageHelper.setField; +import static info.frostfs.sdk.constants.FieldConst.*; import static org.bouncycastle.crypto.util.DigestFactory.createSHA256; import static org.bouncycastle.util.BigIntegers.asUnsignedByteArray; @@ -30,7 +28,7 @@ public class RequestSigner { var hash = new byte[65]; hash[0] = 0x04; try { - Signature signature = Signature.getInstance(SIGNATURE_ALGORITHM); + Signature signature = Signature.getInstance(CryptoConst.SIGNATURE_ALGORITHM); signature.initSign(key.getPrivateKey()); signature.update(DigestUtils.sha512(data)); byte[] sig = signature.sign(); @@ -67,33 +65,33 @@ public class RequestSigner { return signature; } - public static frostFS.refs.Types.SignatureRFC6979 signRFC6979(ECDsa key, Message message) { - return frostFS.refs.Types.SignatureRFC6979.newBuilder() + public static frostfs.refs.Types.SignatureRFC6979 signRFC6979(ECDsa key, Message message) { + return frostfs.refs.Types.SignatureRFC6979.newBuilder() .setKey(ByteString.copyFrom(key.getPublicKeyByte())) .setSign(ByteString.copyFrom(signRFC6979(key, message.toByteArray()))) .build(); } - public static frostFS.refs.Types.SignatureRFC6979 signRFC6979(ECDsa key, ByteString data) { - return frostFS.refs.Types.SignatureRFC6979.newBuilder() + public static frostfs.refs.Types.SignatureRFC6979 signRFC6979(ECDsa key, ByteString data) { + return frostfs.refs.Types.SignatureRFC6979.newBuilder() .setKey(ByteString.copyFrom(key.getPublicKeyByte())) .setSign(ByteString.copyFrom(signRFC6979(key, data.toByteArray()))) .build(); } - public static frostFS.refs.Types.Signature signMessagePart(ECDsa key, Message data) { + public static frostfs.refs.Types.Signature signMessagePart(ECDsa key, Message data) { var data2Sign = data.getSerializedSize() == 0 ? new byte[]{} : data.toByteArray(); - return frostFS.refs.Types.Signature.newBuilder() + return frostfs.refs.Types.Signature.newBuilder() .setKey(ByteString.copyFrom(key.getPublicKeyByte())) .setSign(ByteString.copyFrom(signData(key, data2Sign))) .build(); } public static void sign(Message.Builder request, ECDsa key) { - var meta = getField(request, META_HEADER_FIELD_NAME); - var body = getField(request, BODY_FIELD_NAME); - var verify = getField(request, VERIFY_HEADER_FIELD_NAME); - var verifyOrigin = getField(verify, ORIGIN_FIELD_NAME); + var meta = MessageHelper.getField(request, META_HEADER_FIELD_NAME); + var body = MessageHelper.getField(request, BODY_FIELD_NAME); + var verify = MessageHelper.getField(request, VERIFY_HEADER_FIELD_NAME); + var verifyOrigin = MessageHelper.getField(verify, ORIGIN_FIELD_NAME); Message.Builder verifyBuilder; if (verify instanceof Types.RequestVerificationHeader) { @@ -107,14 +105,14 @@ public class RequestSigner { } if (verifyOrigin.getSerializedSize() == 0) { - setField(verifyBuilder, BODY_SIGNATURE_FIELD_NAME, signMessagePart(key, body)); + MessageHelper.setField(verifyBuilder, BODY_SIGNATURE_FIELD_NAME, signMessagePart(key, body)); } else { - setField(verifyBuilder, ORIGIN_FIELD_NAME, verifyOrigin); + MessageHelper.setField(verifyBuilder, ORIGIN_FIELD_NAME, verifyOrigin); } - setField(verifyBuilder, META_SIGNATURE_FIELD_NAME, signMessagePart(key, meta)); - setField(verifyBuilder, ORIGIN_SIGNATURE_FIELD_NAME, signMessagePart(key, verifyOrigin)); - setField(request, VERIFY_HEADER_FIELD_NAME, verifyBuilder.build()); + MessageHelper.setField(verifyBuilder, META_SIGNATURE_FIELD_NAME, signMessagePart(key, meta)); + MessageHelper.setField(verifyBuilder, ORIGIN_SIGNATURE_FIELD_NAME, signMessagePart(key, verifyOrigin)); + MessageHelper.setField(request, VERIFY_HEADER_FIELD_NAME, verifyBuilder.build()); } } diff --git a/client/src/main/java/info/FrostFS/sdk/tools/Verifier.java b/client/src/main/java/info/frostfs/sdk/tools/Verifier.java similarity index 80% rename from client/src/main/java/info/FrostFS/sdk/tools/Verifier.java rename to client/src/main/java/info/frostfs/sdk/tools/Verifier.java index 14e7327..8fed127 100644 --- a/client/src/main/java/info/FrostFS/sdk/tools/Verifier.java +++ b/client/src/main/java/info/frostfs/sdk/tools/Verifier.java @@ -1,8 +1,9 @@ -package info.FrostFS.sdk.tools; +package info.frostfs.sdk.tools; import com.google.protobuf.Message; -import frostFS.session.Types; -import info.FrostFS.sdk.mappers.StatusMapper; +import frostfs.session.Types; +import info.frostfs.sdk.mappers.StatusMapper; +import info.frostfs.sdk.constants.CryptoConst; import org.apache.commons.codec.digest.DigestUtils; import org.bouncycastle.asn1.sec.SECNamedCurves; import org.bouncycastle.asn1.sec.SECObjectIdentifiers; @@ -16,10 +17,8 @@ import java.security.PublicKey; import java.security.Signature; import java.util.Arrays; -import static info.FrostFS.sdk.KeyExtension.getPublicKeyFromBytes; -import static info.FrostFS.sdk.constants.CryptoConst.SIGNATURE_ALGORITHM; -import static info.FrostFS.sdk.constants.FieldConst.*; -import static info.FrostFS.sdk.tools.MessageHelper.getField; +import static info.frostfs.sdk.KeyExtension.getPublicKeyFromBytes; +import static info.frostfs.sdk.constants.FieldConst.*; import static java.util.Objects.isNull; import static org.bouncycastle.crypto.util.DigestFactory.createSHA256; import static org.bouncycastle.util.BigIntegers.fromUnsignedByteArray; @@ -29,7 +28,7 @@ public class Verifier { public static final String ERROR_INVALID_RESPONSE = "Invalid response"; public static final int RFC6979_SIG_SIZE = 64; - public static boolean verifyRFC6979(frostFS.refs.Types.SignatureRFC6979 signature, Message data) { + public static boolean verifyRFC6979(frostfs.refs.Types.SignatureRFC6979 signature, Message data) { return verifyRFC6979(signature.getKey().toByteArray(), data.toByteArray(), signature.getSign().toByteArray()); } @@ -68,7 +67,7 @@ public class Verifier { throw new IllegalArgumentException(ERROR_INVALID_RESPONSE); } - var metaHeader = (Types.ResponseMetaHeader) getField(response, META_HEADER_FIELD_NAME); + var metaHeader = (Types.ResponseMetaHeader) MessageHelper.getField(response, META_HEADER_FIELD_NAME); var status = StatusMapper.toModel(metaHeader.getStatus()); if (!status.isSuccess()) { throw new IllegalArgumentException(status.toString()); @@ -76,16 +75,16 @@ public class Verifier { } public static boolean verify(Message response) { - var body = getField(response, BODY_FIELD_NAME); - var metaHeader = (Types.ResponseMetaHeader) getField(response, META_HEADER_FIELD_NAME); - var verifyHeader = (Types.ResponseVerificationHeader) getField(response, VERIFY_HEADER_FIELD_NAME); + var body = MessageHelper.getField(response, BODY_FIELD_NAME); + var metaHeader = (Types.ResponseMetaHeader) MessageHelper.getField(response, META_HEADER_FIELD_NAME); + var verifyHeader = (Types.ResponseVerificationHeader) MessageHelper.getField(response, VERIFY_HEADER_FIELD_NAME); return verifyMatryoshkaLevel(body, metaHeader, verifyHeader); } public static boolean verifyMatryoshkaLevel(Message data, - frostFS.session.Types.ResponseMetaHeader meta, - frostFS.session.Types.ResponseVerificationHeader verification) { + frostfs.session.Types.ResponseMetaHeader meta, + frostfs.session.Types.ResponseVerificationHeader verification) { if (!verifyMessagePart(verification.getMetaSignature(), meta)) return false; var origin = verification.getOrigin(); if (!verifyMessagePart(verification.getOriginSignature(), origin)) return false; @@ -96,7 +95,7 @@ public class Verifier { && verifyMatryoshkaLevel(data, meta.getOrigin(), origin); } - public static boolean verifyMessagePart(frostFS.refs.Types.Signature sig, Message data) { + public static boolean verifyMessagePart(frostfs.refs.Types.Signature sig, Message data) { if (sig.getSerializedSize() == 0 || sig.getKey().isEmpty() || sig.getSign().isEmpty()) return false; var publicKey = getPublicKeyFromBytes(sig.getKey().toByteArray()); @@ -107,7 +106,7 @@ public class Verifier { public static boolean verifyData(PublicKey publicKey, byte[] data, byte[] sig) { try { - Signature signature = Signature.getInstance(SIGNATURE_ALGORITHM); + Signature signature = Signature.getInstance(CryptoConst.SIGNATURE_ALGORITHM); signature.initVerify(publicKey); signature.update(DigestUtils.sha512(data)); return signature.verify(Arrays.copyOfRange(sig, 1, sig.length)); diff --git a/cryptography/pom.xml b/cryptography/pom.xml index f92accd..156b0bd 100644 --- a/cryptography/pom.xml +++ b/cryptography/pom.xml @@ -4,8 +4,8 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - info.FrostFS.sdk - FrostFS-sdk-java + info.frostfs.sdk + frostfs-sdk-java 0.1.0 diff --git a/cryptography/src/main/java/info/FrostFS/sdk/ArrayHelper.java b/cryptography/src/main/java/info/frostfs/sdk/ArrayHelper.java similarity index 93% rename from cryptography/src/main/java/info/FrostFS/sdk/ArrayHelper.java rename to cryptography/src/main/java/info/frostfs/sdk/ArrayHelper.java index 5274f60..ae43afd 100644 --- a/cryptography/src/main/java/info/FrostFS/sdk/ArrayHelper.java +++ b/cryptography/src/main/java/info/frostfs/sdk/ArrayHelper.java @@ -1,4 +1,4 @@ -package info.FrostFS.sdk; +package info.frostfs.sdk; public class ArrayHelper { diff --git a/cryptography/src/main/java/info/FrostFS/sdk/Base58.java b/cryptography/src/main/java/info/frostfs/sdk/Base58.java similarity index 97% rename from cryptography/src/main/java/info/FrostFS/sdk/Base58.java rename to cryptography/src/main/java/info/frostfs/sdk/Base58.java index 9fe27af..f75d705 100644 --- a/cryptography/src/main/java/info/FrostFS/sdk/Base58.java +++ b/cryptography/src/main/java/info/frostfs/sdk/Base58.java @@ -1,9 +1,9 @@ -package info.FrostFS.sdk; +package info.frostfs.sdk; import java.util.Arrays; -import static info.FrostFS.sdk.ArrayHelper.concat; -import static info.FrostFS.sdk.Helper.getSha256; +import static info.frostfs.sdk.ArrayHelper.concat; +import static info.frostfs.sdk.Helper.getSha256; import static java.util.Objects.isNull; public class Base58 { diff --git a/cryptography/src/main/java/info/FrostFS/sdk/Helper.java b/cryptography/src/main/java/info/frostfs/sdk/Helper.java similarity index 97% rename from cryptography/src/main/java/info/FrostFS/sdk/Helper.java rename to cryptography/src/main/java/info/frostfs/sdk/Helper.java index 083121b..a6068e2 100644 --- a/cryptography/src/main/java/info/FrostFS/sdk/Helper.java +++ b/cryptography/src/main/java/info/frostfs/sdk/Helper.java @@ -1,4 +1,4 @@ -package info.FrostFS.sdk; +package info.frostfs.sdk; import com.google.protobuf.ByteString; import com.google.protobuf.Message; diff --git a/cryptography/src/main/java/info/FrostFS/sdk/KeyExtension.java b/cryptography/src/main/java/info/frostfs/sdk/KeyExtension.java similarity index 98% rename from cryptography/src/main/java/info/FrostFS/sdk/KeyExtension.java rename to cryptography/src/main/java/info/frostfs/sdk/KeyExtension.java index d057a04..4ef8ffe 100644 --- a/cryptography/src/main/java/info/FrostFS/sdk/KeyExtension.java +++ b/cryptography/src/main/java/info/frostfs/sdk/KeyExtension.java @@ -1,4 +1,4 @@ -package info.FrostFS.sdk; +package info.frostfs.sdk; import org.bouncycastle.asn1.sec.SECNamedCurves; import org.bouncycastle.asn1.sec.SECObjectIdentifiers; @@ -23,8 +23,8 @@ import java.security.spec.ECPublicKeySpec; import java.security.spec.InvalidKeySpecException; import java.util.Arrays; -import static info.FrostFS.sdk.Helper.getRIPEMD160; -import static info.FrostFS.sdk.Helper.getSha256; +import static info.frostfs.sdk.Helper.getRIPEMD160; +import static info.frostfs.sdk.Helper.getSha256; import static org.bouncycastle.util.BigIntegers.fromUnsignedByteArray; public class KeyExtension { diff --git a/models/pom.xml b/models/pom.xml index 1f04f5e..e9dd655 100644 --- a/models/pom.xml +++ b/models/pom.xml @@ -4,8 +4,8 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - info.FrostFS.sdk - FrostFS-sdk-java + info.frostfs.sdk + frostfs-sdk-java 0.1.0 @@ -24,12 +24,12 @@ 3.14.0 - info.FrostFS.sdk + info.frostfs.sdk cryptography 0.1.0 - info.FrostFS.sdk + info.frostfs.sdk protos 0.1.0 diff --git a/models/src/main/java/info/FrostFS/sdk/UUIDExtension.java b/models/src/main/java/info/frostfs/sdk/UUIDExtension.java similarity index 95% rename from models/src/main/java/info/FrostFS/sdk/UUIDExtension.java rename to models/src/main/java/info/frostfs/sdk/UUIDExtension.java index df146ec..7edc01c 100644 --- a/models/src/main/java/info/FrostFS/sdk/UUIDExtension.java +++ b/models/src/main/java/info/frostfs/sdk/UUIDExtension.java @@ -1,4 +1,4 @@ -package info.FrostFS.sdk; +package info.frostfs.sdk; import java.nio.ByteBuffer; import java.util.UUID; diff --git a/models/src/main/java/info/FrostFS/sdk/constants/AppConst.java b/models/src/main/java/info/frostfs/sdk/constants/AppConst.java similarity index 79% rename from models/src/main/java/info/FrostFS/sdk/constants/AppConst.java rename to models/src/main/java/info/frostfs/sdk/constants/AppConst.java index 8880eb0..ea60f0e 100644 --- a/models/src/main/java/info/FrostFS/sdk/constants/AppConst.java +++ b/models/src/main/java/info/frostfs/sdk/constants/AppConst.java @@ -1,4 +1,4 @@ -package info.FrostFS.sdk.constants; +package info.frostfs.sdk.constants; public class AppConst { public static final int OBJECT_CHUNK_SIZE = 3 * (1 << 20); diff --git a/models/src/main/java/info/FrostFS/sdk/constants/FieldConst.java b/models/src/main/java/info/frostfs/sdk/constants/FieldConst.java similarity index 93% rename from models/src/main/java/info/FrostFS/sdk/constants/FieldConst.java rename to models/src/main/java/info/frostfs/sdk/constants/FieldConst.java index 761258a..fe85aad 100644 --- a/models/src/main/java/info/FrostFS/sdk/constants/FieldConst.java +++ b/models/src/main/java/info/frostfs/sdk/constants/FieldConst.java @@ -1,4 +1,4 @@ -package info.FrostFS.sdk.constants; +package info.frostfs.sdk.constants; public class FieldConst { public static final String META_HEADER_FIELD_NAME = "meta_header"; diff --git a/models/src/main/java/info/FrostFS/sdk/constants/XHeaderConst.java b/models/src/main/java/info/frostfs/sdk/constants/XHeaderConst.java similarity index 89% rename from models/src/main/java/info/FrostFS/sdk/constants/XHeaderConst.java rename to models/src/main/java/info/frostfs/sdk/constants/XHeaderConst.java index 8c435e7..c1cc83c 100644 --- a/models/src/main/java/info/FrostFS/sdk/constants/XHeaderConst.java +++ b/models/src/main/java/info/frostfs/sdk/constants/XHeaderConst.java @@ -1,4 +1,4 @@ -package info.FrostFS.sdk.constants; +package info.frostfs.sdk.constants; public class XHeaderConst { public static final String RESERVED_XHEADER_PREFIX = "__SYSTEM__"; diff --git a/models/src/main/java/info/FrostFS/sdk/dto/MetaHeader.java b/models/src/main/java/info/frostfs/sdk/dto/MetaHeader.java similarity index 96% rename from models/src/main/java/info/FrostFS/sdk/dto/MetaHeader.java rename to models/src/main/java/info/frostfs/sdk/dto/MetaHeader.java index b0eead0..4e22f46 100644 --- a/models/src/main/java/info/FrostFS/sdk/dto/MetaHeader.java +++ b/models/src/main/java/info/frostfs/sdk/dto/MetaHeader.java @@ -1,4 +1,4 @@ -package info.FrostFS.sdk.dto; +package info.frostfs.sdk.dto; public class MetaHeader { private Version version; diff --git a/models/src/main/java/info/FrostFS/sdk/dto/OwnerId.java b/models/src/main/java/info/frostfs/sdk/dto/OwnerId.java similarity index 75% rename from models/src/main/java/info/FrostFS/sdk/dto/OwnerId.java rename to models/src/main/java/info/frostfs/sdk/dto/OwnerId.java index 40b4f04..d4a173b 100644 --- a/models/src/main/java/info/FrostFS/sdk/dto/OwnerId.java +++ b/models/src/main/java/info/frostfs/sdk/dto/OwnerId.java @@ -1,8 +1,8 @@ -package info.FrostFS.sdk.dto; +package info.frostfs.sdk.dto; -import info.FrostFS.sdk.Base58; +import info.frostfs.sdk.Base58; -import static info.FrostFS.sdk.KeyExtension.publicKeyToAddress; +import static info.frostfs.sdk.KeyExtension.publicKeyToAddress; public class OwnerId { private final String value; diff --git a/models/src/main/java/info/FrostFS/sdk/dto/SessionToken.java b/models/src/main/java/info/frostfs/sdk/dto/SessionToken.java similarity index 91% rename from models/src/main/java/info/FrostFS/sdk/dto/SessionToken.java rename to models/src/main/java/info/frostfs/sdk/dto/SessionToken.java index 5980875..2f4055b 100644 --- a/models/src/main/java/info/FrostFS/sdk/dto/SessionToken.java +++ b/models/src/main/java/info/frostfs/sdk/dto/SessionToken.java @@ -1,4 +1,4 @@ -package info.FrostFS.sdk.dto; +package info.frostfs.sdk.dto; public class SessionToken { private final byte[] id; diff --git a/models/src/main/java/info/FrostFS/sdk/dto/Signature.java b/models/src/main/java/info/frostfs/sdk/dto/Signature.java similarity index 87% rename from models/src/main/java/info/FrostFS/sdk/dto/Signature.java rename to models/src/main/java/info/frostfs/sdk/dto/Signature.java index 0ab5b3e..5b2b85d 100644 --- a/models/src/main/java/info/FrostFS/sdk/dto/Signature.java +++ b/models/src/main/java/info/frostfs/sdk/dto/Signature.java @@ -1,6 +1,6 @@ -package info.FrostFS.sdk.dto; +package info.frostfs.sdk.dto; -import info.FrostFS.sdk.enums.SignatureScheme; +import info.frostfs.sdk.enums.SignatureScheme; public class Signature { private byte[] key; diff --git a/models/src/main/java/info/FrostFS/sdk/dto/Split.java b/models/src/main/java/info/frostfs/sdk/dto/Split.java similarity index 91% rename from models/src/main/java/info/FrostFS/sdk/dto/Split.java rename to models/src/main/java/info/frostfs/sdk/dto/Split.java index be51331..2b5726a 100644 --- a/models/src/main/java/info/FrostFS/sdk/dto/Split.java +++ b/models/src/main/java/info/frostfs/sdk/dto/Split.java @@ -1,7 +1,7 @@ -package info.FrostFS.sdk.dto; +package info.frostfs.sdk.dto; -import info.FrostFS.sdk.dto.object.ObjectHeader; -import info.FrostFS.sdk.dto.object.ObjectId; +import info.frostfs.sdk.dto.object.ObjectHeader; +import info.frostfs.sdk.dto.object.ObjectId; import java.util.ArrayList; import java.util.List; diff --git a/models/src/main/java/info/FrostFS/sdk/dto/SplitId.java b/models/src/main/java/info/frostfs/sdk/dto/SplitId.java similarity index 85% rename from models/src/main/java/info/FrostFS/sdk/dto/SplitId.java rename to models/src/main/java/info/frostfs/sdk/dto/SplitId.java index b01b8d0..6ecc031 100644 --- a/models/src/main/java/info/FrostFS/sdk/dto/SplitId.java +++ b/models/src/main/java/info/frostfs/sdk/dto/SplitId.java @@ -1,9 +1,9 @@ -package info.FrostFS.sdk.dto; +package info.frostfs.sdk.dto; import java.util.UUID; -import static info.FrostFS.sdk.UUIDExtension.asBytes; -import static info.FrostFS.sdk.UUIDExtension.asUuid; +import static info.frostfs.sdk.UUIDExtension.asBytes; +import static info.frostfs.sdk.UUIDExtension.asUuid; import static java.util.Objects.isNull; public class SplitId { diff --git a/models/src/main/java/info/FrostFS/sdk/dto/Status.java b/models/src/main/java/info/frostfs/sdk/dto/Status.java similarity index 92% rename from models/src/main/java/info/FrostFS/sdk/dto/Status.java rename to models/src/main/java/info/frostfs/sdk/dto/Status.java index d766546..dd242a3 100644 --- a/models/src/main/java/info/FrostFS/sdk/dto/Status.java +++ b/models/src/main/java/info/frostfs/sdk/dto/Status.java @@ -1,6 +1,6 @@ -package info.FrostFS.sdk.dto; +package info.frostfs.sdk.dto; -import info.FrostFS.sdk.enums.StatusCode; +import info.frostfs.sdk.enums.StatusCode; import static java.util.Objects.isNull; diff --git a/models/src/main/java/info/FrostFS/sdk/dto/Version.java b/models/src/main/java/info/frostfs/sdk/dto/Version.java similarity index 95% rename from models/src/main/java/info/FrostFS/sdk/dto/Version.java rename to models/src/main/java/info/frostfs/sdk/dto/Version.java index c498b49..563d8b6 100644 --- a/models/src/main/java/info/FrostFS/sdk/dto/Version.java +++ b/models/src/main/java/info/frostfs/sdk/dto/Version.java @@ -1,4 +1,4 @@ -package info.FrostFS.sdk.dto; +package info.frostfs.sdk.dto; public class Version { private int major; diff --git a/models/src/main/java/info/FrostFS/sdk/dto/container/Container.java b/models/src/main/java/info/frostfs/sdk/dto/container/Container.java similarity index 86% rename from models/src/main/java/info/FrostFS/sdk/dto/container/Container.java rename to models/src/main/java/info/frostfs/sdk/dto/container/Container.java index b952fcf..e07c28a 100644 --- a/models/src/main/java/info/FrostFS/sdk/dto/container/Container.java +++ b/models/src/main/java/info/frostfs/sdk/dto/container/Container.java @@ -1,8 +1,8 @@ -package info.FrostFS.sdk.dto.container; +package info.frostfs.sdk.dto.container; -import info.FrostFS.sdk.dto.Version; -import info.FrostFS.sdk.dto.netmap.PlacementPolicy; -import info.FrostFS.sdk.enums.BasicAcl; +import info.frostfs.sdk.dto.Version; +import info.frostfs.sdk.dto.netmap.PlacementPolicy; +import info.frostfs.sdk.enums.BasicAcl; import java.util.UUID; diff --git a/models/src/main/java/info/FrostFS/sdk/dto/container/ContainerId.java b/models/src/main/java/info/frostfs/sdk/dto/container/ContainerId.java similarity index 85% rename from models/src/main/java/info/FrostFS/sdk/dto/container/ContainerId.java rename to models/src/main/java/info/frostfs/sdk/dto/container/ContainerId.java index fd8d529..b24a069 100644 --- a/models/src/main/java/info/FrostFS/sdk/dto/container/ContainerId.java +++ b/models/src/main/java/info/frostfs/sdk/dto/container/ContainerId.java @@ -1,7 +1,7 @@ -package info.FrostFS.sdk.dto.container; +package info.frostfs.sdk.dto.container; -import info.FrostFS.sdk.Base58; -import info.FrostFS.sdk.constants.AppConst; +import info.frostfs.sdk.Base58; +import info.frostfs.sdk.constants.AppConst; public class ContainerId { private String value; diff --git a/models/src/main/java/info/FrostFS/sdk/dto/netmap/NetmapSnapshot.java b/models/src/main/java/info/frostfs/sdk/dto/netmap/NetmapSnapshot.java similarity index 92% rename from models/src/main/java/info/FrostFS/sdk/dto/netmap/NetmapSnapshot.java rename to models/src/main/java/info/frostfs/sdk/dto/netmap/NetmapSnapshot.java index 8619f00..9c2ef2c 100644 --- a/models/src/main/java/info/FrostFS/sdk/dto/netmap/NetmapSnapshot.java +++ b/models/src/main/java/info/frostfs/sdk/dto/netmap/NetmapSnapshot.java @@ -1,4 +1,4 @@ -package info.FrostFS.sdk.dto.netmap; +package info.frostfs.sdk.dto.netmap; import java.util.List; diff --git a/models/src/main/java/info/FrostFS/sdk/dto/netmap/NodeInfo.java b/models/src/main/java/info/frostfs/sdk/dto/netmap/NodeInfo.java similarity index 89% rename from models/src/main/java/info/FrostFS/sdk/dto/netmap/NodeInfo.java rename to models/src/main/java/info/frostfs/sdk/dto/netmap/NodeInfo.java index bd78146..2be1b1b 100644 --- a/models/src/main/java/info/FrostFS/sdk/dto/netmap/NodeInfo.java +++ b/models/src/main/java/info/frostfs/sdk/dto/netmap/NodeInfo.java @@ -1,7 +1,7 @@ -package info.FrostFS.sdk.dto.netmap; +package info.frostfs.sdk.dto.netmap; -import info.FrostFS.sdk.dto.Version; -import info.FrostFS.sdk.enums.NodeState; +import info.frostfs.sdk.dto.Version; +import info.frostfs.sdk.enums.NodeState; import java.util.List; import java.util.Map; diff --git a/models/src/main/java/info/FrostFS/sdk/dto/netmap/PlacementPolicy.java b/models/src/main/java/info/frostfs/sdk/dto/netmap/PlacementPolicy.java similarity index 90% rename from models/src/main/java/info/FrostFS/sdk/dto/netmap/PlacementPolicy.java rename to models/src/main/java/info/frostfs/sdk/dto/netmap/PlacementPolicy.java index 9e92a63..74a1c72 100644 --- a/models/src/main/java/info/FrostFS/sdk/dto/netmap/PlacementPolicy.java +++ b/models/src/main/java/info/frostfs/sdk/dto/netmap/PlacementPolicy.java @@ -1,4 +1,4 @@ -package info.FrostFS.sdk.dto.netmap; +package info.frostfs.sdk.dto.netmap; public class PlacementPolicy { private final Replica[] replicas; diff --git a/models/src/main/java/info/FrostFS/sdk/dto/netmap/Replica.java b/models/src/main/java/info/frostfs/sdk/dto/netmap/Replica.java similarity index 94% rename from models/src/main/java/info/FrostFS/sdk/dto/netmap/Replica.java rename to models/src/main/java/info/frostfs/sdk/dto/netmap/Replica.java index 5189df7..235d288 100644 --- a/models/src/main/java/info/FrostFS/sdk/dto/netmap/Replica.java +++ b/models/src/main/java/info/frostfs/sdk/dto/netmap/Replica.java @@ -1,4 +1,4 @@ -package info.FrostFS.sdk.dto.netmap; +package info.frostfs.sdk.dto.netmap; import static java.util.Objects.isNull; diff --git a/models/src/main/java/info/FrostFS/sdk/dto/object/LargeObject.java b/models/src/main/java/info/frostfs/sdk/dto/object/LargeObject.java similarity index 81% rename from models/src/main/java/info/FrostFS/sdk/dto/object/LargeObject.java rename to models/src/main/java/info/frostfs/sdk/dto/object/LargeObject.java index 66d9ad0..4cab2ed 100644 --- a/models/src/main/java/info/FrostFS/sdk/dto/object/LargeObject.java +++ b/models/src/main/java/info/frostfs/sdk/dto/object/LargeObject.java @@ -1,10 +1,10 @@ -package info.FrostFS.sdk.dto.object; +package info.frostfs.sdk.dto.object; -import info.FrostFS.sdk.dto.container.ContainerId; +import info.frostfs.sdk.dto.container.ContainerId; import java.security.MessageDigest; -import static info.FrostFS.sdk.Helper.getSha256Instance; +import static info.frostfs.sdk.Helper.getSha256Instance; public class LargeObject extends ObjectFrostFS { private final MessageDigest payloadHash; diff --git a/models/src/main/java/info/FrostFS/sdk/dto/object/LinkObject.java b/models/src/main/java/info/frostfs/sdk/dto/object/LinkObject.java similarity index 74% rename from models/src/main/java/info/FrostFS/sdk/dto/object/LinkObject.java rename to models/src/main/java/info/frostfs/sdk/dto/object/LinkObject.java index e7b8ea4..b641888 100644 --- a/models/src/main/java/info/FrostFS/sdk/dto/object/LinkObject.java +++ b/models/src/main/java/info/frostfs/sdk/dto/object/LinkObject.java @@ -1,8 +1,8 @@ -package info.FrostFS.sdk.dto.object; +package info.frostfs.sdk.dto.object; -import info.FrostFS.sdk.dto.Split; -import info.FrostFS.sdk.dto.SplitId; -import info.FrostFS.sdk.dto.container.ContainerId; +import info.frostfs.sdk.dto.Split; +import info.frostfs.sdk.dto.SplitId; +import info.frostfs.sdk.dto.container.ContainerId; import java.util.List; diff --git a/models/src/main/java/info/FrostFS/sdk/dto/object/ObjectAttribute.java b/models/src/main/java/info/frostfs/sdk/dto/object/ObjectAttribute.java similarity index 92% rename from models/src/main/java/info/FrostFS/sdk/dto/object/ObjectAttribute.java rename to models/src/main/java/info/frostfs/sdk/dto/object/ObjectAttribute.java index 9729f01..0c2554b 100644 --- a/models/src/main/java/info/FrostFS/sdk/dto/object/ObjectAttribute.java +++ b/models/src/main/java/info/frostfs/sdk/dto/object/ObjectAttribute.java @@ -1,4 +1,4 @@ -package info.FrostFS.sdk.dto.object; +package info.frostfs.sdk.dto.object; public class ObjectAttribute { private String key; diff --git a/models/src/main/java/info/FrostFS/sdk/dto/object/ObjectFilter.java b/models/src/main/java/info/frostfs/sdk/dto/object/ObjectFilter.java similarity index 90% rename from models/src/main/java/info/FrostFS/sdk/dto/object/ObjectFilter.java rename to models/src/main/java/info/frostfs/sdk/dto/object/ObjectFilter.java index 0dae796..1443ee2 100644 --- a/models/src/main/java/info/FrostFS/sdk/dto/object/ObjectFilter.java +++ b/models/src/main/java/info/frostfs/sdk/dto/object/ObjectFilter.java @@ -1,8 +1,8 @@ -package info.FrostFS.sdk.dto.object; +package info.frostfs.sdk.dto.object; -import info.FrostFS.sdk.dto.OwnerId; -import info.FrostFS.sdk.dto.Version; -import info.FrostFS.sdk.enums.ObjectMatchType; +import info.frostfs.sdk.dto.OwnerId; +import info.frostfs.sdk.dto.Version; +import info.frostfs.sdk.enums.ObjectMatchType; public class ObjectFilter { private static final String HEADER_PREFIX = "$Object:"; diff --git a/models/src/main/java/info/FrostFS/sdk/dto/object/ObjectFrostFS.java b/models/src/main/java/info/frostfs/sdk/dto/object/ObjectFrostFS.java similarity index 92% rename from models/src/main/java/info/FrostFS/sdk/dto/object/ObjectFrostFS.java rename to models/src/main/java/info/frostfs/sdk/dto/object/ObjectFrostFS.java index 3b9d3c9..5001161 100644 --- a/models/src/main/java/info/FrostFS/sdk/dto/object/ObjectFrostFS.java +++ b/models/src/main/java/info/frostfs/sdk/dto/object/ObjectFrostFS.java @@ -1,8 +1,8 @@ -package info.FrostFS.sdk.dto.object; +package info.frostfs.sdk.dto.object; -import info.FrostFS.sdk.dto.Split; -import info.FrostFS.sdk.dto.container.ContainerId; -import info.FrostFS.sdk.enums.ObjectType; +import info.frostfs.sdk.dto.Split; +import info.frostfs.sdk.dto.container.ContainerId; +import info.frostfs.sdk.enums.ObjectType; import java.util.ArrayList; import java.util.List; diff --git a/models/src/main/java/info/FrostFS/sdk/dto/object/ObjectHeader.java b/models/src/main/java/info/frostfs/sdk/dto/object/ObjectHeader.java similarity index 91% rename from models/src/main/java/info/FrostFS/sdk/dto/object/ObjectHeader.java rename to models/src/main/java/info/frostfs/sdk/dto/object/ObjectHeader.java index 401ed41..147ec4e 100644 --- a/models/src/main/java/info/FrostFS/sdk/dto/object/ObjectHeader.java +++ b/models/src/main/java/info/frostfs/sdk/dto/object/ObjectHeader.java @@ -1,10 +1,10 @@ -package info.FrostFS.sdk.dto.object; +package info.frostfs.sdk.dto.object; -import info.FrostFS.sdk.dto.OwnerId; -import info.FrostFS.sdk.dto.Split; -import info.FrostFS.sdk.dto.Version; -import info.FrostFS.sdk.dto.container.ContainerId; -import info.FrostFS.sdk.enums.ObjectType; +import info.frostfs.sdk.dto.OwnerId; +import info.frostfs.sdk.dto.Split; +import info.frostfs.sdk.dto.Version; +import info.frostfs.sdk.dto.container.ContainerId; +import info.frostfs.sdk.enums.ObjectType; import java.util.List; diff --git a/models/src/main/java/info/FrostFS/sdk/dto/object/ObjectId.java b/models/src/main/java/info/frostfs/sdk/dto/object/ObjectId.java similarity index 83% rename from models/src/main/java/info/FrostFS/sdk/dto/object/ObjectId.java rename to models/src/main/java/info/frostfs/sdk/dto/object/ObjectId.java index 4b36d80..3c9965a 100644 --- a/models/src/main/java/info/FrostFS/sdk/dto/object/ObjectId.java +++ b/models/src/main/java/info/frostfs/sdk/dto/object/ObjectId.java @@ -1,7 +1,7 @@ -package info.FrostFS.sdk.dto.object; +package info.frostfs.sdk.dto.object; -import info.FrostFS.sdk.Base58; -import info.FrostFS.sdk.constants.AppConst; +import info.frostfs.sdk.Base58; +import info.frostfs.sdk.constants.AppConst; public class ObjectId { private final String value; diff --git a/models/src/main/java/info/FrostFS/sdk/enums/BasicAcl.java b/models/src/main/java/info/frostfs/sdk/enums/BasicAcl.java similarity index 95% rename from models/src/main/java/info/FrostFS/sdk/enums/BasicAcl.java rename to models/src/main/java/info/frostfs/sdk/enums/BasicAcl.java index 7ebf7f7..52bab99 100644 --- a/models/src/main/java/info/FrostFS/sdk/enums/BasicAcl.java +++ b/models/src/main/java/info/frostfs/sdk/enums/BasicAcl.java @@ -1,4 +1,4 @@ -package info.FrostFS.sdk.enums; +package info.frostfs.sdk.enums; import java.util.Collections; import java.util.HashMap; diff --git a/models/src/main/java/info/FrostFS/sdk/enums/NodeState.java b/models/src/main/java/info/frostfs/sdk/enums/NodeState.java similarity index 95% rename from models/src/main/java/info/FrostFS/sdk/enums/NodeState.java rename to models/src/main/java/info/frostfs/sdk/enums/NodeState.java index e6f1464..3f833e3 100644 --- a/models/src/main/java/info/FrostFS/sdk/enums/NodeState.java +++ b/models/src/main/java/info/frostfs/sdk/enums/NodeState.java @@ -1,4 +1,4 @@ -package info.FrostFS.sdk.enums; +package info.frostfs.sdk.enums; import java.util.Collections; import java.util.HashMap; diff --git a/models/src/main/java/info/FrostFS/sdk/enums/ObjectMatchType.java b/models/src/main/java/info/frostfs/sdk/enums/ObjectMatchType.java similarity index 87% rename from models/src/main/java/info/FrostFS/sdk/enums/ObjectMatchType.java rename to models/src/main/java/info/frostfs/sdk/enums/ObjectMatchType.java index 385756f..2122ad6 100644 --- a/models/src/main/java/info/FrostFS/sdk/enums/ObjectMatchType.java +++ b/models/src/main/java/info/frostfs/sdk/enums/ObjectMatchType.java @@ -1,4 +1,4 @@ -package info.FrostFS.sdk.enums; +package info.frostfs.sdk.enums; public enum ObjectMatchType { UNSPECIFIED(0), diff --git a/models/src/main/java/info/FrostFS/sdk/enums/ObjectType.java b/models/src/main/java/info/frostfs/sdk/enums/ObjectType.java similarity index 95% rename from models/src/main/java/info/FrostFS/sdk/enums/ObjectType.java rename to models/src/main/java/info/frostfs/sdk/enums/ObjectType.java index feb545f..d252a7a 100644 --- a/models/src/main/java/info/FrostFS/sdk/enums/ObjectType.java +++ b/models/src/main/java/info/frostfs/sdk/enums/ObjectType.java @@ -1,4 +1,4 @@ -package info.FrostFS.sdk.enums; +package info.frostfs.sdk.enums; import java.util.Collections; import java.util.HashMap; diff --git a/models/src/main/java/info/FrostFS/sdk/enums/SignatureScheme.java b/models/src/main/java/info/frostfs/sdk/enums/SignatureScheme.java similarity index 87% rename from models/src/main/java/info/FrostFS/sdk/enums/SignatureScheme.java rename to models/src/main/java/info/frostfs/sdk/enums/SignatureScheme.java index 362c75a..7bb7511 100644 --- a/models/src/main/java/info/FrostFS/sdk/enums/SignatureScheme.java +++ b/models/src/main/java/info/frostfs/sdk/enums/SignatureScheme.java @@ -1,4 +1,4 @@ -package info.FrostFS.sdk.enums; +package info.frostfs.sdk.enums; public enum SignatureScheme { ECDSA_SHA512(0), diff --git a/models/src/main/java/info/FrostFS/sdk/enums/StatusCode.java b/models/src/main/java/info/frostfs/sdk/enums/StatusCode.java similarity index 97% rename from models/src/main/java/info/FrostFS/sdk/enums/StatusCode.java rename to models/src/main/java/info/frostfs/sdk/enums/StatusCode.java index 4e44421..b67e766 100644 --- a/models/src/main/java/info/FrostFS/sdk/enums/StatusCode.java +++ b/models/src/main/java/info/frostfs/sdk/enums/StatusCode.java @@ -1,4 +1,4 @@ -package info.FrostFS.sdk.enums; +package info.frostfs.sdk.enums; import java.util.Collections; import java.util.HashMap; diff --git a/models/src/main/java/info/FrostFS/sdk/mappers/MetaHeaderMapper.java b/models/src/main/java/info/frostfs/sdk/mappers/MetaHeaderMapper.java similarity index 78% rename from models/src/main/java/info/FrostFS/sdk/mappers/MetaHeaderMapper.java rename to models/src/main/java/info/frostfs/sdk/mappers/MetaHeaderMapper.java index 96371d7..736871c 100644 --- a/models/src/main/java/info/FrostFS/sdk/mappers/MetaHeaderMapper.java +++ b/models/src/main/java/info/frostfs/sdk/mappers/MetaHeaderMapper.java @@ -1,7 +1,7 @@ -package info.FrostFS.sdk.mappers; +package info.frostfs.sdk.mappers; -import frostFS.session.Types; -import info.FrostFS.sdk.dto.MetaHeader; +import frostfs.session.Types; +import info.frostfs.sdk.dto.MetaHeader; public class MetaHeaderMapper { diff --git a/models/src/main/java/info/FrostFS/sdk/mappers/OwnerIdMapper.java b/models/src/main/java/info/frostfs/sdk/mappers/OwnerIdMapper.java similarity index 73% rename from models/src/main/java/info/FrostFS/sdk/mappers/OwnerIdMapper.java rename to models/src/main/java/info/frostfs/sdk/mappers/OwnerIdMapper.java index edf9f1c..69cb6e8 100644 --- a/models/src/main/java/info/FrostFS/sdk/mappers/OwnerIdMapper.java +++ b/models/src/main/java/info/frostfs/sdk/mappers/OwnerIdMapper.java @@ -1,8 +1,8 @@ -package info.FrostFS.sdk.mappers; +package info.frostfs.sdk.mappers; import com.google.protobuf.ByteString; -import frostFS.refs.Types; -import info.FrostFS.sdk.dto.OwnerId; +import frostfs.refs.Types; +import info.frostfs.sdk.dto.OwnerId; public class OwnerIdMapper { diff --git a/models/src/main/java/info/FrostFS/sdk/mappers/SessionMapper.java b/models/src/main/java/info/frostfs/sdk/mappers/SessionMapper.java similarity index 93% rename from models/src/main/java/info/FrostFS/sdk/mappers/SessionMapper.java rename to models/src/main/java/info/frostfs/sdk/mappers/SessionMapper.java index a8d329d..c13a61e 100644 --- a/models/src/main/java/info/FrostFS/sdk/mappers/SessionMapper.java +++ b/models/src/main/java/info/frostfs/sdk/mappers/SessionMapper.java @@ -1,8 +1,8 @@ -package info.FrostFS.sdk.mappers; +package info.frostfs.sdk.mappers; import com.google.protobuf.CodedOutputStream; import com.google.protobuf.InvalidProtocolBufferException; -import frostFS.session.Types; +import frostfs.session.Types; import java.io.IOException; diff --git a/models/src/main/java/info/FrostFS/sdk/mappers/SignatureMapper.java b/models/src/main/java/info/frostfs/sdk/mappers/SignatureMapper.java similarity index 87% rename from models/src/main/java/info/FrostFS/sdk/mappers/SignatureMapper.java rename to models/src/main/java/info/frostfs/sdk/mappers/SignatureMapper.java index 3a388d0..1a62bfd 100644 --- a/models/src/main/java/info/FrostFS/sdk/mappers/SignatureMapper.java +++ b/models/src/main/java/info/frostfs/sdk/mappers/SignatureMapper.java @@ -1,8 +1,8 @@ -package info.FrostFS.sdk.mappers; +package info.frostfs.sdk.mappers; import com.google.protobuf.ByteString; -import frostFS.refs.Types; -import info.FrostFS.sdk.dto.Signature; +import frostfs.refs.Types; +import info.frostfs.sdk.dto.Signature; import static java.util.Objects.isNull; diff --git a/models/src/main/java/info/FrostFS/sdk/mappers/StatusMapper.java b/models/src/main/java/info/frostfs/sdk/mappers/StatusMapper.java similarity index 78% rename from models/src/main/java/info/FrostFS/sdk/mappers/StatusMapper.java rename to models/src/main/java/info/frostfs/sdk/mappers/StatusMapper.java index 3817f7d..7c6f3b1 100644 --- a/models/src/main/java/info/FrostFS/sdk/mappers/StatusMapper.java +++ b/models/src/main/java/info/frostfs/sdk/mappers/StatusMapper.java @@ -1,8 +1,8 @@ -package info.FrostFS.sdk.mappers; +package info.frostfs.sdk.mappers; -import frostFS.status.Types; -import info.FrostFS.sdk.dto.Status; -import info.FrostFS.sdk.enums.StatusCode; +import frostfs.status.Types; +import info.frostfs.sdk.dto.Status; +import info.frostfs.sdk.enums.StatusCode; import static java.util.Objects.isNull; diff --git a/models/src/main/java/info/FrostFS/sdk/mappers/VersionMapper.java b/models/src/main/java/info/frostfs/sdk/mappers/VersionMapper.java similarity index 80% rename from models/src/main/java/info/FrostFS/sdk/mappers/VersionMapper.java rename to models/src/main/java/info/frostfs/sdk/mappers/VersionMapper.java index fefb7ba..7888a67 100644 --- a/models/src/main/java/info/FrostFS/sdk/mappers/VersionMapper.java +++ b/models/src/main/java/info/frostfs/sdk/mappers/VersionMapper.java @@ -1,7 +1,7 @@ -package info.FrostFS.sdk.mappers; +package info.frostfs.sdk.mappers; -import frostFS.refs.Types; -import info.FrostFS.sdk.dto.Version; +import frostfs.refs.Types; +import info.frostfs.sdk.dto.Version; public class VersionMapper { diff --git a/models/src/main/java/info/FrostFS/sdk/mappers/container/ContainerIdMapper.java b/models/src/main/java/info/frostfs/sdk/mappers/container/ContainerIdMapper.java similarity index 71% rename from models/src/main/java/info/FrostFS/sdk/mappers/container/ContainerIdMapper.java rename to models/src/main/java/info/frostfs/sdk/mappers/container/ContainerIdMapper.java index b661e71..cbe7237 100644 --- a/models/src/main/java/info/FrostFS/sdk/mappers/container/ContainerIdMapper.java +++ b/models/src/main/java/info/frostfs/sdk/mappers/container/ContainerIdMapper.java @@ -1,8 +1,8 @@ -package info.FrostFS.sdk.mappers.container; +package info.frostfs.sdk.mappers.container; import com.google.protobuf.ByteString; -import frostFS.refs.Types; -import info.FrostFS.sdk.dto.container.ContainerId; +import frostfs.refs.Types; +import info.frostfs.sdk.dto.container.ContainerId; public class ContainerIdMapper { diff --git a/models/src/main/java/info/FrostFS/sdk/mappers/container/ContainerMapper.java b/models/src/main/java/info/frostfs/sdk/mappers/container/ContainerMapper.java similarity index 75% rename from models/src/main/java/info/FrostFS/sdk/mappers/container/ContainerMapper.java rename to models/src/main/java/info/frostfs/sdk/mappers/container/ContainerMapper.java index 9895eee..ff36486 100644 --- a/models/src/main/java/info/FrostFS/sdk/mappers/container/ContainerMapper.java +++ b/models/src/main/java/info/frostfs/sdk/mappers/container/ContainerMapper.java @@ -1,14 +1,14 @@ -package info.FrostFS.sdk.mappers.container; +package info.frostfs.sdk.mappers.container; import com.google.protobuf.ByteString; -import frostFS.container.Types; -import info.FrostFS.sdk.dto.container.Container; -import info.FrostFS.sdk.enums.BasicAcl; -import info.FrostFS.sdk.mappers.VersionMapper; -import info.FrostFS.sdk.mappers.netmap.PlacementPolicyMapper; +import frostfs.container.Types; +import info.frostfs.sdk.dto.container.Container; +import info.frostfs.sdk.enums.BasicAcl; +import info.frostfs.sdk.mappers.VersionMapper; +import info.frostfs.sdk.mappers.netmap.PlacementPolicyMapper; -import static info.FrostFS.sdk.UUIDExtension.asBytes; -import static info.FrostFS.sdk.UUIDExtension.asUuid; +import static info.frostfs.sdk.UUIDExtension.asBytes; +import static info.frostfs.sdk.UUIDExtension.asUuid; import static java.util.Objects.isNull; public class ContainerMapper { diff --git a/models/src/main/java/info/FrostFS/sdk/mappers/netmap/NetmapSnapshotMapper.java b/models/src/main/java/info/frostfs/sdk/mappers/netmap/NetmapSnapshotMapper.java similarity index 80% rename from models/src/main/java/info/FrostFS/sdk/mappers/netmap/NetmapSnapshotMapper.java rename to models/src/main/java/info/frostfs/sdk/mappers/netmap/NetmapSnapshotMapper.java index d18fc32..a396f58 100644 --- a/models/src/main/java/info/FrostFS/sdk/mappers/netmap/NetmapSnapshotMapper.java +++ b/models/src/main/java/info/frostfs/sdk/mappers/netmap/NetmapSnapshotMapper.java @@ -1,7 +1,7 @@ -package info.FrostFS.sdk.mappers.netmap; +package info.frostfs.sdk.mappers.netmap; -import frostFS.netmap.Service; -import info.FrostFS.sdk.dto.netmap.NetmapSnapshot; +import frostfs.netmap.Service; +import info.frostfs.sdk.dto.netmap.NetmapSnapshot; import java.util.stream.Collectors; diff --git a/models/src/main/java/info/FrostFS/sdk/mappers/netmap/NodeInfoMapper.java b/models/src/main/java/info/frostfs/sdk/mappers/netmap/NodeInfoMapper.java similarity index 72% rename from models/src/main/java/info/FrostFS/sdk/mappers/netmap/NodeInfoMapper.java rename to models/src/main/java/info/frostfs/sdk/mappers/netmap/NodeInfoMapper.java index 53eca35..c2bd9b7 100644 --- a/models/src/main/java/info/FrostFS/sdk/mappers/netmap/NodeInfoMapper.java +++ b/models/src/main/java/info/frostfs/sdk/mappers/netmap/NodeInfoMapper.java @@ -1,11 +1,11 @@ -package info.FrostFS.sdk.mappers.netmap; +package info.frostfs.sdk.mappers.netmap; -import frostFS.netmap.Service; -import frostFS.netmap.Types.NodeInfo.Attribute; -import frostFS.refs.Types; -import info.FrostFS.sdk.dto.netmap.NodeInfo; -import info.FrostFS.sdk.enums.NodeState; -import info.FrostFS.sdk.mappers.VersionMapper; +import frostfs.netmap.Service; +import frostfs.netmap.Types.NodeInfo.Attribute; +import frostfs.refs.Types; +import info.frostfs.sdk.dto.netmap.NodeInfo; +import info.frostfs.sdk.enums.NodeState; +import info.frostfs.sdk.mappers.VersionMapper; import java.util.stream.Collectors; @@ -17,7 +17,7 @@ public class NodeInfoMapper { return toModel(nodeInfo.getNodeInfo(), nodeInfo.getVersion()); } - public static NodeInfo toModel(frostFS.netmap.Types.NodeInfo nodeInfo, Types.Version version) { + public static NodeInfo toModel(frostfs.netmap.Types.NodeInfo nodeInfo, Types.Version version) { NodeState nodeState = NodeState.get(nodeInfo.getState().getNumber()); if (isNull(nodeState)) { throw new IllegalArgumentException( diff --git a/models/src/main/java/info/FrostFS/sdk/mappers/netmap/PlacementPolicyMapper.java b/models/src/main/java/info/frostfs/sdk/mappers/netmap/PlacementPolicyMapper.java similarity index 80% rename from models/src/main/java/info/FrostFS/sdk/mappers/netmap/PlacementPolicyMapper.java rename to models/src/main/java/info/frostfs/sdk/mappers/netmap/PlacementPolicyMapper.java index e2803d6..4a6675c 100644 --- a/models/src/main/java/info/FrostFS/sdk/mappers/netmap/PlacementPolicyMapper.java +++ b/models/src/main/java/info/frostfs/sdk/mappers/netmap/PlacementPolicyMapper.java @@ -1,8 +1,8 @@ -package info.FrostFS.sdk.mappers.netmap; +package info.frostfs.sdk.mappers.netmap; -import frostFS.netmap.Types; -import info.FrostFS.sdk.dto.netmap.PlacementPolicy; -import info.FrostFS.sdk.dto.netmap.Replica; +import frostfs.netmap.Types; +import info.frostfs.sdk.dto.netmap.PlacementPolicy; +import info.frostfs.sdk.dto.netmap.Replica; public class PlacementPolicyMapper { diff --git a/models/src/main/java/info/FrostFS/sdk/mappers/netmap/ReplicaMapper.java b/models/src/main/java/info/frostfs/sdk/mappers/netmap/ReplicaMapper.java similarity index 78% rename from models/src/main/java/info/FrostFS/sdk/mappers/netmap/ReplicaMapper.java rename to models/src/main/java/info/frostfs/sdk/mappers/netmap/ReplicaMapper.java index b2929ba..eef3e70 100644 --- a/models/src/main/java/info/FrostFS/sdk/mappers/netmap/ReplicaMapper.java +++ b/models/src/main/java/info/frostfs/sdk/mappers/netmap/ReplicaMapper.java @@ -1,7 +1,7 @@ -package info.FrostFS.sdk.mappers.netmap; +package info.frostfs.sdk.mappers.netmap; -import frostFS.netmap.Types; -import info.FrostFS.sdk.dto.netmap.Replica; +import frostfs.netmap.Types; +import info.frostfs.sdk.dto.netmap.Replica; public class ReplicaMapper { diff --git a/models/src/main/java/info/FrostFS/sdk/mappers/object/ObjectAttributeMapper.java b/models/src/main/java/info/frostfs/sdk/mappers/object/ObjectAttributeMapper.java similarity index 79% rename from models/src/main/java/info/FrostFS/sdk/mappers/object/ObjectAttributeMapper.java rename to models/src/main/java/info/frostfs/sdk/mappers/object/ObjectAttributeMapper.java index 7604e0f..62c67cb 100644 --- a/models/src/main/java/info/FrostFS/sdk/mappers/object/ObjectAttributeMapper.java +++ b/models/src/main/java/info/frostfs/sdk/mappers/object/ObjectAttributeMapper.java @@ -1,7 +1,7 @@ -package info.FrostFS.sdk.mappers.object; +package info.frostfs.sdk.mappers.object; -import frostFS.object.Types; -import info.FrostFS.sdk.dto.object.ObjectAttribute; +import frostfs.object.Types; +import info.frostfs.sdk.dto.object.ObjectAttribute; public class ObjectAttributeMapper { diff --git a/models/src/main/java/info/FrostFS/sdk/mappers/object/ObjectFilterMapper.java b/models/src/main/java/info/frostfs/sdk/mappers/object/ObjectFilterMapper.java similarity index 82% rename from models/src/main/java/info/FrostFS/sdk/mappers/object/ObjectFilterMapper.java rename to models/src/main/java/info/frostfs/sdk/mappers/object/ObjectFilterMapper.java index 52adf8d..8bbe23e 100644 --- a/models/src/main/java/info/FrostFS/sdk/mappers/object/ObjectFilterMapper.java +++ b/models/src/main/java/info/frostfs/sdk/mappers/object/ObjectFilterMapper.java @@ -1,8 +1,8 @@ -package info.FrostFS.sdk.mappers.object; +package info.frostfs.sdk.mappers.object; -import frostFS.object.Service; -import frostFS.object.Types; -import info.FrostFS.sdk.dto.object.ObjectFilter; +import frostfs.object.Service; +import frostfs.object.Types; +import info.frostfs.sdk.dto.object.ObjectFilter; import static java.util.Objects.isNull; diff --git a/models/src/main/java/info/FrostFS/sdk/mappers/object/ObjectFrostFSMapper.java b/models/src/main/java/info/frostfs/sdk/mappers/object/ObjectFrostFSMapper.java similarity index 67% rename from models/src/main/java/info/FrostFS/sdk/mappers/object/ObjectFrostFSMapper.java rename to models/src/main/java/info/frostfs/sdk/mappers/object/ObjectFrostFSMapper.java index 22cc305..28b8332 100644 --- a/models/src/main/java/info/FrostFS/sdk/mappers/object/ObjectFrostFSMapper.java +++ b/models/src/main/java/info/frostfs/sdk/mappers/object/ObjectFrostFSMapper.java @@ -1,8 +1,8 @@ -package info.FrostFS.sdk.mappers.object; +package info.frostfs.sdk.mappers.object; -import frostFS.object.Types; -import info.FrostFS.sdk.dto.object.ObjectFrostFS; -import info.FrostFS.sdk.dto.object.ObjectId; +import frostfs.object.Types; +import info.frostfs.sdk.dto.object.ObjectFrostFS; +import info.frostfs.sdk.dto.object.ObjectId; public class ObjectFrostFSMapper { diff --git a/models/src/main/java/info/FrostFS/sdk/mappers/object/ObjectHeaderMapper.java b/models/src/main/java/info/frostfs/sdk/mappers/object/ObjectHeaderMapper.java similarity index 80% rename from models/src/main/java/info/FrostFS/sdk/mappers/object/ObjectHeaderMapper.java rename to models/src/main/java/info/frostfs/sdk/mappers/object/ObjectHeaderMapper.java index d47dc55..6b8bc91 100644 --- a/models/src/main/java/info/FrostFS/sdk/mappers/object/ObjectHeaderMapper.java +++ b/models/src/main/java/info/frostfs/sdk/mappers/object/ObjectHeaderMapper.java @@ -1,12 +1,12 @@ -package info.FrostFS.sdk.mappers.object; +package info.frostfs.sdk.mappers.object; -import frostFS.object.Types; -import info.FrostFS.sdk.dto.container.ContainerId; -import info.FrostFS.sdk.dto.object.ObjectAttribute; -import info.FrostFS.sdk.dto.object.ObjectHeader; -import info.FrostFS.sdk.enums.ObjectType; -import info.FrostFS.sdk.mappers.VersionMapper; -import info.FrostFS.sdk.mappers.container.ContainerIdMapper; +import frostfs.object.Types; +import info.frostfs.sdk.dto.container.ContainerId; +import info.frostfs.sdk.dto.object.ObjectAttribute; +import info.frostfs.sdk.dto.object.ObjectHeader; +import info.frostfs.sdk.enums.ObjectType; +import info.frostfs.sdk.mappers.VersionMapper; +import info.frostfs.sdk.mappers.container.ContainerIdMapper; import java.util.stream.Collectors; diff --git a/models/src/main/java/info/FrostFS/sdk/mappers/object/ObjectIdMapper.java b/models/src/main/java/info/frostfs/sdk/mappers/object/ObjectIdMapper.java similarity index 78% rename from models/src/main/java/info/FrostFS/sdk/mappers/object/ObjectIdMapper.java rename to models/src/main/java/info/frostfs/sdk/mappers/object/ObjectIdMapper.java index 437b4bb..62ca7c5 100644 --- a/models/src/main/java/info/FrostFS/sdk/mappers/object/ObjectIdMapper.java +++ b/models/src/main/java/info/frostfs/sdk/mappers/object/ObjectIdMapper.java @@ -1,8 +1,8 @@ -package info.FrostFS.sdk.mappers.object; +package info.frostfs.sdk.mappers.object; import com.google.protobuf.ByteString; -import frostFS.refs.Types; -import info.FrostFS.sdk.dto.object.ObjectId; +import frostfs.refs.Types; +import info.frostfs.sdk.dto.object.ObjectId; public class ObjectIdMapper { diff --git a/pom.xml b/pom.xml index 8423cfb..561413c 100644 --- a/pom.xml +++ b/pom.xml @@ -4,8 +4,8 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - info.FrostFS.sdk - FrostFS-sdk-java + info.frostfs.sdk + frostfs-sdk-java 0.1.0 pom diff --git a/protos/pom.xml b/protos/pom.xml index cee5fb0..d2e06dc 100644 --- a/protos/pom.xml +++ b/protos/pom.xml @@ -4,8 +4,8 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - info.FrostFS.sdk - FrostFS-sdk-java + info.frostfs.sdk + frostfs-sdk-java 0.1.0 diff --git a/protos/src/main/proto/accounting/service.proto b/protos/src/main/proto/accounting/service.proto index c225c58..414d71d 100644 --- a/protos/src/main/proto/accounting/service.proto +++ b/protos/src/main/proto/accounting/service.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package neo.fs.v2.accounting; option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/accounting/grpc;accounting"; -option java_package = "frostFS.accounting"; +option java_package = "frostfs.accounting"; import "accounting/types.proto"; import "refs/types.proto"; diff --git a/protos/src/main/proto/accounting/types.proto b/protos/src/main/proto/accounting/types.proto index 57229d9..61952f5 100644 --- a/protos/src/main/proto/accounting/types.proto +++ b/protos/src/main/proto/accounting/types.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package neo.fs.v2.accounting; option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/accounting/grpc;accounting"; -option java_package = "frostFS.accounting"; +option java_package = "frostfs.accounting"; // Standard floating point data type can't be used in NeoFS due to inexactness // of the result when doing lots of small number operations. To solve the lost diff --git a/protos/src/main/proto/acl/types.proto b/protos/src/main/proto/acl/types.proto index 86a9311..b59ac7d 100644 --- a/protos/src/main/proto/acl/types.proto +++ b/protos/src/main/proto/acl/types.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package neo.fs.v2.acl; option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/acl/grpc;acl"; -option java_package = "frostFS.acl"; +option java_package = "frostfs.acl"; import "refs/types.proto"; diff --git a/protos/src/main/proto/apemanager/service.proto b/protos/src/main/proto/apemanager/service.proto index da0da48..d4eeca2 100644 --- a/protos/src/main/proto/apemanager/service.proto +++ b/protos/src/main/proto/apemanager/service.proto @@ -6,7 +6,7 @@ import "apemanager/types.proto"; import "session/types.proto"; option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/apemanager/grpc;apemanager"; -option java_package = "frostFS.apemanager"; +option java_package = "frostfs.apemanager"; // `APEManagerService` provides API to manage rule chains within sidechain's // `Policy` smart contract. diff --git a/protos/src/main/proto/apemanager/types.proto b/protos/src/main/proto/apemanager/types.proto index 644a8b5..7ca80ae 100644 --- a/protos/src/main/proto/apemanager/types.proto +++ b/protos/src/main/proto/apemanager/types.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package frostfs.v2.apemanager; option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/apemanager/grpc;apemanager"; -option java_package = "frostFS.apemanager"; +option java_package = "frostfs.apemanager"; // TargetType is a type target to which a rule chain is defined. enum TargetType { diff --git a/protos/src/main/proto/container/service.proto b/protos/src/main/proto/container/service.proto index ce7634a..6a85979 100644 --- a/protos/src/main/proto/container/service.proto +++ b/protos/src/main/proto/container/service.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package neo.fs.v2.container; option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/container/grpc;container"; -option java_package = "frostFS.container"; +option java_package = "frostfs.container"; import "acl/types.proto"; import "container/types.proto"; diff --git a/protos/src/main/proto/container/types.proto b/protos/src/main/proto/container/types.proto index 128a0bd..fc523ca 100644 --- a/protos/src/main/proto/container/types.proto +++ b/protos/src/main/proto/container/types.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package neo.fs.v2.container; option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/container/grpc;container"; -option java_package = "frostFS.container"; +option java_package = "frostfs.container"; import "netmap/types.proto"; import "refs/types.proto"; diff --git a/protos/src/main/proto/lock/types.proto b/protos/src/main/proto/lock/types.proto index 85766db..e4a8879 100644 --- a/protos/src/main/proto/lock/types.proto +++ b/protos/src/main/proto/lock/types.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package neo.fs.v2.lock; option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/lock/grpc;lock"; -option java_package = "frostFS.lock"; +option java_package = "frostfs.lock"; import "refs/types.proto"; diff --git a/protos/src/main/proto/netmap/service.proto b/protos/src/main/proto/netmap/service.proto index ac4f4cc..7e97e09 100644 --- a/protos/src/main/proto/netmap/service.proto +++ b/protos/src/main/proto/netmap/service.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package neo.fs.v2.netmap; option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap/grpc;netmap"; -option java_package = "frostFS.netmap"; +option java_package = "frostfs.netmap"; import "netmap/types.proto"; import "refs/types.proto"; diff --git a/protos/src/main/proto/netmap/types.proto b/protos/src/main/proto/netmap/types.proto index 1ff2e9e..3c311ba 100644 --- a/protos/src/main/proto/netmap/types.proto +++ b/protos/src/main/proto/netmap/types.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package neo.fs.v2.netmap; option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap/grpc;netmap"; -option java_package = "frostFS.netmap"; +option java_package = "frostfs.netmap"; // Operations on filters enum Operation { diff --git a/protos/src/main/proto/object/service.proto b/protos/src/main/proto/object/service.proto index 98ce6f0..7635f8a 100644 --- a/protos/src/main/proto/object/service.proto +++ b/protos/src/main/proto/object/service.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package neo.fs.v2.object; option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/object/grpc;object"; -option java_package = "frostFS.object"; +option java_package = "frostfs.object"; import "object/types.proto"; import "refs/types.proto"; diff --git a/protos/src/main/proto/object/types.proto b/protos/src/main/proto/object/types.proto index 3162270..623c2a3 100644 --- a/protos/src/main/proto/object/types.proto +++ b/protos/src/main/proto/object/types.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package neo.fs.v2.object; option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/object/grpc;object"; -option java_package = "frostFS.object"; +option java_package = "frostfs.object"; import "refs/types.proto"; import "session/types.proto"; diff --git a/protos/src/main/proto/refs/types.proto b/protos/src/main/proto/refs/types.proto index 30cb552..0ed5840 100644 --- a/protos/src/main/proto/refs/types.proto +++ b/protos/src/main/proto/refs/types.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package neo.fs.v2.refs; option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc;refs"; -option java_package = "frostFS.refs"; +option java_package = "frostfs.refs"; // Objects in NeoFS are addressed by their ContainerID and ObjectID. // diff --git a/protos/src/main/proto/session/service.proto b/protos/src/main/proto/session/service.proto index 84cbff4..b31bd8e 100644 --- a/protos/src/main/proto/session/service.proto +++ b/protos/src/main/proto/session/service.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package neo.fs.v2.session; option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session/grpc;session"; -option java_package = "frostFS.session"; +option java_package = "frostfs.session"; import "refs/types.proto"; import "session/types.proto"; diff --git a/protos/src/main/proto/session/types.proto b/protos/src/main/proto/session/types.proto index 2b33386..9f5259a 100644 --- a/protos/src/main/proto/session/types.proto +++ b/protos/src/main/proto/session/types.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package neo.fs.v2.session; option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session/grpc;session"; -option java_package = "frostFS.session"; +option java_package = "frostfs.session"; import "refs/types.proto"; import "acl/types.proto"; diff --git a/protos/src/main/proto/status/types.proto b/protos/src/main/proto/status/types.proto index b7be372..7d8f8e9 100644 --- a/protos/src/main/proto/status/types.proto +++ b/protos/src/main/proto/status/types.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package neo.fs.v2.status; option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/status/grpc;status"; -option java_package = "frostFS.status"; +option java_package = "frostfs.status"; // Declares the general format of the status returns of the NeoFS RPC protocol. // Status is present in all response messages. Each RPC of NeoFS protocol diff --git a/protos/src/main/proto/tombstone/types.proto b/protos/src/main/proto/tombstone/types.proto index 3e821c1..9128160 100644 --- a/protos/src/main/proto/tombstone/types.proto +++ b/protos/src/main/proto/tombstone/types.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package neo.fs.v2.tombstone; option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/tombstone/grpc;tombstone"; -option java_package = "frostFS.tombstone"; +option java_package = "frostfs.tombstone"; import "refs/types.proto";