-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(mcp-mutator): new mcp mutator plugin
* wip
- Loading branch information
1 parent
d77d565
commit c0eaa52
Showing
13 changed files
with
481 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
.../metadata-io-api/src/main/java/com/linkedin/metadata/entity/ebean/batch/ProposedItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package com.linkedin.metadata.entity.ebean.batch; | ||
|
||
import com.linkedin.common.AuditStamp; | ||
import com.linkedin.common.urn.Urn; | ||
import com.linkedin.data.template.RecordTemplate; | ||
import com.linkedin.events.metadata.ChangeType; | ||
import com.linkedin.metadata.aspect.batch.MCPItem; | ||
import com.linkedin.metadata.models.AspectSpec; | ||
import com.linkedin.metadata.models.EntitySpec; | ||
import com.linkedin.mxe.MetadataChangeProposal; | ||
import com.linkedin.mxe.SystemMetadata; | ||
import javax.annotation.Nonnull; | ||
import javax.annotation.Nullable; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.extern.slf4j.Slf4j; | ||
|
||
/** Represents an unvalidated wrapped MCP */ | ||
@Slf4j | ||
@Getter | ||
@Builder(toBuilder = true) | ||
public class ProposedItem implements MCPItem { | ||
@Nonnull private final MetadataChangeProposal metadataChangeProposal; | ||
@Nonnull private final AuditStamp auditStamp; | ||
// derived | ||
@Nonnull private EntitySpec entitySpec; | ||
@Nullable private AspectSpec aspectSpec; | ||
|
||
@Nonnull | ||
@Override | ||
public String getAspectName() { | ||
if (metadataChangeProposal.getAspectName() != null) { | ||
return metadataChangeProposal.getAspectName(); | ||
} else { | ||
return MCPItem.super.getAspectName(); | ||
} | ||
} | ||
|
||
@Nullable | ||
@Override | ||
public RecordTemplate getRecordTemplate() { | ||
return null; | ||
} | ||
|
||
@Nonnull | ||
@Override | ||
public Urn getUrn() { | ||
return metadataChangeProposal.getEntityUrn(); | ||
} | ||
|
||
@Nullable | ||
@Override | ||
public SystemMetadata getSystemMetadata() { | ||
return metadataChangeProposal.getSystemMetadata(); | ||
} | ||
|
||
@Nonnull | ||
@Override | ||
public ChangeType getChangeType() { | ||
return metadataChangeProposal.getChangeType(); | ||
} | ||
} |
Oops, something went wrong.