|
Clearspace API (2.5.29) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SocialGroupManager
Create, retrieve, update and delete social groups.
| Method Summary | |
|---|---|
void |
addMember(SocialGroup socialGroup,
User memberToAdd,
com.jivesoftware.community.socialgroup.SocialGroupMember.Type memberType)
Adds a user to a social group |
SocialGroup |
create(String name,
SocialGroup.Type type,
String description,
User user,
ContentRetrieval.ContentType... types)
Creates a new Social Group |
SocialGroup |
create(String name,
String displayName,
SocialGroup.Type type,
String description,
User user,
ContentRetrieval.ContentType... types)
Creates a new Social Group |
void |
delete(SocialGroup socialGroup)
Deletes the passed social group |
void |
deleteSocialGroupAssociations(User user)
Deletes the given user's social group memberships, plus any social groups owned by the given user. |
void |
deleteSocialGroupImage(SocialGroup socialGroup)
Deletes the social groups image |
SocialGroup |
getSocialGroup(long socialGroupID)
Gets the social group with the given id |
SocialGroup |
getSocialGroup(String socialGroupDisplayName)
Gets the social group with the given display name |
int |
getSocialGroupCount()
Returns the total number of groups viewable by the currently authenticated user (as specified by the default group filter) |
int |
getSocialGroupCount(com.jivesoftware.community.socialgroup.SocialGroupResultFilter socialGroupResultFilter)
Returns the total number of groups that match the criteria of the given result filter |
InputStream |
getSocialGroupImage(SocialGroup socialGroup,
int size)
Returns the profile image for a user. |
long |
getSocialGroupImageID(SocialGroup socialGroup,
int size)
Returns the profile image for a user. |
com.jivesoftware.community.socialgroup.SocialGroupMember |
getSocialGroupMember(long membershipID)
Returns the group member with the matching membership id |
JiveIterator<com.jivesoftware.community.socialgroup.SocialGroupMember> |
getSocialGroupMembers(SocialGroup socialGroup)
Gets all users, excluding invited users, that are members of the given social group. |
JiveIterator<com.jivesoftware.community.socialgroup.SocialGroupMember> |
getSocialGroupMembers(com.jivesoftware.community.socialgroup.SocialGroupMemberResultFilter memberResultFilter)
Gets all users, excluding invited users, that are members of the given social group and match the given filter. |
JiveIterator<SocialGroup> |
getSocialGroups()
Returns all groups viewable by the currently authenticated user (as specified by the default group filter) |
JiveIterator<SocialGroup> |
getSocialGroups(com.jivesoftware.community.socialgroup.SocialGroupResultFilter socialGroupResultFilter)
Returns all groups viewable by the currently authenticated user (as specified by the default group filter) |
int |
getTotalMemberships(com.jivesoftware.community.socialgroup.SocialGroupMemberResultFilter memberResultFilter)
Returns the total number of users matching the given result filter. |
int |
getTotalUsersInGroup(SocialGroup socialGroup)
Returns the total number of owners and members in this social group |
boolean |
isBanned(SocialGroup socialGroup,
User member)
Returns true if the user has been banned from participating in the group (as defined by SocialGroupMember.Type) false otherwise. |
boolean |
isPendingApproval(SocialGroup socialGroup,
User member)
Returns true if the user is pending approval to have access to the group (as defined by SocialGroupMember.Type) false otherwise. |
boolean |
isSocialGroupMember(SocialGroup socialGroup,
User member)
Returns true if the user is a member (as defined by SocialGroupMember.Type)
of the social group false otherwise. |
boolean |
isSocialGroupOwner(SocialGroup socialGroup,
User owner)
Returns true if the user is an owner (as defined by SocialGroupMember.Type)
of the social group false otherwise. |
boolean |
isUniqueDisplayName(String displayName)
Returns true if the group display name is unique |
boolean |
isUniqueName(String name)
Returns true if the given group name is unique |
void |
registerMemberApprovalWorkflow(com.jivesoftware.community.socialgroup.SocialGroupMember member,
long workflowID)
Creates a new OSWorkflow workflow item to mirror the group member pending approval workflow by associating a group membership to a workflow id. |
void |
removeMember(SocialGroup socialGroup,
User memberToRemove)
Removes a member from a social group and deletes the membership details. |
void |
setSocialGroupImage(SocialGroup socialGroup,
String mimeType,
InputStream smallImage,
InputStream medImage,
InputStream largeImage)
Set a new social group image for the specified social group. |
void |
update(SocialGroup socialGroup)
Updates the passed social group |
void |
updateMember(SocialGroup socialGroup,
com.jivesoftware.community.socialgroup.SocialGroupMember member,
com.jivesoftware.community.socialgroup.SocialGroupMember.Type memberType)
Updates the membership of the user in the group to have the given membership type |
| Methods inherited from interface com.jivesoftware.community.JiveManager |
|---|
destroy |
| Method Detail |
|---|
SocialGroup create(String name,
SocialGroup.Type type,
String description,
User user,
ContentRetrieval.ContentType... types)
throws NameAlreadyExistsException,
UnauthorizedException
name - - the group name (will also be converted into a valid display name)type - - the type of memberships allowed in the groupdescription - - a short description of this groupuser - - the user creating the grouptypes - - content types allowed in this group
NameAlreadyExistsException - - if the name or display name is already in use
UnauthorizedException - - if the currently authenticated user isn't authorized to create a group
SocialGroup create(String name,
String displayName,
SocialGroup.Type type,
String description,
User user,
ContentRetrieval.ContentType... types)
throws NameAlreadyExistsException,
UnauthorizedException
name - - the group namedisplayName - - a display name to use for this grouptype - - the type of memberships allowed in the groupdescription - - a short description of this groupuser - - the user creating the grouptypes - - content types allowed in this group
NameAlreadyExistsException - - if the name or display name is already in use
UnauthorizedException - - if the currently authenticated user isn't authorized to create a group
SocialGroup getSocialGroup(long socialGroupID)
throws NotFoundException,
UnauthorizedException
socialGroupID - - the id of the group
NotFoundException - if no group is found with the specified id
UnauthorizedException - if the currently authenticated user isn't authorized to see that group
SocialGroup getSocialGroup(String socialGroupDisplayName)
throws NotFoundException,
UnauthorizedException
socialGroupDisplayName - - the display name of the group
NotFoundException - if no group is found with the specified display name
UnauthorizedException - if the currently authenticated user isn't authorized to see that groupint getSocialGroupCount()
int getSocialGroupCount(com.jivesoftware.community.socialgroup.SocialGroupResultFilter socialGroupResultFilter)
socialGroupResultFilter - - a filter on group attributes
JiveIterator<SocialGroup> getSocialGroups()
throws UnauthorizedException
UnauthorizedException - if the default filter includes a group the currently authenticated user isn't
authorized to access
JiveIterator<SocialGroup> getSocialGroups(com.jivesoftware.community.socialgroup.SocialGroupResultFilter socialGroupResultFilter)
throws UnauthorizedException
socialGroupResultFilter - - a filter on group attributes
UnauthorizedException - if the filter includes a group the currently authenticated user isn't authorized
to access
void update(SocialGroup socialGroup)
throws NameAlreadyExistsException,
UnauthorizedException
socialGroup - to be updated
NameAlreadyExistsException - if a new name or display name is set that is already in use
UnauthorizedException - if the currently authenticated user isn't authorized to update the group
void delete(SocialGroup socialGroup)
throws UnauthorizedException
socialGroup - to be deleted
UnauthorizedException - if the currently authenticated user isn't authorized to delete the group
void deleteSocialGroupAssociations(User user)
throws UnauthorizedException,
NotFoundException
user - the user with the social group memberships being deleted, and/or the owner of the social groups being
deleted.
UnauthorizedException - If authenticated user is not a system admin.
NotFoundException - if the user isn't found in the group
void addMember(SocialGroup socialGroup,
User memberToAdd,
com.jivesoftware.community.socialgroup.SocialGroupMember.Type memberType)
throws UnauthorizedException,
com.jivesoftware.util.AlreadyExistsException
socialGroup - the group to add the member tomemberToAdd - the user to add to the groupmemberType - the type to assign to the user's membership
UnauthorizedException - if the currently authenticated user isn't authorized to add users to the group
com.jivesoftware.util.AlreadyExistsException - if there is already a membership for the specified userJiveIterator<com.jivesoftware.community.socialgroup.SocialGroupMember> getSocialGroupMembers(SocialGroup socialGroup)
socialGroup - - the socialGroup to get members for
JiveIterator<com.jivesoftware.community.socialgroup.SocialGroupMember> getSocialGroupMembers(com.jivesoftware.community.socialgroup.SocialGroupMemberResultFilter memberResultFilter)
memberResultFilter - - the filter to specify member attributes to match
void removeMember(SocialGroup socialGroup,
User memberToRemove)
throws UnauthorizedException
socialGroup - the group to removed the member frommemberToRemove - the user to remove from the group
UnauthorizedException - if the currently authenticated user isn't authorized to remove users from the group
com.jivesoftware.community.socialgroup.SocialGroupMember getSocialGroupMember(long membershipID)
throws NotFoundException,
UnauthorizedException
membershipID - - the unique id of the membership details
NotFoundException - if there is no membership with the specified id
UnauthorizedException - if the currently authenticated user isn't authorized to see the membership information
void updateMember(SocialGroup socialGroup,
com.jivesoftware.community.socialgroup.SocialGroupMember member,
com.jivesoftware.community.socialgroup.SocialGroupMember.Type memberType)
throws UnauthorizedException
socialGroup - - the group to update membership formember - - the user with memberhsip in the groupmemberType - - the type of membership to set
UnauthorizedException - if the currently authenticated user isn't authorized to update the membership in the group
void registerMemberApprovalWorkflow(com.jivesoftware.community.socialgroup.SocialGroupMember member,
long workflowID)
throws NotFoundException
member - - the member to start the workflow forworkflowID - - the workflow to associate with the group member pending approval
NotFoundException - if the group the member is asking to join no longer exists
boolean isSocialGroupOwner(SocialGroup socialGroup,
User owner)
SocialGroupMember.Type)
of the social group false otherwise.
socialGroup - - the social group that has at least one ownerowner - - the user whose ownership role we want to determine
boolean isSocialGroupMember(SocialGroup socialGroup,
User member)
SocialGroupMember.Type)
of the social group false otherwise. A group owner is not considered a member of the group even though
they are in the group. If the user is an owner false will be returned.
socialGroup - - the social group that has memebersmember - - the user whose membership we want to determine
boolean isPendingApproval(SocialGroup socialGroup,
User member)
SocialGroupMember.Type) false otherwise.
A user is pending approval after they ask to join a private group.
socialGroup - - the social group that has memebersmember - - the user whose membership we want to determine
boolean isBanned(SocialGroup socialGroup,
User member)
SocialGroupMember.Type) false otherwise.
A banned member may have either been banned only from this group, or from the system as defined by the possible
member status settings SocialGroupMember.Status
socialGroup - - the social group that has memebersmember - - the user whose ban status we want to determine
int getTotalUsersInGroup(SocialGroup socialGroup)
throws UnauthorizedException
socialGroup - with members
UnauthorizedException - - If the group is secret and the currently authenticated
user is not supposed to know it exists, or if the group is private and this user isn't a member of the group
int getTotalMemberships(com.jivesoftware.community.socialgroup.SocialGroupMemberResultFilter memberResultFilter)
throws UnauthorizedException
memberResultFilter - - filter criteria
UnauthorizedException - - If a group is specified and is secret and the currently authenticated
user is not supposed to know it exists, or if the group is private and this user isn't a member of the group. Also
thrown if no group is specified and no user id is specified preventing groups from being filtered by the specified
users membership.
void setSocialGroupImage(SocialGroup socialGroup,
String mimeType,
InputStream smallImage,
InputStream medImage,
InputStream largeImage)
throws AttachmentException
socialGroup - The socialGroup to add an image for.mimeType - The mime type of the image.smallImage - The content for the small image.medImage - The content for the medium image.largeImage - The content for the large image.
AttachmentException - Thrown if the image cannot be added.
InputStream getSocialGroupImage(SocialGroup socialGroup,
int size)
socialGroup - The social group to get an image for.size - 0 for the small image, 1 for the medium image, and 2 for the large image
long getSocialGroupImageID(SocialGroup socialGroup,
int size)
socialGroup - The social group to get an image for.size - 0 for the small image, 1 for the medium image, and 2 for the large image
void deleteSocialGroupImage(SocialGroup socialGroup)
socialGroup - The social group to delete image for.boolean isUniqueName(String name)
name - to test
boolean isUniqueDisplayName(String displayName)
displayName - to test
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||