Adding group ownership (#4219)

This commit is contained in:
John Joyce 2022-02-22 19:40:17 -08:00 committed by GitHub
parent aa3363bcc2
commit dd8e1f16cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -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)));
}
}

View File

@ -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
"""