mirror of
https://github.com/google/nomulus.git
synced 2025-04-30 03:57:51 +02:00
Remove useless createdRepoId from logging
It is no longer needed since we don't do log-replay and it's annoying to support in the flat flows. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=135805088
This commit is contained in:
parent
2d518ed666
commit
c59227bb76
5 changed files with 0 additions and 35 deletions
|
@ -59,14 +59,6 @@ public abstract class Flow {
|
||||||
/** Execute the business logic for this flow. */
|
/** Execute the business logic for this flow. */
|
||||||
protected abstract EppOutput run() throws EppException;
|
protected abstract EppOutput run() throws EppException;
|
||||||
|
|
||||||
/**
|
|
||||||
* Subclasses that create a resource should override this to return the repoId of the new
|
|
||||||
* resource.
|
|
||||||
*/
|
|
||||||
protected String getCreatedRepoId() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected String getClientId() {
|
protected String getClientId() {
|
||||||
return sessionMetadata.getClientId();
|
return sessionMetadata.getClientId();
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,7 +128,6 @@ public class FlowRunner {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
logger.info("EPP_Mutation_Committed " + new JsonLogStatement(trid)
|
logger.info("EPP_Mutation_Committed " + new JsonLogStatement(trid)
|
||||||
.add("createdRepoId", flowResult.getResponse().getCreatedRepoId())
|
|
||||||
.add("executionTime", flowResult.getResponse().getExecutionTime().getMillis()));
|
.add("executionTime", flowResult.getResponse().getExecutionTime().getMillis()));
|
||||||
return flowResult;
|
return flowResult;
|
||||||
} catch (DryRunException e) {
|
} catch (DryRunException e) {
|
||||||
|
@ -165,9 +164,6 @@ public class FlowRunner {
|
||||||
*
|
*
|
||||||
* <p>An example output for an EPP_Mutation_Committed that doesn't create a new resource:
|
* <p>An example output for an EPP_Mutation_Committed that doesn't create a new resource:
|
||||||
* {"trid":"abc-123", "executionTime":123456789}
|
* {"trid":"abc-123", "executionTime":123456789}
|
||||||
*
|
|
||||||
* <p>An example output for an EPP_Mutation_Committed that creates a new resource:
|
|
||||||
* {"trid":"abc-123", "executionRepoId":123, "executionTime":123456789}
|
|
||||||
*/
|
*/
|
||||||
private static class JsonLogStatement {
|
private static class JsonLogStatement {
|
||||||
|
|
||||||
|
|
|
@ -88,11 +88,6 @@ public abstract class ResourceCreateFlow
|
||||||
modifyCreateRelatedResources();
|
modifyCreateRelatedResources();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected final String getCreatedRepoId() {
|
|
||||||
return newResource.getRepoId();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Modify any other resources that need to be informed of this create. */
|
/** Modify any other resources that need to be informed of this create. */
|
||||||
protected void modifyCreateRelatedResources() {}
|
protected void modifyCreateRelatedResources() {}
|
||||||
|
|
||||||
|
|
|
@ -99,14 +99,6 @@ public class EppResponse extends ImmutableObject implements ResponseOrGreeting {
|
||||||
@XmlTransient
|
@XmlTransient
|
||||||
DateTime executionTime;
|
DateTime executionTime;
|
||||||
|
|
||||||
/**
|
|
||||||
* The repository id of a new object if this is a create response, or null.
|
|
||||||
*
|
|
||||||
* <p>This is for logging purposes only and is not returned to the user.
|
|
||||||
*/
|
|
||||||
@XmlTransient
|
|
||||||
String createdRepoId;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Information about messages queued for retrieval. This may appear in response to any EPP message
|
* Information about messages queued for retrieval. This may appear in response to any EPP message
|
||||||
* (if messages are queued), but in practice this will only be set in response to a poll request.
|
* (if messages are queued), but in practice this will only be set in response to a poll request.
|
||||||
|
@ -170,10 +162,6 @@ public class EppResponse extends ImmutableObject implements ResponseOrGreeting {
|
||||||
return executionTime;
|
return executionTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCreatedRepoId() {
|
|
||||||
return createdRepoId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ImmutableList<? extends ResponseData> getResponseData() {
|
public ImmutableList<? extends ResponseData> getResponseData() {
|
||||||
return resData;
|
return resData;
|
||||||
}
|
}
|
||||||
|
@ -238,11 +226,6 @@ public class EppResponse extends ImmutableObject implements ResponseOrGreeting {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder setCreatedRepoId(String createdRepoId) {
|
|
||||||
getInstance().createdRepoId = createdRepoId;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Builder setResData(@Nullable ImmutableList<? extends ResponseData> resData) {
|
public Builder setResData(@Nullable ImmutableList<? extends ResponseData> resData) {
|
||||||
getInstance().resData = resData;
|
getInstance().resData = resData;
|
||||||
return this;
|
return this;
|
||||||
|
|
|
@ -69,7 +69,6 @@ public class FlowRunnerTest extends ShardableTestCase {
|
||||||
|
|
||||||
final EppOutput eppOutput = mock(EppOutput.class);
|
final EppOutput eppOutput = mock(EppOutput.class);
|
||||||
EppResponse eppResponse = mock(EppResponse.class);
|
EppResponse eppResponse = mock(EppResponse.class);
|
||||||
when(eppResponse.getCreatedRepoId()).thenReturn("foo");
|
|
||||||
when(eppResponse.getExecutionTime()).thenReturn(new DateTime(1337));
|
when(eppResponse.getExecutionTime()).thenReturn(new DateTime(1337));
|
||||||
when(eppOutput.getResponse()).thenReturn(eppResponse);
|
when(eppOutput.getResponse()).thenReturn(eppResponse);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue