opencmsdays 2013 - using opencms 9 folders as a network drive

Post on 18-Nov-2014

1.222 Views

Category:

Technology

4 Downloads

Preview:

Click to see full reader

DESCRIPTION

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.

TRANSCRIPT

Georg Westenberger, Alkacon Software

Workshop Track

Using OpenCms 9 folders

as a network drive

09.10.2013

● Basics of network shares

● Setting up OpenCms for network share access

● Using OpenCms network shares for module

development

2

Overview

● 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

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

● Live Demo

5

Live Demo

Demo

Demo Demo

Demo

デモ

● 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

● 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)

<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

● 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

● Live Demo

10

Live Demo

Demo

Demo Demo

Demo

デモ

● Connect to \\hostname\SHARENAME (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

● 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

● 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

● Live Demo

14

Live Demo

Demo

Demo Demo

Demo

デモ

● Any Questions?

15

Any Questions?

Fragen? Questions ?

Questiones?

¿Preguntas? 質問

Georg Westenberger

Alkacon Software GmbH

http://www.alkacon.com

http://www.opencms.org

Thank you very much for your

attention! 16

top related