public class SocialWorkspaceServiceImpl extends DefaultComponent implements SocialWorkspaceService
SocialWorkspaceService service.| Modifier and Type | Field and Description |
|---|---|
static String |
CONFIGURATION_EP |
static String |
NEWS_ITEMS_ROOT_ACL_NAME |
static String |
PUBLIC_SOCIAL_WORKSPACE_ACL_NAME |
static String |
SOCIAL_WORKSPACE_ACL_NAME |
static String |
SOCIAL_WORKSPACE_CONTAINER_EP |
| Constructor and Description |
|---|
SocialWorkspaceServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
acceptSubscriptionRequest(SocialWorkspace socialWorkspace,
SubscriptionRequest subscriptionRequest)
Accepts the
subscriptionRequest for 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> emails)
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)
Returns status of subscription request for the given
principal Values returned are: pending, accepted,
rejected or null if there is no subscription request |
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)
Returns
true if there is a pending Subscription Request for the given principal, false
otherwise. |
void |
makeSocialWorkspacePrivate(SocialWorkspace socialWorkspace)
Makes the given
socialWorkspace private. |
void |
makeSocialWorkspacePublic(SocialWorkspace socialWorkspace)
Makes the given
socialWorkspace public. |
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
rejectSubscriptionRequest(SocialWorkspace socialWorkspace,
SubscriptionRequest subscriptionRequest)
Rejects the
subscriptionRequest for 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.
|
activate, applicationStarted, deactivate, getAdapter, getApplicationStartedOrder, getLastModified, registerExtension, setLastModified, unregisterContribution, unregisterExtensionpublic static final String CONFIGURATION_EP
public static final String SOCIAL_WORKSPACE_CONTAINER_EP
public static final String SOCIAL_WORKSPACE_ACL_NAME
public static final String NEWS_ITEMS_ROOT_ACL_NAME
public static final String PUBLIC_SOCIAL_WORKSPACE_ACL_NAME
public List<SocialWorkspace> getDetachedPublicSocialWorkspaces(CoreSession session)
SocialWorkspaceServicegetDetachedPublicSocialWorkspaces in interface SocialWorkspaceServicepublic List<SocialWorkspace> searchDetachedPublicSocialWorkspaces(CoreSession session, String pattern)
SocialWorkspaceServicesearchDetachedPublicSocialWorkspaces in interface SocialWorkspaceServicepublic SocialWorkspace getDetachedSocialWorkspace(DocumentModel doc)
SocialWorkspaceServiceSocialWorkspace 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.
getDetachedSocialWorkspace in interface SocialWorkspaceServicepublic SocialWorkspace getDetachedSocialWorkspace(CoreSession session, DocumentRef docRef)
SocialWorkspaceServiceSocialWorkspace 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.
getDetachedSocialWorkspace in interface SocialWorkspaceServicepublic SocialWorkspace getSocialWorkspace(DocumentModel doc)
SocialWorkspaceServiceSocialWorkspace container of the given document if it is part of a Social Workspace,
null otherwise.getSocialWorkspace in interface SocialWorkspaceServicepublic int getValidationDays()
SocialWorkspaceServicegetValidationDays in interface SocialWorkspaceServicepublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution in class DefaultComponentpublic SocialWorkspaceContainerDescriptor getSocialWorkspaceContainerDescriptor()
SocialWorkspaceServicegetSocialWorkspaceContainerDescriptor in interface SocialWorkspaceServicepublic DocumentModel getSocialWorkspaceContainer(CoreSession session)
SocialWorkspaceServicegetSocialWorkspaceContainer in interface SocialWorkspaceServicepublic void handleSocialWorkspaceCreation(SocialWorkspace socialWorkspace, Principal principal)
SocialWorkspaceServicehandleSocialWorkspaceCreation in interface SocialWorkspaceServiceprincipal - the Principal initializing the Social Workspacepublic void handleSocialWorkspaceDeletion(SocialWorkspace socialWorkspace)
SocialWorkspaceServicehandleSocialWorkspaceDeletion in interface SocialWorkspaceServicepublic boolean addSocialWorkspaceAdministrator(SocialWorkspace socialWorkspace, Principal principal)
SocialWorkspaceServicesocialWorkspace administrators group.addSocialWorkspaceAdministrator in interface SocialWorkspaceServicetrue if the user was successfully added to the administrators group, false otherwise.public boolean addSocialWorkspaceMember(SocialWorkspace socialWorkspace, Principal principal)
SocialWorkspaceServicesocialWorkspace members group.addSocialWorkspaceMember in interface SocialWorkspaceServicetrue if the user was successfully added to the members group, false otherwise.public List<String> addSocialWorkspaceMembers(SocialWorkspace socialWorkspace, String groupName) throws ClientException
SocialWorkspaceServicesocialWorkspace members groupsaddSocialWorkspaceMembers in interface SocialWorkspaceServicegroupName - of an existing group.List<String> containing imported users, or an empty one.ClientException - when groupName doesn't existpublic List<String> addSocialWorkspaceMembers(SocialWorkspace socialWorkspace, List<String> emails) throws ClientException
SocialWorkspaceServicesocialWorkspace members group.addSocialWorkspaceMembers in interface SocialWorkspaceServiceList<String> contains the email of user added, or an empty one.ClientExceptionpublic void removeSocialWorkspaceAdministrator(SocialWorkspace socialWorkspace, Principal principal)
SocialWorkspaceServiceremoveSocialWorkspaceAdministrator in interface SocialWorkspaceServicepublic void removeSocialWorkspaceMember(SocialWorkspace socialWorkspace, Principal principal)
SocialWorkspaceServiceremoveSocialWorkspaceMember in interface SocialWorkspaceServicepublic void makeSocialWorkspacePublic(SocialWorkspace socialWorkspace)
SocialWorkspaceServicesocialWorkspace public.
Puts the correct rights so that non-members can view public documents and public dashboard.
makeSocialWorkspacePublic in interface SocialWorkspaceServicepublic void makeSocialWorkspacePrivate(SocialWorkspace socialWorkspace)
SocialWorkspaceServicesocialWorkspace private.
Restricts rights for non-members users.
makeSocialWorkspacePrivate in interface SocialWorkspaceServicepublic void handleSubscriptionRequest(SocialWorkspace socialWorkspace, Principal principal)
SocialWorkspaceServicesocialWorkspace for the given principal.handleSubscriptionRequest in interface SocialWorkspaceServicepublic boolean isSubscriptionRequestPending(SocialWorkspace socialWorkspace, Principal principal)
SocialWorkspaceServicetrue if there is a pending Subscription Request for the given principal, false
otherwise.isSubscriptionRequestPending in interface SocialWorkspaceServicepublic String getSubscriptionRequestStatus(SocialWorkspace socialWorkspace, Principal principal)
SocialWorkspaceServiceprincipal Values returned are: pending, accepted,
rejected or null if there is no subscription requestgetSubscriptionRequestStatus in interface SocialWorkspaceServicepublic void acceptSubscriptionRequest(SocialWorkspace socialWorkspace, SubscriptionRequest subscriptionRequest)
SocialWorkspaceServicesubscriptionRequest for socialWorkspace.acceptSubscriptionRequest in interface SocialWorkspaceServicepublic void rejectSubscriptionRequest(SocialWorkspace socialWorkspace, SubscriptionRequest subscriptionRequest)
SocialWorkspaceServicesubscriptionRequest for socialWorkspace.rejectSubscriptionRequest in interface SocialWorkspaceServicepublic List<String> searchUsers(SocialWorkspace socialWorkspace, RelationshipKind kind, String pattern)
SocialWorkspaceServicesearchUsers in interface SocialWorkspaceServicekind - can be null or empty to search through all users.pattern - can be blank.public List<String> searchMembers(SocialWorkspace socialWorkspace, String pattern)
SocialWorkspaceServicesearchMembers in interface SocialWorkspaceServicepattern - can be blank.public List<String> searchAdministrators(SocialWorkspace socialWorkspace, String pattern)
SocialWorkspaceServicesearchAdministrators in interface SocialWorkspaceServicepattern - can be blank.Copyright © 2015 Nuxeo SA. All rights reserved.