Interface CommunityApi
-
public interface CommunityApi
Contains the Community related functionalities.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description List<Community>
addCommunities(List<AddCommunityRequest> addCommunityRequests)
Adds multiple communities in one go.Community
addCommunity(AddCommunityRequest addCommunityRequest)
Adds a new community or subcommunity.List<Community>
changeCommunities(List<ChangeCommunityRequest> changeCommunityRequests)
Changes multiple communities.Community
changeCommunity(ChangeCommunityRequest changeCommunityRequest)
Changes the community with the information that is present in the request.Community
changeToRootCommunity(UUID communityId)
Turns the community indicated by the givencommunityId
in a root community, meaning it has no longer a parent.boolean
exists(UUID communityId)
Returns true if a community with givencommunityId
exists.CursorPagedResponse<Community>
findCommunities(FindCommunitiesRequest findCommunitiesRequest)
Returns communities matching given search criteria.Community
getCommunity(UUID communityId)
Returns the community identified by givencommunityId
.Community
makeRootCommunity(UUID communityId)
Deprecated.This method will be removed in the future.void
removeCommunities(List<UUID> communityIds)
Deprecated.This method will be removed in the future.Job
removeCommunitiesInJob(List<UUID> communityIds, boolean sendNotification)
Removes a communities identified by the givencommunityIds
asynchronously.void
removeCommunity(UUID communityId)
Deprecated.This method will be removed in the future.Job
removeCommunityInJob(UUID communityId)
Removes a community identified by the givencommunityId
asynchronously.
-
-
-
Method Detail
-
addCommunity
Community addCommunity(AddCommunityRequest addCommunityRequest)
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
Community changeCommunity(ChangeCommunityRequest changeCommunityRequest)
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 Community makeRootCommunity(UUID communityId)
Deprecated.This method will be removed in the future. Please, usechangeToRootCommunity(UUID)
.Turns the community indicated by the givencommunityId
in a root community, meaning it has no longer a parent.- Parameters:
communityId
- the identifier of the community- Returns:
- the adapted community.
-
changeToRootCommunity
Community changeToRootCommunity(UUID communityId)
Turns the community indicated by the givencommunityId
in a root community, meaning it has no longer a parent.- Parameters:
communityId
- the identifier of the community- Returns:
- the adapted community.
-
getCommunity
Community getCommunity(UUID communityId)
Returns the community identified by givencommunityId
.- Parameters:
communityId
- the identifier of the community.- Returns:
- the found community
-
findCommunities
@SecurityAuditMethod(resultFormatter=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
boolean exists(UUID communityId)
Returns true if a community with givencommunityId
exists.- Parameters:
communityId
- the identifier of the community- Returns:
- true if a community with given
communityId
exists,false
otherwise
-
removeCommunity
@Deprecated void removeCommunity(UUID communityId)
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 void removeCommunities(List<UUID> communityIds)
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
Job removeCommunityInJob(UUID communityId)
Removes a community identified by the givencommunityId
asynchronously.- Parameters:
communityId
- the identifier of the community to remove- Returns:
- the job that is removing the community async
-
removeCommunitiesInJob
Job removeCommunitiesInJob(List<UUID> communityIds, boolean sendNotification)
Removes a communities identified by the givencommunityIds
asynchronously.- Parameters:
communityIds
- the identifiers of communities to removesendNotification
- a boolean value indicating wether a notification should be send or not- Returns:
- the Job removing the communities
-
-