mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-02 03:39:03 +00:00
Adding group ownership (#4219)
This commit is contained in:
parent
aa3363bcc2
commit
dd8e1f16cd
@ -1,8 +1,10 @@
|
||||
package com.linkedin.datahub.graphql.types.corpgroup.mappers;
|
||||
|
||||
import com.linkedin.common.Ownership;
|
||||
import com.linkedin.data.DataMap;
|
||||
import com.linkedin.datahub.graphql.generated.CorpGroup;
|
||||
import com.linkedin.datahub.graphql.generated.EntityType;
|
||||
import com.linkedin.datahub.graphql.types.common.mappers.OwnershipMapper;
|
||||
import com.linkedin.datahub.graphql.types.common.mappers.util.MappingHelper;
|
||||
import com.linkedin.datahub.graphql.types.mappers.ModelMapper;
|
||||
import com.linkedin.entity.EntityResponse;
|
||||
@ -38,6 +40,7 @@ public class CorpGroupMapper implements ModelMapper<EntityResponse, CorpGroup> {
|
||||
mappingHelper.mapToResult(CORP_GROUP_KEY_ASPECT_NAME, this::mapCorpGroupKey);
|
||||
mappingHelper.mapToResult(CORP_GROUP_INFO_ASPECT_NAME, this::mapCorpGroupInfo);
|
||||
mappingHelper.mapToResult(CORP_GROUP_EDITABLE_INFO_ASPECT_NAME, this::mapCorpGroupEditableInfo);
|
||||
mappingHelper.mapToResult(OWNERSHIP_ASPECT_NAME, this::mapOwnership);
|
||||
return mappingHelper.getResult();
|
||||
}
|
||||
|
||||
@ -55,4 +58,8 @@ public class CorpGroupMapper implements ModelMapper<EntityResponse, CorpGroup> {
|
||||
private void mapCorpGroupEditableInfo(@Nonnull CorpGroup corpGroup, @Nonnull DataMap dataMap) {
|
||||
corpGroup.setEditableProperties(CorpGroupEditablePropertiesMapper.map(new CorpGroupEditableInfo(dataMap)));
|
||||
}
|
||||
|
||||
private void mapOwnership(@Nonnull CorpGroup corpGroup, @Nonnull DataMap dataMap) {
|
||||
corpGroup.setOwnership(OwnershipMapper.map(new Ownership(dataMap)));
|
||||
}
|
||||
}
|
||||
|
||||
@ -2402,6 +2402,11 @@ type CorpGroup implements Entity {
|
||||
"""
|
||||
name: String!
|
||||
|
||||
"""
|
||||
Ownership metadata of the Corp Group
|
||||
"""
|
||||
ownership: Ownership
|
||||
|
||||
"""
|
||||
Additional read only properties about the group
|
||||
"""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user