org.olat.collaboration
Class CollaborationTools

java.lang.Object
  extended by org.olat.collaboration.CollaborationTools
All Implemented Interfaces:
java.io.Serializable

public class CollaborationTools
extends java.lang.Object
implements java.io.Serializable

Description:
The singleton used for retrieving a collaboration tools suite associated with the supplied OLATResourceable.

Description:
The CollaborationTools represents a suite of collaborative tools addeable to any OLATResourceable. To get an instance of this suite, one has to use the collaboration tools factory.

This collaboration tools class exposes the possibility to retrieve the appropriate controllers for the desired tools. And also provides the means to manage the configuration of the provided tools. Moreover it is already shipped with a controller which can be used to display an administrative view for enabling/disabling such tools for the supplied OLATResourceable.

All the future collaborative tools will be found here.

Author:
Felix Jost, guido
See Also:
CollaborationToolsFactory, Serialized Form

Nested Class Summary
 class CollaborationTools.CollabSecCallback
           
 
Field Summary
static int CALENDAR_ACCESS_ALL
          Owners and members have write access to the calendar.
static int CALENDAR_ACCESS_OWNERS
          Only owners have write access to the calendar.
static java.lang.String KEY_FORUM
           
static java.lang.String PROP_CAT_BG_COLLABTOOLS
          PROP_CAT_BG_COLLABTOOLS identifies properties concerning Collaboration Tools
static java.lang.String TOOL_CALENDAR
          constant used to identify the calendar for a BuddyGroup
static java.lang.String TOOL_CHAT
          constant used to identify the chat for a BuddyGroup
static java.lang.String TOOL_CONTACT
          constant used to identify the contact form for a BuddyGroup
static java.lang.String TOOL_FOLDER
          constant used to identify the folder for a BuddyGroup
static java.lang.String TOOL_FORUM
          constant used to identify the forum for a BuddyGroup
static java.lang.String TOOL_NEWS
          constant used to identify the contact form for a BuddyGroup
static java.lang.String TOOL_WIKI
          constant used to identify the wiki for a BuddyGroup
static java.lang.String[] TOOLS
          public for group test only, do not use otherwise convenience, helps iterating possible tools, i.e.
 
