public class SocialWorkspaceAdapter extends BaseAdapter implements SocialWorkspace
SocialWorkspace
.Modifier and Type | Field and Description |
---|---|
static String |
MEMBER_NOTIFICATION_DISABLED |
Constructor and Description |
---|
SocialWorkspaceAdapter(DocumentModel doc) |
Modifier and Type | Method and Description |
---|---|
void |
acceptSubscriptionRequest(SubscriptionRequest subscriptionRequest)
Accepts this
subscriptionRequest . |
boolean |
addAdministrator(Principal principal)
Adds a user to this Social Workspace administrators group.
|
boolean |
addMember(Principal principal)
Adds a user to this Social Workspace members group.
|
List<String> |
getAdministrators()
Gets all administrators of this social workspace.
|
String |
getAdministratorsGroupLabel()
Returns this Social Workspace administrators group label.
|
String |
getAdministratorsGroupName()
Returns this Social Workspace administrators group name.
|
String |
getDashboardSpacesRootPath()
Returns the path of the Dashboard spaces root of this Social Workspace.
|
DocumentModel |
getDocument()
Returns the underlying .
|
String |
getId()
Returns the id of this Social Workspace.
|
List<String> |
getMembers()
Gets all members of this social workspace.
|
String |
getMembersGroupLabel()
Returns this Social Workspace members group label.
|
String |
getMembersGroupName()
Returns this Social Workspace members group name.
|
String |
getNewsItemsRootPath()
Returns the path of the News Items root of this Social Workspace.
|
String |
getPath()
Returns the full path of this Social Workspace.
|
String |
getPrivateDashboardSpacePath()
Returns the path of the private Dashboard Space of this Social Workspace.
|
String |
getPrivateSectionPath()
Returns the path of the private Section of this Social Workspace.
|
String |
getPublicDashboardSpacePath()
Returns the path of the public Dashboard Space of this Social Workspace.
|
String |
getPublicSectionPath()
Returns the path of the public Section of this Social Workspace.
|
String |
getSubscriptionRequestStatus(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 |
String |
getTitle()
Returns the title of this Social Workspace.
|
List<String> |
getUsers()
Gets all members and administrators of this social workspace
|
void |
handleSubscriptionRequest(Principal principal)
Handles a Subscription Request for the given
principal . |
boolean |
isAdministrator(NuxeoPrincipal principal)
Returns true if the given
principal is administrator of this
Social Workspace, false otherwise. |
boolean |
isAdministratorOrMember(NuxeoPrincipal principal)
Returns true if the given
principal is administrator or member of
this Social Workspace, false otherwise. |
boolean |
isMember(NuxeoPrincipal principal)
Returns true if the given
principal is member of this Social
Workspace, false otherwise. |
boolean |
isMembersNotificationEnabled()
Returns
true if the social workspace won't send a notification to
its members when modifications occurred. |
boolean |
isPrivate()
Returns
true if this Social Workspace is private, false
otherwise. |
boolean |
isPublic()
Returns
true if this Social Workspace is public, false
otherwise. |
boolean |
isSubscriptionRequestPending(Principal principal)
Returns
true if there is a pending Subscription Request for the
given principal , false otherwise. |
void |
makePrivate()
Make this Social Workspace private.
|
void |
makePublic()
Make this Social Workspace public.
|
boolean |
mustApproveSubscription()
Returns
true if the subscriptions to this Social Workspace need
an administrator approval, false otherwise. |
void |
rejectSubscriptionRequest(SubscriptionRequest subscriptionRequest)
Rejects this
subscriptionRequest . |
void |
removeAdministrator(Principal principal)
Removes a user from this Social Workspace administrators group.
|
void |
removeMember(Principal principal)
Removes a user from this Social Workspace members group.
|
List<String> |
searchAdministrators(String pattern)
Search through administrators of this social workspace that match with
the passed pattern.
|
List<String> |
searchMembers(String pattern)
Search through members of this social workspace that match with the
passed pattern.
|
List<String> |
searchUsers(String pattern)
Search through members and administrators of this social workspace that
match with the passed pattern.
|
void |
setDocument(DocumentModel doc)
Sets the underlying .
|
boolean |
shouldRequestSubscription(Principal principal)
Returns if the principal should be invited
|
public static final String MEMBER_NOTIFICATION_DISABLED
public SocialWorkspaceAdapter(DocumentModel doc)
public String getId()
SocialWorkspace
getId
in interface SocialWorkspace
public String getTitle()
SocialWorkspace
getTitle
in interface SocialWorkspace
public String getPath()
SocialWorkspace
getPath
in interface SocialWorkspace
public boolean isPublic()
SocialWorkspace
true
if this Social Workspace is public, false
otherwise.isPublic
in interface SocialWorkspace
public boolean isPrivate()
SocialWorkspace
true
if this Social Workspace is private, false
otherwise.isPrivate
in interface SocialWorkspace
public void makePublic()
SocialWorkspace
makePublic
in interface SocialWorkspace
public void makePrivate()
SocialWorkspace
makePrivate
in interface SocialWorkspace
public boolean mustApproveSubscription()
SocialWorkspace
true
if the subscriptions to this Social Workspace need
an administrator approval, false
otherwise.mustApproveSubscription
in interface SocialWorkspace
public boolean isMembersNotificationEnabled()
SocialWorkspace
true
if the social workspace won't send a notification to
its members when modifications occurred.isMembersNotificationEnabled
in interface SocialWorkspace
public boolean addAdministrator(Principal principal)
SocialWorkspace
addAdministrator
in interface SocialWorkspace
public boolean addMember(Principal principal)
SocialWorkspace
addMember
in interface SocialWorkspace
true
if the user was successfully added to the members
group, false
otherwise.public void removeAdministrator(Principal principal)
SocialWorkspace
removeAdministrator
in interface SocialWorkspace
public void removeMember(Principal principal)
SocialWorkspace
removeMember
in interface SocialWorkspace
public boolean isAdministrator(NuxeoPrincipal principal)
SocialWorkspace
principal
is administrator of this
Social Workspace, false
otherwise.isAdministrator
in interface SocialWorkspace
public boolean isMember(NuxeoPrincipal principal)
SocialWorkspace
principal
is member of this Social
Workspace, false
otherwise.isMember
in interface SocialWorkspace
public boolean isAdministratorOrMember(NuxeoPrincipal principal)
SocialWorkspace
principal
is administrator or member of
this Social Workspace, false
otherwise.isAdministratorOrMember
in interface SocialWorkspace
public List<String> searchMembers(String pattern)
SocialWorkspace
searchMembers
in interface SocialWorkspace
public List<String> searchAdministrators(String pattern)
SocialWorkspace
searchAdministrators
in interface SocialWorkspace
public List<String> searchUsers(String pattern)
SocialWorkspace
searchUsers
in interface SocialWorkspace
public List<String> getMembers()
SocialWorkspace
getMembers
in interface SocialWorkspace
public List<String> getAdministrators()
SocialWorkspace
getAdministrators
in interface SocialWorkspace
public List<String> getUsers()
SocialWorkspace
getUsers
in interface SocialWorkspace
public String getAdministratorsGroupName()
SocialWorkspace
getAdministratorsGroupName
in interface SocialWorkspace
public String getAdministratorsGroupLabel()
SocialWorkspace
getAdministratorsGroupLabel
in interface SocialWorkspace
public String getMembersGroupName()
SocialWorkspace
getMembersGroupName
in interface SocialWorkspace
public String getMembersGroupLabel()
SocialWorkspace
getMembersGroupLabel
in interface SocialWorkspace
public String getPublicSectionPath()
SocialWorkspace
getPublicSectionPath
in interface SocialWorkspace
public String getPrivateSectionPath()
SocialWorkspace
getPrivateSectionPath
in interface SocialWorkspace
public String getNewsItemsRootPath()
SocialWorkspace
getNewsItemsRootPath
in interface SocialWorkspace
public String getDashboardSpacesRootPath()
SocialWorkspace
getDashboardSpacesRootPath
in interface SocialWorkspace
public String getPublicDashboardSpacePath()
SocialWorkspace
getPublicDashboardSpacePath
in interface SocialWorkspace
public String getPrivateDashboardSpacePath()
SocialWorkspace
getPrivateDashboardSpacePath
in interface SocialWorkspace
public void handleSubscriptionRequest(Principal principal)
SocialWorkspace
principal
.handleSubscriptionRequest
in interface SocialWorkspace
public boolean shouldRequestSubscription(Principal principal)
SocialWorkspace
shouldRequestSubscription
in interface SocialWorkspace
public boolean isSubscriptionRequestPending(Principal principal)
SocialWorkspace
true
if there is a pending Subscription Request for the
given principal
, false
otherwise.isSubscriptionRequestPending
in interface SocialWorkspace
public String getSubscriptionRequestStatus(Principal principal)
SocialWorkspace
principal
Values returned are: pending, accepted, rejected or null if there is no
subscription requestgetSubscriptionRequestStatus
in interface SocialWorkspace
public void acceptSubscriptionRequest(SubscriptionRequest subscriptionRequest)
SocialWorkspace
subscriptionRequest
.acceptSubscriptionRequest
in interface SocialWorkspace
public void rejectSubscriptionRequest(SubscriptionRequest subscriptionRequest)
SocialWorkspace
subscriptionRequest
.rejectSubscriptionRequest
in interface SocialWorkspace
public DocumentModel getDocument()
SocialWorkspace
getDocument
in interface SocialWorkspace
public void setDocument(DocumentModel doc)
SocialWorkspace
Must be the same document (same id), otherwise throw a RuntimeException.
setDocument
in interface SocialWorkspace
Copyright © 2013 Nuxeo SA. All Rights Reserved.