Interface CommunityApi
public interface CommunityApi
Contains the Community related functionalities.
-
Method Summary
Modifier and TypeMethodDescriptionaddCommunities(List<AddCommunityRequest> addCommunityRequests) Adds multiple communities in one go.addCommunity(AddCommunityRequest addCommunityRequest) Adds a new community or subcommunity.changeCommunities(List<ChangeCommunityRequest> changeCommunityRequests) Changes multiple communities.changeCommunity(ChangeCommunityRequest changeCommunityRequest) Changes the community with the information that is present in the request.changeToRootCommunity(UUID communityId) Turns the community indicated by the givencommunityIdin a root community, meaning it has no longer a parent.booleanReturns true if a community with givencommunityIdexists and user has view permissions, false otherwise.findCommunities(FindCommunitiesRequest findCommunitiesRequest) Returns communities matching given search criteria.getCommunity(UUID communityId) Returns the community identified by givencommunityId.makeRootCommunity(UUID communityId) Deprecated.This method will be removed in the future.voidremoveCommunities(List<UUID> communityIds) Deprecated.This method will be removed in the future.removeCommunitiesInJob(List<UUID> communityIds, boolean sendNotification) Removes communities identified by the givencommunityIdsasynchronously.voidremoveCommunity(UUID communityId) Deprecated.This method will be removed in the future.removeCommunityInJob(UUID communityId) Removes a community identified by the givencommunityIdasynchronously.
-
Method Details
-
addCommunity
Adds a new community or subcommunity.- Parameters:
addCommunityRequest- the properties of the community to be added- Returns:
- the newly added community
-
addCommunities
@SecurityAuditMethod(resultFormatter=com.collibra.audit.formatter.CollectionFormatter.class) List<Community> addCommunities(List<AddCommunityRequest> addCommunityRequests) Adds multiple communities in one go.- Parameters:
addCommunityRequests- a list of AddCommunity requests- Returns:
- a list of the newly created communities
-
changeCommunity
Changes the community with the information that is present in the request.- Parameters:
changeCommunityRequest- changes that to be performed on the community- Returns:
- the changed community
-
changeCommunities
@SecurityAuditMethod(resultFormatter=com.collibra.audit.formatter.CollectionFormatter.class) List<Community> changeCommunities(List<ChangeCommunityRequest> changeCommunityRequests) Changes multiple communities.- Parameters:
changeCommunityRequests- the properties of the communities to be changed- Returns:
- the changed communities
-
makeRootCommunity
Deprecated.This method will be removed in the future. Please, usechangeToRootCommunity(UUID).Turns the community indicated by the givencommunityIdin a root community, meaning it has no longer a parent.- Parameters:
communityId- the identifier of the community- Returns:
- the adapted community.
-
changeToRootCommunity
Turns the community indicated by the givencommunityIdin a root community, meaning it has no longer a parent.- Parameters:
communityId- the identifier of the community- Returns:
- the adapted community.
-
getCommunity
Returns the community identified by givencommunityId.- Parameters:
communityId- the identifier of the community.- Returns:
- the found community
-
findCommunities
@SecurityAuditMethod(resultFormatter=com.collibra.dgc.core.api.internal.security.audit.formatter.PagedResponseFormatter.class) CursorPagedResponse<Community> findCommunities(FindCommunitiesRequest findCommunitiesRequest) Returns communities matching given search criteria.- Parameters:
findCommunitiesRequest- the search criteria for communities- Returns:
- the found communities
-
exists
Returns true if a community with givencommunityIdexists and user has view permissions, false otherwise.- Parameters:
communityId- the identifier of the community- Returns:
- true if a community with given
communityIdexists,falseotherwise
-
removeCommunity
Deprecated.This method will be removed in the future. Please, useremoveCommunityInJob(UUID).Removes a community identified by givencommunityId.- Parameters:
communityId- the identifier of the community to remove
-
removeCommunities
Deprecated.This method will be removed in the future. Please, useremoveCommunitiesInJob(List, boolean).Removes multiple communities.- Parameters:
communityIds- the identifiers of the communities to remove
-
removeCommunityInJob
Removes a community identified by the givencommunityIdasynchronously.- Parameters:
communityId- the identifier of the community to remove- Returns:
- the job that is removing the community async
-
removeCommunitiesInJob
Removes communities identified by the givencommunityIdsasynchronously.- Parameters:
communityIds- the identifiers of communities to removesendNotification- a boolean value indicating whether a notification should be sent or not- Returns:
- the Job removing the communities
-