Method Summary
 void archive(java.lang.String archivFilePath)
          It is assumed that this is only called by an administrator (e.g.
 CalendarController createCalendarController(UserRequest ureq, WindowControl wControl, BusinessGroup businessGroup, boolean isAdmin)
          Creates a calendar controller
 Controller createChatController(UserRequest ureq, WindowControl wControl, java.lang.String chatName)
           
 CollaborationToolsSettingsController createCollaborationToolsSettingsController(UserRequest ureq, WindowControl wControl)
          create the Collaboration Tools Suite.
 ContactFormController createContactFormController(UserRequest ureq, WindowControl wControl, ContactMessage cmsg)
           
 FolderRunController createFolderController(UserRequest ureq, WindowControl wControl, SubscriptionContext subsContext)
          Creates a folder run controller with all rights enabled for everybody
 Controller createForumController(UserRequest ureq, WindowControl wControl, boolean isAdmin, boolean isGuestOnly, SubscriptionContext subsContext)
          TODO: rename to getForumController and save instance?
 Controller createNewsController(UserRequest ureq, WindowControl wControl)
           
 Controller createWikiController(UserRequest ureq, WindowControl wControl)
          return an controller for the wiki tool
 void deleteTools(BusinessGroup businessGroupTodelete)
          delete all CollaborationTools stuff from the database, which is related to the calling OLATResourceable.
 java.lang.String getFolderRelPath()
           
 boolean isToolEnabled(java.lang.String enabledTool)
          reads from the internal cache.
 java.lang.Long lookupCalendarAccess()
           
 java.lang.String lookupNews()
           
 void removeAndDisposeChatController()
          remove an already created chatController
 void saveCalendarAccess(java.lang.Long calendarAccess)
           
 void saveNews(java.lang.String news)
           
 void setToolEnabled(java.lang.String toolToChange, boolean enable)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_FORUM

public static final java.lang.String KEY_FORUM
See Also:
Constant Field Values

PROP_CAT_BG_COLLABTOOLS

public static final java.lang.String PROP_CAT_BG_COLLABTOOLS
PROP_CAT_BG_COLLABTOOLS identifies properties concerning Collaboration Tools

See Also:
Constant Field Values

TOOL_CALENDAR

public static final java.lang.String TOOL_CALENDAR
constant used to identify the calendar for a BuddyGroup

See Also:
Constant Field Values

TOOL_FORUM

public static final java.lang.String TOOL_FORUM
constant used to identify the forum for a BuddyGroup

See Also:
Constant Field Values

TOOL_FOLDER

public static final java.lang.String TOOL_FOLDER
constant used to identify the folder for a BuddyGroup

See Also:
Constant Field Values

TOOL_CHAT

public static final java.lang.String TOOL_CHAT
constant used to identify the chat for a BuddyGroup

See Also:
Constant Field Values

TOOL_CONTACT

public static final java.lang.String TOOL_CONTACT
constant used to identify the contact form for a BuddyGroup

See Also:
Constant Field Values

TOOL_NEWS

public static final java.lang.String TOOL_NEWS
constant used to identify the contact form for a BuddyGroup

See Also:
Constant Field Values

TOOL_WIKI

public static final java.lang.String TOOL_WIKI
constant used to identify the wiki for a BuddyGroup

See Also:
Constant Field Values

TOOLS

public static final java.lang.String[] TOOLS
public for group test only, do not use otherwise convenience, helps iterating possible tools, i.e. in jUnit testCase, also for building up a tools choice


CALENDAR_ACCESS_OWNERS

public static final int CALENDAR_ACCESS_OWNERS
Only owners have write access to the calendar.

See Also:
Constant Field Values

CALENDAR_ACCESS_ALL

public static final int CALENDAR_ACCESS_ALL
Owners and members have write access to the calendar.

See Also:
Constant Field Values
Method Detail

createNewsController

public Controller createNewsController(UserRequest ureq,
                                       WindowControl wControl)
Parameters:
ureq -
Returns:
a news controller

createForumController

public Controller createForumController(UserRequest ureq,
                                        WindowControl wControl,
                                        boolean isAdmin,
                                        boolean isGuestOnly,
                                        SubscriptionContext subsContext)
TODO: rename to getForumController and save instance?

Parameters:
ureq -
wControl -
isAdmin -
subsContext - the subscriptioncontext if subscriptions to this forum should be possible
Returns:
a forum controller

getFolderRelPath

public java.lang.String getFolderRelPath()

createFolderController

public FolderRunController createFolderController(UserRequest ureq,
                                                  WindowControl wControl,
                                                  SubscriptionContext subsContext)
Creates a folder run controller with all rights enabled for everybody

Parameters:
ureq -
wControl -
subsContext -
Returns:
Copnfigured FolderRunController

createCalendarController

public CalendarController createCalendarController(UserRequest ureq,
                                                   WindowControl wControl,
                                                   BusinessGroup businessGroup,
                                                   boolean isAdmin)
Creates a calendar controller

Parameters:
ureq -
wControl -
resourceableId -
Returns:
Configured WeeklyCalendarController

createContactFormController

public ContactFormController createContactFormController(UserRequest ureq,
                                                         WindowControl wControl,
                                                         ContactMessage cmsg)
Parameters:
ureq -
wControl -
Returns:
a contact form controller

createChatController

public Controller createChatController(UserRequest ureq,
                                       WindowControl wControl,
                                       java.lang.String chatName)
Parameters:
ureq -
wControl -
chatName -
Returns:
Controller

removeAndDisposeChatController

public void removeAndDisposeChatController()
remove an already created chatController


createWikiController

public Controller createWikiController(UserRequest ureq,
                                       WindowControl wControl)
return an controller for the wiki tool

Parameters:
ureq -
wControl -
Returns:

setToolEnabled

public void setToolEnabled(java.lang.String toolToChange,
                           boolean enable)
Parameters:
toolToChange -
enable -

isToolEnabled

public boolean isToolEnabled(java.lang.String enabledTool)
reads from the internal cache. Precondition cache must be filled at CollaborationTools creation time.

Parameters:
enabledTool -
Returns:
boolean

deleteTools

public void deleteTools(BusinessGroup businessGroupTodelete)
delete all CollaborationTools stuff from the database, which is related to the calling OLATResourceable.


createCollaborationToolsSettingsController

public CollaborationToolsSettingsController createCollaborationToolsSettingsController(UserRequest ureq,
                                                                                       WindowControl wControl)
create the Collaboration Tools Suite. This Controller handles the enabling/disabling of Collab Tools.

Parameters:
ureq -
Returns:
a collaboration tools settings controller

lookupNews

public java.lang.String lookupNews()
Returns:
the news; if there is no news yet: return null;

saveNews

public void saveNews(java.lang.String news)
Parameters:
news -

lookupCalendarAccess

public java.lang.Long lookupCalendarAccess()

saveCalendarAccess

public void saveCalendarAccess(java.lang.Long calendarAccess)

archive

public void archive(java.lang.String archivFilePath)
It is assumed that this is only called by an administrator (e.g. at deleteGroup)

Parameters:
archivFilePath -