public interface SocialWorkspaceService
Modifier and Type | Method and Description |
---|---|
void |
acceptSubscriptionRequest(SocialWorkspace socialWorkspace,
SubscriptionRequest subscriptionRequest)
Deprecated.
since 5.6 see SocialWorkspace
|
boolean |
addSocialWorkspaceAdministrator(SocialWorkspace socialWorkspace,
Principal principal)
Adds a user to the
socialWorkspace administrators group. |
boolean |
addSocialWorkspaceMember(SocialWorkspace socialWorkspace,
Principal principal)
Adds a user to the
socialWorkspace members group. |
List<String> |
addSocialWorkspaceMembers(SocialWorkspace socialWorkspace,
List<String> principals)
Add several users to the
socialWorkspace members group. |
List<String> |
addSocialWorkspaceMembers(SocialWorkspace socialWorkspace,
String groupName)
Add all group's users to the
socialWorkspace members groups |
List<SocialWorkspace> |
getDetachedPublicSocialWorkspaces(CoreSession session)
Return all public Social Workspaces.
|
SocialWorkspace |
getDetachedSocialWorkspace(CoreSession session,
DocumentRef docRef)
Returns the
SocialWorkspace container of the given document ref if it is in a Social Workspace even if
the user does not have right on it, null otherwise. |
SocialWorkspace |
getDetachedSocialWorkspace(DocumentModel doc)
Returns the
SocialWorkspace container of the given document if it is in a Social Workspace even if the
user does not have right on it, null otherwise. |
SocialWorkspace |
getSocialWorkspace(DocumentModel doc)
Returns the
SocialWorkspace container of the given document if it is part of a Social Workspace,
null otherwise. |
DocumentModel |
getSocialWorkspaceContainer(CoreSession session)
Returns Social Workspace Container and create it if needed.
|
SocialWorkspaceContainerDescriptor |
getSocialWorkspaceContainerDescriptor()
Returns the configured SocialWorkspaceContainerDescriptor that contains the path, title and description of the
container.
|
String |
getSubscriptionRequestStatus(SocialWorkspace socialWorkspace,
Principal principal)
Deprecated.
|
int |
getValidationDays()
Gets the number of days before a social workspace expires without validation.
|
void |
handleSocialWorkspaceCreation(SocialWorkspace socialWorkspace,
Principal principal)
Handles a Social Workspace creation:
create related groups
put specific ACLs
|
void |
handleSocialWorkspaceDeletion(SocialWorkspace socialWorkspace)
Handles a Social Workspace deletion:
remove related groups
|
void |
handleSubscriptionRequest(SocialWorkspace socialWorkspace,
Principal principal)
Handles a Subscription Request on
socialWorkspace for the given principal . |
boolean |
isSubscriptionRequestPending(SocialWorkspace socialWorkspace,
Principal principal)
Deprecated.
since 5.6 see SocialWorkspace
|
void |
makeSocialWorkspacePrivate(SocialWorkspace socialWorkspace)
Makes the given
socialWorkspace private. |
void |
makeSocialWorkspacePublic(SocialWorkspace socialWorkspace)
Makes the given
socialWorkspace public. |
void |
rejectSubscriptionRequest(SocialWorkspace socialWorkspace,
SubscriptionRequest subscriptionRequest)
Deprecated.
since 5.6 see SocialWorkspace
|
void |
removeSocialWorkspaceAdministrator(SocialWorkspace socialWorkspace,
Principal principal)
Removes a user from the @{code socialWorkspace} administrators group.
|
void |
removeSocialWorkspaceMember(SocialWorkspace socialWorkspace,
Principal principal)
Removes a user from the @{code socialWorkspace} members group.
|
List<String> |
searchAdministrators(SocialWorkspace socialWorkspace,
String pattern)
Returns all matching administrators from a Social Workspace, or an empty list.
|
List<SocialWorkspace> |
searchDetachedPublicSocialWorkspaces(CoreSession session,
String pattern)
Return matching public social workspace according the given pattern.
|
List<String> |
searchMembers(SocialWorkspace socialWorkspace,
String pattern)
Returns all matching members from a Social Workspace, or an empty list.
|
List<String> |
searchUsers(SocialWorkspace socialWorkspace,
RelationshipKind kind,
String pattern)
Returns all matching users from a Social Workspace, or an empty list.
|
void handleSocialWorkspaceCreation(SocialWorkspace socialWorkspace, Principal principal)
principal
- the Principal initializing the Social Workspacevoid handleSocialWorkspaceDeletion(SocialWorkspace socialWorkspace)
SocialWorkspace getDetachedSocialWorkspace(DocumentModel doc)
SocialWorkspace
container of the given document if it is in a Social Workspace even if the
user does not have right on it, null
otherwise.
The underlying DocumentModel
is detached.
SocialWorkspace getDetachedSocialWorkspace(CoreSession session, DocumentRef docRef)
SocialWorkspace
container of the given document ref if it is in a Social Workspace even if
the user does not have right on it, null
otherwise.
The underlying DocumentModel
is detached.
SocialWorkspace getSocialWorkspace(DocumentModel doc)
SocialWorkspace
container of the given document if it is part of a Social Workspace,
null
otherwise.boolean addSocialWorkspaceAdministrator(SocialWorkspace socialWorkspace, Principal principal)
socialWorkspace
administrators group.true
if the user was successfully added to the administrators group, false
otherwise.boolean addSocialWorkspaceMember(SocialWorkspace socialWorkspace, Principal principal)
socialWorkspace
members group.true
if the user was successfully added to the members group, false
otherwise.List<String> addSocialWorkspaceMembers(SocialWorkspace socialWorkspace, String groupName) throws ClientException
socialWorkspace
members groupsgroupName
- of an existing group.List<String>
containing imported users, or an empty one.ClientException
- when groupName doesn't existList<String> addSocialWorkspaceMembers(SocialWorkspace socialWorkspace, List<String> principals) throws ClientException
socialWorkspace
members group.principals
- List<String>
contains the email of user added, or an empty one.ClientException
void removeSocialWorkspaceAdministrator(SocialWorkspace socialWorkspace, Principal principal)
void removeSocialWorkspaceMember(SocialWorkspace socialWorkspace, Principal principal)
void makeSocialWorkspacePublic(SocialWorkspace socialWorkspace)
socialWorkspace
public.
Puts the correct rights so that non-members can view public documents and public dashboard.
void makeSocialWorkspacePrivate(SocialWorkspace socialWorkspace)
socialWorkspace
private.
Restricts rights for non-members users.
int getValidationDays()
void handleSubscriptionRequest(SocialWorkspace socialWorkspace, Principal principal)
socialWorkspace
for the given principal
.@Deprecated boolean isSubscriptionRequestPending(SocialWorkspace socialWorkspace, Principal principal)
true
if there is a pending Subscription Request for the given principal
, false
otherwise.@Deprecated String getSubscriptionRequestStatus(SocialWorkspace socialWorkspace, Principal principal)
principal
Values returned are: pending, accepted,
rejected or null if there is no subscription request@Deprecated void acceptSubscriptionRequest(SocialWorkspace socialWorkspace, SubscriptionRequest subscriptionRequest)
subscriptionRequest
for socialWorkspace
.@Deprecated void rejectSubscriptionRequest(SocialWorkspace socialWorkspace, SubscriptionRequest subscriptionRequest)
subscriptionRequest
for socialWorkspace
.List<SocialWorkspace> searchDetachedPublicSocialWorkspaces(CoreSession session, String pattern)
List<SocialWorkspace> getDetachedPublicSocialWorkspaces(CoreSession session)
List<String> searchUsers(SocialWorkspace socialWorkspace, RelationshipKind kind, String pattern)
kind
- can be null or empty to search through all users.pattern
- can be blank.List<String> searchMembers(SocialWorkspace socialWorkspace, String pattern)
pattern
- can be blank.List<String> searchAdministrators(SocialWorkspace socialWorkspace, String pattern)
pattern
- can be blank.DocumentModel getSocialWorkspaceContainer(CoreSession session)
session
- SocialWorkspaceContainerDescriptor getSocialWorkspaceContainerDescriptor()
Copyright © 2015 Nuxeo SA. All rights reserved.