Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: add toString to all java entity. #43

Merged
merged 3 commits into from
Dec 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ For a Maven project, add the following to your `pom.xml` file:
<dependency>
<groupId>group.rxcloud</groupId>
<artifactId>cloud-runtimes-api</artifactId>
<version>1.0.9.RELEASE</version>
<version>1.0.10.RELEASE</version>
</dependency>
...
</dependencies>
Expand All @@ -62,6 +62,6 @@ For a Gradle project, add the following to your `build.gradle` file:
dependencies {
...
// https://mvnrepository.com/artifact/group.rxcloud/cloud-runtimes-api
implementation group: 'group.rxcloud', name: 'cloud-runtimes-api', version: '1.0.9.RELEASE'
implementation group: 'group.rxcloud', name: 'cloud-runtimes-api', version: '1.0.10.RELEASE'
}
```
6 changes: 1 addition & 5 deletions cloud-runtimes-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,13 @@
<parent>
<groupId>group.rxcloud</groupId>
<artifactId>cloud-runtimes</artifactId>
<version>1.0.9.RELEASE</version>
<version>1.0.10.RELEASE</version>
</parent>

<artifactId>cloud-runtimes-api</artifactId>
<packaging>jar</packaging>
<name>${project.artifactId}</name>

<properties>
<reactor-core.version>3.3.22.RELEASE</reactor-core.version>
</properties>

<dependencies>
<!-- https://mvnrepository.com/artifact/io.projectreactor/reactor-core -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*/
package group.rxcloud.cloudruntimes;

import group.rxcloud.cloudruntimes.domain.enhanced.FileRuntimes;
import group.rxcloud.cloudruntimes.domain.enhanced.LockRuntimes;
import group.rxcloud.cloudruntimes.domain.enhanced.TelemetryRuntimes;
import group.rxcloud.cloudruntimes.domain.enhanced.DatabaseRuntimes;
import group.rxcloud.cloudruntimes.domain.enhanced.ScheduleRuntimes;
Expand All @@ -26,5 +28,7 @@
public interface EnhancedCloudRuntimes extends
TelemetryRuntimes,
DatabaseRuntimes,
ScheduleRuntimes {
ScheduleRuntimes,
FileRuntimes,
LockRuntimes {
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@
import group.rxcloud.cloudruntimes.domain.enhanced.database.QueryResponse;
import group.rxcloud.cloudruntimes.domain.enhanced.database.UpdateRequest;
import group.rxcloud.cloudruntimes.domain.enhanced.database.UpdateResponse;
import group.rxcloud.cloudruntimes.domain.enhanced.file.DelFileRequest;
import group.rxcloud.cloudruntimes.domain.enhanced.file.GetFileRequest;
import group.rxcloud.cloudruntimes.domain.enhanced.file.GetFileResponse;
import group.rxcloud.cloudruntimes.domain.enhanced.file.ListFileRequest;
import group.rxcloud.cloudruntimes.domain.enhanced.file.ListFileResp;
import group.rxcloud.cloudruntimes.domain.enhanced.file.PutFileRequest;
import group.rxcloud.cloudruntimes.domain.enhanced.lock.TryLockRequest;
import group.rxcloud.cloudruntimes.domain.enhanced.lock.TryLockResponse;
import group.rxcloud.cloudruntimes.domain.enhanced.lock.UnlockRequest;
import group.rxcloud.cloudruntimes.domain.enhanced.lock.UnlockResponse;
import group.rxcloud.cloudruntimes.utils.TypeRef;
import io.opentelemetry.api.metrics.Meter;
import io.opentelemetry.api.trace.Tracer;
Expand Down Expand Up @@ -452,7 +462,37 @@ default Mono<Meter> buildMeter(String meterName, String version, String schemaUr
}

@Override
default Mono<Object> invokeSchedule(String appId, String jobName, Map<String, String> metadata) {
default Flux<Object> invokeSchedule(String appId, String jobName, Map<String, String> metadata) {
throw new UnsupportedOperationException("CloudRuntimes Operate Unsupported.");
}

@Override
default Mono<GetFileResponse> getFile(GetFileRequest request) {
throw new UnsupportedOperationException("CloudRuntimes Operate Unsupported.");
}

@Override
default Mono<Void> putFile(Flux<PutFileRequest> requests) {
throw new UnsupportedOperationException("CloudRuntimes Operate Unsupported.");
}

@Override
default Mono<ListFileResp> listFile(ListFileRequest request) {
throw new UnsupportedOperationException("CloudRuntimes Operate Unsupported.");
}

@Override
default Mono<Void> delFile(DelFileRequest request) {
throw new UnsupportedOperationException("CloudRuntimes Operate Unsupported.");
}

@Override
default Mono<TryLockResponse> tryLock(TryLockRequest request) {
throw new UnsupportedOperationException("CloudRuntimes Operate Unsupported.");
}

@Override
default Mono<UnlockResponse> unlock(UnlockRequest request) {
throw new UnsupportedOperationException("CloudRuntimes Operate Unsupported.");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,14 @@ public InvokeBindingRequest setMetadata(Map<String, String> metadata) {
this.metadata = metadata == null ? null : Collections.unmodifiableMap(metadata);
return this;
}

@Override
public String toString() {
return "InvokeBindingRequest{" +
"name='" + name + '\'' +
", operation='" + operation + '\'' +
", data=" + data +
", metadata=" + metadata +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,16 @@ public Map<String, String> getMetadata() {
public void setMetadata(Map<String, String> metadata) {
this.metadata = metadata;
}

@Override
public String toString() {
return "ConfigurationItem{" +
"key='" + key + '\'' +
", content=" + content +
", group='" + group + '\'' +
", label='" + label + '\'' +
", tags=" + tags +
", metadata=" + metadata +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,16 @@ public Map<String, String> getMetadata() {
public void setMetadata(Map<String, String> metadata) {
this.metadata = metadata;
}

@Override
public String toString() {
return "ConfigurationRequestItem{" +
"storeName='" + storeName + '\'' +
", appId='" + appId + '\'' +
", group='" + group + '\'' +
", label='" + label + '\'' +
", keys=" + keys +
", metadata=" + metadata +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public ConfigurationRequestItemBuilder withMetadata(Map<String, String> metadata
*/
public ConfigurationRequestItem build() {
ConfigurationRequestItem request = new ConfigurationRequestItem();
request.setStoreName(this.appId);
request.setStoreName(this.storeName);
request.setAppId(this.appId);
request.setGroup(this.group);
request.setLabel(this.label);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,14 @@ public Map<String, String> getMetadata() {
public void setMetadata(Map<String, String> metadata) {
this.metadata = metadata;
}

@Override
public String toString() {
return "SaveConfigurationRequest{" +
"storeName='" + storeName + '\'' +
", appId='" + appId + '\'' +
", items=" + items +
", metadata=" + metadata +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,13 @@ public List<ConfigurationItem<T>> getItems() {
public void setItems(List<ConfigurationItem<T>> items) {
this.items = items;
}

@Override
public String toString() {
return "SubConfigurationResp{" +
"storeName='" + storeName + '\'' +
", appId='" + appId + '\'' +
", items=" + items +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class InvokeMethodRequest {

private Object body;

private group.rxcloud.cloudruntimes.domain.core.invocation.HttpExtension httpExtension;
private HttpExtension httpExtension;

private String contentType;

Expand Down Expand Up @@ -57,7 +57,7 @@ public InvokeMethodRequest setBody(Object body) {
return this;
}

public group.rxcloud.cloudruntimes.domain.core.invocation.HttpExtension getHttpExtension() {
public HttpExtension getHttpExtension() {
return httpExtension;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,15 @@ public PublishEventRequest setMetadata(Map<String, String> metadata) {
this.metadata = metadata == null ? null : Collections.unmodifiableMap(metadata);
return this;
}

@Override
public String toString() {
return "PublishEventRequest{" +
"pubsubName='" + pubsubName + '\'' +
", topic='" + topic + '\'' +
", data=" + data +
", contentType='" + contentType + '\'' +
", metadata=" + metadata +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,12 @@ public GetBulkSecretRequest setMetadata(Map<String, String> metadata) {
this.metadata = metadata == null ? null : Collections.unmodifiableMap(metadata);
return this;
}

@Override
public String toString() {
return "GetBulkSecretRequest{" +
"storeName='" + storeName + '\'' +
", metadata=" + metadata +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,13 @@ public GetSecretRequest setMetadata(Map<String, String> metadata) {
this.metadata = metadata == null ? null : Collections.unmodifiableMap(metadata);
return this;
}

@Override
public String toString() {
return "GetSecretRequest{" +
"storeName='" + storeName + '\'' +
", key='" + key + '\'' +
", metadata=" + metadata +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,15 @@ public DeleteStateRequest setMetadata(Map<String, String> metadata) {
this.metadata = metadata == null ? null : Collections.unmodifiableMap(metadata);
return this;
}

@Override
public String toString() {
return "DeleteStateRequest{" +
"stateStoreName='" + stateStoreName + '\'' +
", key='" + key + '\'' +
", metadata=" + metadata +
", etag='" + etag + '\'' +
", stateOptions=" + stateOptions +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class ExecuteStateTransactionRequest {
/**
* Transactional operations list.
*/
private List<group.rxcloud.cloudruntimes.domain.core.state.TransactionalStateOperation<?>> operations;
private List<TransactionalStateOperation<?>> operations;

/**
* Metadata used for transactional operations.
Expand Down Expand Up @@ -62,4 +62,13 @@ public ExecuteStateTransactionRequest setMetadata(Map<String, String> metadata)
public Map<String, String> getMetadata() {
return metadata;
}

@Override
public String toString() {
return "ExecuteStateTransactionRequest{" +
"stateStoreName='" + stateStoreName + '\'' +
", operations=" + operations +
", metadata=" + metadata +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,14 @@ public GetBulkStateRequest setMetadata(Map<String, String> metadata) {
this.metadata = metadata == null ? null : Collections.unmodifiableMap(metadata);
return this;
}

@Override
public String toString() {
return "GetBulkStateRequest{" +
"storeName='" + storeName + '\'' +
", keys=" + keys +
", metadata=" + metadata +
", parallelism=" + parallelism +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class GetStateRequest {

private Map<String, String> metadata;

private group.rxcloud.cloudruntimes.domain.core.state.StateOptions stateOptions;
private StateOptions stateOptions;

public GetStateRequest(String storeName, String key) {
this.storeName = storeName;
Expand All @@ -45,7 +45,7 @@ public String getKey() {
return key;
}

public group.rxcloud.cloudruntimes.domain.core.state.StateOptions getStateOptions() {
public StateOptions getStateOptions() {
return stateOptions;
}

Expand All @@ -62,4 +62,14 @@ public GetStateRequest setMetadata(Map<String, String> metadata) {
this.metadata = metadata == null ? null : Collections.unmodifiableMap(metadata);
return this;
}

@Override
public String toString() {
return "GetStateRequest{" +
"storeName='" + storeName + '\'' +
", key='" + key + '\'' +
", metadata=" + metadata +
", stateOptions=" + stateOptions +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class SaveStateRequest {

private final String storeName;

private List<group.rxcloud.cloudruntimes.domain.core.state.State<?>> states;
private List<State<?>> states;

public SaveStateRequest(String storeName) {
this.storeName = storeName;
Expand All @@ -37,11 +37,11 @@ public String getStoreName() {
return storeName;
}

public List<group.rxcloud.cloudruntimes.domain.core.state.State<?>> getStates() {
public List<State<?>> getStates() {
return states;
}

public SaveStateRequest setStates(List<group.rxcloud.cloudruntimes.domain.core.state.State<?>> states) {
public SaveStateRequest setStates(List<State<?>> states) {
this.states = states == null ? null : Collections.unmodifiableList(states);
return this;
}
Expand All @@ -50,4 +50,12 @@ public SaveStateRequest setStates(State<?>... states) {
this.states = Collections.unmodifiableList(Arrays.asList(states));
return this;
}

@Override
public String toString() {
return "SaveStateRequest{" +
"storeName='" + storeName + '\'' +
", states=" + states +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,12 @@ public static Concurrency fromValue(String value) {
return Concurrency.valueOf(value);
}
}

@Override
public String toString() {
return "StateOptions{" +
"consistency=" + consistency +
", concurrency=" + concurrency +
'}';
}
}