Interface CommunityManagementInterface
-
- All Known Implementing Classes:
CommunityManagement
public interface CommunityManagementInterface
The CommunityManagementInterface provides methods for managing communities, their membership and content. Communities allow groups of subject-matter experts to work together and share content and ideas.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clearCommunityRole(java.lang.String userId, java.lang.String externalSourceGUID, java.lang.String externalSourceName, java.lang.String communityGUID, java.lang.String personRoleGUID)
Remove a membership relationship between a community and a person role.java.lang.String
createCommunity(java.lang.String userId, java.lang.String externalSourceGUID, java.lang.String externalSourceName, CommunityProperties communityProperties)
Create a new metadata element to represent the community.java.lang.String
createCommunityFromTemplate(java.lang.String userId, java.lang.String externalSourceGUID, java.lang.String externalSourceName, java.lang.String templateGUID, TemplateProperties templateProperties)
Create a new metadata element to represent a community using an existing metadata element as a template.java.util.List<CommunityElement>
findCommunities(java.lang.String userId, java.lang.String searchString, int startFrom, int pageSize)
Retrieve the list of metadata elements that contain the search string.java.util.List<CommunityElement>
getCommunities(java.lang.String userId, int startFrom, int pageSize)
Retrieve the list of communities.java.util.List<CommunityElement>
getCommunitiesByName(java.lang.String userId, java.lang.String name, int startFrom, int pageSize)
Retrieve the list of metadata elements with a matching qualified or display name.CommunityElement
getCommunityByGUID(java.lang.String userId, java.lang.String communityGUID)
Retrieve the community metadata element with the supplied unique identifier.java.util.List<PersonRoleElement>
getRolesForCommunity(java.lang.String userId, java.lang.String communityGUID, int startFrom, int pageSize)
Return information about the person roles linked to a community.void
removeCommunity(java.lang.String userId, java.lang.String externalSourceGUID, java.lang.String externalSourceName, java.lang.String communityGUID)
Remove the metadata element representing a community.void
setupCommunityRole(java.lang.String userId, java.lang.String externalSourceGUID, java.lang.String externalSourceName, java.lang.String communityGUID, CommunityMembershipProperties membershipProperties, java.lang.String personRoleGUID)
Create a membership relationship between a community and a person role to show that anyone appointed to the role is a member of the community.void
updateCommunity(java.lang.String userId, java.lang.String externalSourceGUID, java.lang.String externalSourceName, java.lang.String communityGUID, boolean isMergeUpdate, CommunityProperties communityProperties)
Update the metadata element representing a community.
-
-
-
Method Detail
-
createCommunity
java.lang.String createCommunity(java.lang.String userId, java.lang.String externalSourceGUID, java.lang.String externalSourceName, CommunityProperties communityProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a new metadata element to represent the community.- Parameters:
userId
- calling userexternalSourceGUID
- unique identifier of software capability representing the callerexternalSourceName
- unique name of software capability representing the callercommunityProperties
- properties to store- Returns:
- unique identifier of the new metadata element
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
createCommunityFromTemplate
java.lang.String createCommunityFromTemplate(java.lang.String userId, java.lang.String externalSourceGUID, java.lang.String externalSourceName, java.lang.String templateGUID, TemplateProperties templateProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a new metadata element to represent a community using an existing metadata element as a template. The template defines additional classifications and relationships that should be added to the new community.- Parameters:
userId
- calling userexternalSourceGUID
- unique identifier of software capability representing the callerexternalSourceName
- unique name of software capability representing the callertemplateGUID
- unique identifier of the metadata element to copytemplateProperties
- properties that override the template- Returns:
- unique identifier of the new metadata element
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
updateCommunity
void updateCommunity(java.lang.String userId, java.lang.String externalSourceGUID, java.lang.String externalSourceName, java.lang.String communityGUID, boolean isMergeUpdate, CommunityProperties communityProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Update the metadata element representing a community.- Parameters:
userId
- calling userexternalSourceGUID
- unique identifier of software capability representing the callerexternalSourceName
- unique name of software capability representing the callercommunityGUID
- unique identifier of the metadata element to updateisMergeUpdate
- should the new properties be merged with existing properties (true) or completely replace them (false)?communityProperties
- new properties for this element- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
setupCommunityRole
void setupCommunityRole(java.lang.String userId, java.lang.String externalSourceGUID, java.lang.String externalSourceName, java.lang.String communityGUID, CommunityMembershipProperties membershipProperties, java.lang.String personRoleGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a membership relationship between a community and a person role to show that anyone appointed to the role is a member of the community.- Parameters:
userId
- calling userexternalSourceGUID
- unique identifier of software capability representing the callerexternalSourceName
- unique name of software capability representing the callercommunityGUID
- unique identifier of the communitymembershipProperties
- describes the permissions that the role has in the communitypersonRoleGUID
- unique identifier of the role- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
clearCommunityRole
void clearCommunityRole(java.lang.String userId, java.lang.String externalSourceGUID, java.lang.String externalSourceName, java.lang.String communityGUID, java.lang.String personRoleGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Remove a membership relationship between a community and a person role.- Parameters:
userId
- calling userexternalSourceGUID
- unique identifier of software capability representing the callerexternalSourceName
- unique name of software capability representing the callercommunityGUID
- unique identifier of the communitypersonRoleGUID
- unique identifier of the role- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
removeCommunity
void removeCommunity(java.lang.String userId, java.lang.String externalSourceGUID, java.lang.String externalSourceName, java.lang.String communityGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Remove the metadata element representing a community. This will delete all anchored elements such as comments.- Parameters:
userId
- calling userexternalSourceGUID
- unique identifier of software capability representing the callerexternalSourceName
- unique name of software capability representing the callercommunityGUID
- unique identifier of the metadata element to remove- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
findCommunities
java.util.List<CommunityElement> findCommunities(java.lang.String userId, java.lang.String searchString, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the list of metadata elements that contain the search string. The search string is treated as a regular expression.- Parameters:
userId
- calling usersearchString
- string to find in the propertiesstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getCommunitiesByName
java.util.List<CommunityElement> getCommunitiesByName(java.lang.String userId, java.lang.String name, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the list of metadata elements with a matching qualified or display name. There are no wildcards supported on this request.- Parameters:
userId
- calling username
- name to search forstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getCommunities
java.util.List<CommunityElement> getCommunities(java.lang.String userId, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the list of communities.- Parameters:
userId
- calling userstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getRolesForCommunity
java.util.List<PersonRoleElement> getRolesForCommunity(java.lang.String userId, java.lang.String communityGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Return information about the person roles linked to a community.- Parameters:
userId
- calling usercommunityGUID
- unique identifier for the communitystartFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.- Returns:
- list of matching actor profiles (hopefully only one)
- Throws:
InvalidParameterException
- name or userId is nullPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getCommunityByGUID
CommunityElement getCommunityByGUID(java.lang.String userId, java.lang.String communityGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the community metadata element with the supplied unique identifier.- Parameters:
userId
- calling usercommunityGUID
- unique identifier of the requested metadata element- Returns:
- matching metadata element
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
-