chore: Add baseId to app (#34223)
This commit is contained in:
parent
4326ae81fc
commit
78df6b5e52
|
|
@ -17,6 +17,7 @@ import lombok.ToString;
|
||||||
import lombok.experimental.FieldNameConstants;
|
import lombok.experimental.FieldNameConstants;
|
||||||
import org.springframework.data.annotation.Transient;
|
import org.springframework.data.annotation.Transient;
|
||||||
import org.springframework.data.mongodb.core.mapping.Document;
|
import org.springframework.data.mongodb.core.mapping.Document;
|
||||||
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
|
|
@ -272,6 +273,15 @@ public class Application extends BaseDomain implements Artifact {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getBaseId() {
|
||||||
|
if (this.getGitArtifactMetadata() != null
|
||||||
|
&& StringUtils.hasLength(this.getGitArtifactMetadata().getDefaultArtifactId())) {
|
||||||
|
return this.getGitArtifactMetadata().getDefaultArtifactId();
|
||||||
|
}
|
||||||
|
return Artifact.super.getBaseId();
|
||||||
|
}
|
||||||
|
|
||||||
@JsonView(Views.Internal.class)
|
@JsonView(Views.Internal.class)
|
||||||
@Override
|
@Override
|
||||||
public GitArtifactMetadata getGitArtifactMetadata() {
|
public GitArtifactMetadata getGitArtifactMetadata() {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
package com.appsmith.server.domains.ce;
|
package com.appsmith.server.domains.ce;
|
||||||
|
|
||||||
import com.appsmith.external.models.Policy;
|
import com.appsmith.external.models.Policy;
|
||||||
|
import com.appsmith.external.views.Views;
|
||||||
import com.appsmith.server.constants.ArtifactType;
|
import com.appsmith.server.constants.ArtifactType;
|
||||||
import com.appsmith.server.domains.GitArtifactMetadata;
|
import com.appsmith.server.domains.GitArtifactMetadata;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonView;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
|
@ -10,6 +12,11 @@ public interface ArtifactCE {
|
||||||
|
|
||||||
String getId();
|
String getId();
|
||||||
|
|
||||||
|
@JsonView(Views.Internal.class)
|
||||||
|
default String getBaseId() {
|
||||||
|
return getId();
|
||||||
|
}
|
||||||
|
|
||||||
String getName();
|
String getName();
|
||||||
|
|
||||||
String getWorkspaceId();
|
String getWorkspaceId();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user