OpenCmsDays 2013 - Using OpenCms 9 folders as a network drive

1,742 views

Published on

OpenCms 8.5 added the CMIS interface that allows standardized access to the contents located in the OpenCms repository. OpenCms 9 takes the concept of standardized access to the repository one step further by allowing OpenCms folders to be mounted as Windows (or Samba) shared network drives.

With OpenCms 9 shared folders, content managers can manage images and documents in the OpenCms repository simply on their local desktop. This is especially appealing if OpenCms is used in the Intranet.

In this workshop, Georg will show how to set up OpenCms folders so that they can be shared with Windows. He will also explain how to access and manage resources in an OpenCms module directly from an IDE such as Eclipse.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,742
On SlideShare
0
From Embeds
0
Number of Embeds
224
Actions
Shares
0
Downloads
42
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

OpenCmsDays 2013 - Using OpenCms 9 folders as a network drive

  1. 1. Georg Westenberger, Alkacon Software Workshop Track Using OpenCms 9 folders as a network drive 09.10.2013
  2. 2. ● Basics of network shares ● Setting up OpenCms for network share access ● Using OpenCms network shares for module development 2 Overview
  3. 3. ● Network shares (SMB) allows users to connect to remote file systems and use them as if they were a „normal“ file system on their computer ●  no special client programs necessary! ● Used natively by Windows ● Can also connect from other OSes (e.g. with fs-cifs on Linux) ● OpenCms 9 can expose (part of) its VFS as a network share 3 Network share basics
  4. 4. SMB CMIS Distinct protocol on port 445 Web service (over HTTP) Simple data model (like a „normal“ PC file system) Richer data model (resource types, properties, searches…) OS/driver support  Can use any program to access files Special clients must be used For template developers or other users who want to edit plain text or binary resources. For programmers wanting to access OpenCms file system functions as a web service 4 SMB vs. CMIS
  5. 5. ● Live Demo 5 Live Demo Demo Demo Demo Demo デモ
  6. 6. ● SMB: Not running over HTTP, but uses its own port (445) ● No other process or thread must be listening on port 445 ● Can‘t use multiple OpenCms instances with network shares on the same server ● Can‘t use e.g. Samba on the same server as OpenCms when using network shares ● You may need to change your network configuration (Firewalls, etc.) 6 Server setup
  7. 7. ● Depending on the server‘s OS, copy WEB- INF/config/jlanConfig.xml.{linux,windows} to jlanConfig.xml ● Windows 7: Disable „Server“ service and restart to free up port 445 ● Linux: Default configuration for Linux uses port 1445 (because special permissions are needed for ports below 1024) ● Forward port 445 to 1445 (e.g. using socat or iptables) 7 Server setup (2)
  8. 8. <repository name=“MYSHARE" class="org.opencms.jlan.CmsJlanRepository"> <params> <!– Make all modifications in the Offline project. --> <param name="project">Offline</param> <!– Mount the /system/modules folder --> <param name="root">/system/modules</param> <!– Do not add byte order marks --> <param name="addBOM">false</param> <param name="wrapper„> org.opencms.file.wrapper.CmsResourceWrapperReplaceDeleted </param> </params> </repository> 8 Configuring shares in opencms- importexport.xml
  9. 9. ● When the network drive is connected, you can use e.g. Eclipse to edit resources in OpenCms directly ● You don‘t need to use the OpenCms code editor ● Use „linked folders“ in Eclipse to reference network shares in your Eclipse project ● No need for switching sites after changing files when trying out if the changes work 9 Template development using Eclipse with a network share
  10. 10. ● Live Demo 10 Live Demo Demo Demo Demo Demo デモ
  11. 11. ● Connect to hostnameSHARENAME (Windows) or smb://hostname/SHARENAME ● Users can log in using their normal OpenCms user name / password ● OpenCms permissions apply ● Connecting to a share requires „View“ permissions on the configured root folder ● Users can‘t see resources for which they don‘t have „View“ permissions 11 Authentication and permissions
  12. 12. ● As a workplace replacement ● No functions like Undo, Publish, setting permissions ● To edit XML content ● Use the Acacia editor in OpenCms instead ● Over the internet ● Protocol requires low-latency network to work efficiently 12 When/how not to use OpenCms network shares
  13. 13. ● Network shares have no concept of file types or properties ● File types for new files are determined by extension ●  Copying is different from copying in the workplace; more like downloading and re-uploading ● No concept of properties, either ● Wrapper class: ● org.opencms.file.wrapper.CmsResourceWrapperPropertyFile ● Edit properties and resource files through special „virtual“ files 13 Properties and resource types
  14. 14. ● Live Demo 14 Live Demo Demo Demo Demo Demo デモ
  15. 15. ● Any Questions? 15 Any Questions? Fragen? Questions ? Questiones? ¿Preguntas?質問
  16. 16. Georg Westenberger Alkacon Software GmbH http://www.alkacon.com http://www.opencms.org Thank you very much for your attention! 16

×