Return-Path: X-Original-To: apmail-incubator-ooo-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-ooo-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C787D7FD7 for ; Sun, 27 Nov 2011 22:37:35 +0000 (UTC) Received: (qmail 57190 invoked by uid 500); 27 Nov 2011 22:37:35 -0000 Delivered-To: apmail-incubator-ooo-commits-archive@incubator.apache.org Received: (qmail 57171 invoked by uid 500); 27 Nov 2011 22:37:35 -0000 Mailing-List: contact ooo-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ooo-dev@incubator.apache.org Delivered-To: mailing list ooo-commits@incubator.apache.org Received: (qmail 57164 invoked by uid 99); 27 Nov 2011 22:37:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 27 Nov 2011 22:37:35 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 27 Nov 2011 22:37:23 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 53E802388AA9; Sun, 27 Nov 2011 22:37:01 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1206884 [4/4] - in /incubator/ooo/ooo-site/trunk/content/ucb/docs: ./ ucp-ref/ Date: Sun, 27 Nov 2011 22:36:59 -0000 To: ooo-commits@incubator.apache.org From: kschenk@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111127223701.53E802388AA9@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/odma-ucp.html URL: http://svn.apache.org/viewvc/incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/odma-ucp.html?rev=1206884&view=auto ============================================================================== --- incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/odma-ucp.html (added) +++ incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/odma-ucp.html Sun Nov 27 22:36:56 2011 @@ -0,0 +1,296 @@ + + + + + + + + + + + + + +

The ODMA Provider

+

Preface

+

The ODMA Content Provider (OCP) implements a Content Provider for +the Universal Content Broker (UCB). It provides access to a document +structure stored in a Document Management System (DMS).

+

OCP Content

+

The OCP Content provides two types of content; the document and +the Root Folder.

+
    +
  1. The document Content corresponds to a document stored in the + DMS.

    +
  2. The Root Folder exists at any time and is used to show all + documents avaible at that time. All other OCP contents are children + of this folder. The OCP Root Folder can only contain OCP Documents. + It has the URL „vnd.sun.star.odma:/“.

    +
+

+




+

+

Creation of new OCP Contents +

+

OCP Folders implement the interface XContentCreator. OCP Root +Folder supports the command „insert“. That's why the OCP +Root Folder can create new OCP Streams. To create a new OCP Streams:

+
    +
  1. Let the root folder create a new content by calling its + createNewContent-method. The content type to use for new streams is + application/vnd.sun.star.odma.

    +
  2. Set a title at the new stream. ( + Let the new child execute a setPropertyValues – command, which + sets at least the property „Title“ to a non-empty value + ).

    +
  3. Other properties which may be set + are +

    +
+
    +
  • Author,

    +
  • Subject and

    +
  • Keywords

    +
+
    +
  1. Let the new child ( not the + parent! ) execute the command „transfer“. This will + commit the creation process. You need to supply the implementation + of an XInputStream with the command's parameters, that provides + access to the stream data. +

    +
+

URL Scheme for OCP Contents

+

Each OCP content has an identifier corresponding to the following +scheme:

+

vnd.sun.star.odma:/<name>

+

where <name> is the DocumentID given by the DMS.

+

Examples:

+

vnd.sun.star.odma:/ ( The +URL of the OCP Root Folder )

+

vnd.sun.star.odma:/ a document +id given by the DMS

+

vnd.sun.star.odma:/::ODMA\DMS_ID\DM_SPECIFIC_INFO

+

Appendix

+

The following table gives an overview +of the different OCP contents.

+



+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+


+

+
+

UCB Type

+

(returned by XContent::getContentType )

+
+

Properties

+
+

Commands

+
+

Interfaces

+
+

Document

+
+

application/vnd.sun.star.odma

+
+

[readonly] ContentType

+

[readonly] DateCreated

+

[readonly] DateModified

+

[readonly] IsDocument

+

[readonly] IsFolder

+

Title

+

Author

+

Subject

+

Keywords

+
+

getCommandInfo

+

getPropertySetInfo

+

getPropertyValues

+

setPropertyValues

+

delete

+

open

+

close

+


+

+
+

lang::XTypeProvider,

+

lang::XServiceInfo

+

lang::XComponent

+

ucb::XContent

+

ucb::XCommandProcessor

+

beans::XPropertiesChangeNotifier

+

beans::XPropertyContainer

+

beans::XPropertySetInfoChangeNotifier

+

ucb::XCommandInfoChangeNotifier

+

container::XChild

+
+

Root + Folder

+
+

application/vnd.sun.star.odma

+
+

[readonly] ContentType

+

[readonly] DateCreated

+

[readonly] DateModified

+

[readonly] IsDocument

+

[readonly] + IsFolder

+
+

getCommandInfo

+

getPropertySetInfo

+

getPropertyValues

+

setPropertyValues

+

transfer

+

delete

+

open

+

close

+
+

same as OCP Folder, plus +

+

ucb::XContentCreator

+
+



+

+

More information about ODMA can be found at +www.infonuovo.com/odma/

+

To enable ODMA the following basic macro has to executed to insert +the settings needed in the Configuration.

+
+EM  *****  BASIC  *****
+
+' Option Explicit
+
+Sub RegisterUcpOdma
+	Dim aConfigProvider As Object
+	Dim aConfiguration As Object
+	Dim aFilters as Object
+	Dim aNewNode as Object
+	Dim nResponse as Integer
+	Dim bAddNode as Boolean
+
+	' access the global configuration provider
+	aConfigProvider = createUnoService( "com.sun.star.configuration.ConfigurationProvider" )
+	
+	' create an access object for TypeDetection module
+	Dim aParams(0) As new com.sun.star.beans.PropertyValue
+	aParams(0).Name = "nodepath"
+	aParams(0).Value = "/org.openoffice.ucb.Configuration"
+	aConfiguration = aConfigProvider.createInstanceWithArguments( _
+		"com.sun.star.configuration.ConfigurationUpdateAccess", _
+		aParams() )
+
+	' open the set node for the types
+	aContentProviders = aConfiguration.getByName( "ContentProviders" )
+	aContentProvidersDataPrimaryKeys = aContentProviders.getByName( "Local" )
+	aSecondaryKeys = aContentProvidersDataPrimaryKeys.getByName( "SecondaryKeys" )
+	aContentProvidersDataSecondaryKeys = aSecondaryKeys.getByName( "Office" )
+	aProviderData =  aContentProvidersDataSecondaryKeys.getByName( "ProviderData" )
+
+	' existence check
+	bAddNode = TRUE
+	dim xx() as string
+	xx() = aProviderData.getElementNames
+	for i=LBOUND(xx) to UBOUND(xx)
+		aContentProviderData = aProviderData.getByName( xx(i) )
+		if ( aContentProviderData.ServiceName = "com.sun.star.ucb.OdmaContentProvider" ) Then
+			nResponse = MsgBox( "The type is already present in the configuration! Overwrite?", 4 )
+			if ( 6 = nResponse ) Then
+				aProviderData.removeByName( xx(i) )
+			Else
+				bAddNode = FALSE
+			End If
+		End If
+	next i
+
+	if ( bAddNode ) Then
+		' create a new node for the new type
+		aContentProviderData = aProviderData.createInstance( )
+		' fill this new type node
+		aContentProviderData.ServiceName = "com.sun.star.ucb.OdmaContentProvider"
+		aContentProviderData.URLTemplate = "vnd.sun.star.odma"
+		' insert this new type
+		aProviderData.insertByName( "Provider" + (UBOUND(xx) - LBOUND(xx) + 2), aContentProviderData )
+	End If
+
+
+	' commit the changes done
+	aConfiguration.commitChanges( )
+
+	' register the component implementing the filter
+' 	RegisterFilterComponent( )
+End Sub
+
+Sub RegisterFilterComponent
+	Dim oRegistry as Object
+	Dim oImplReg as Object
+	oRegistry = createUnoService( "com.sun.star.registry.SimpleRegistry" )
+	oImplReg = createUnoService( "com.sun.star.registry.ImplementationRegistration" )
+	if ( IsNull( oRegistry ) Or IsNull( oImplReg ) ) Then
+		MsgBox "could not create the components necessary for registering the component!"
+		Exit Sub
+	End If
+
+	On Local Error Resume Next
+	oRegistry.open( "applicat.rdb", FALSE, FALSE )
+	if ( Not oRegistry.IsValid() ) Then
+		MsgBox "could not open the registry!"
+		Exit Sub
+	End If
+	On Local Error Goto 0
+
+	oImplReg.registerImplementation( "com.sun.star.loader.SharedLibrary", "ucpodma1.dll", oRegistry )
+End Sub
+
+
+

+ + Propchange: incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/odma-ucp.html ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/package-contents.gif URL: http://svn.apache.org/viewvc/incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/package-contents.gif?rev=1206884&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/package-contents.gif ------------------------------------------------------------------------------ svn:mime-type = image/gif Added: incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/package-ucp.html URL: http://svn.apache.org/viewvc/incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/package-ucp.html?rev=1206884&view=auto ============================================================================== --- incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/package-ucp.html (added) +++ incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/package-ucp.html Sun Nov 27 22:36:56 2011 @@ -0,0 +1,237 @@ + + + + + + + + + + + + + +

The Package Content Provider

+

Preface

+

The Package Content Provider ( PCP ) implements a Content Provider +for the Universal Content Broker (UCB). It provides access to the +content of ZIP/JAR archive files. Possibly it will be extended to +support other packages ( like OLE storages ) in the future.

+

PCP Contents

+

The PCP provides two different types of contents: Stream and +Folder.

+
    +
  1. A PCP Stream is a content which represents a file inside a + package. It is always contained in a PCP Folder. A PCP Stream has no + children.

    +
  2. A PCP Folder is a container for other PCP Folders and PCP + Streams.

    +
+


Creation +Of New PCP Contents

+

PCP Folders implement the interface XContentCreator. PCP Streams +and PCP Folders support the command „insert“. That's why +all PCP Folders can create new PCP Folders and PCP Streams. To create +a new child of a PCP Folder:

+
    +
  1. Let the parent folder create a new content by calling its + createNewContent-method. The content type to use for new folders is + application/vnd.sun.star.pkg-folder. + To create a new stream, use the type string + application/vnd.sun.star.pkg-stream.

    +
  2. Set a title at the new + folder/stream. ( Let the new child execute a setPropertyValues – + command, which sets at least the property „Title“ to a + non-empty value ).

    +
  3. Let the new child ( not the + parent! ) execute the command „insert“. This will commit + the creation process. For Streams, you need to supply the + implementation of an XInputStream with the command's parameters, + that provides access to the stream data. +

    +
+



+

+

Another, more convenient way for +creating streams is simply to assemble the URL for the new +content ( last part of the path will become the title of the new +stream ) and to obtain a Content object for that URL from the UCB. +Then let the content execute the command "insert". The +command will fail, if you set the command's parameter +"ReplaceExisting" to false and there is already a stream +with the title given by the content's URL.

+

URL Scheme for PCP Contents

+

Each PCP content has an identifier corresponding to the following +scheme:

+

package-URL = +"vnd.sun.star.pkg://" orig-URL [ abs-path ]

+

abs-path = "/" +path-segments

+

path-segements = segment *( +"/" segment )

+

segment = pchar

+

pchar = unreserved | escaped | +":" | "@" | "&" | "=" | +"+" | "$" | ","

+

unreserved = alphanum | mark

+

mark = "-" | "_" +| "." | "!" | "~" | "*" | "'" +| "(" | ")"

+

escaped = "%" hex +hex

+

orig-URL = 1 *( unreserved | +escaped | "$" | "," | ";" | ":" +| "@" | "&" | "&" | "=" +| "+"

+

Examples:

+

vnd.sun.star.pkg://file:%2F%2F%2Fe:%2Fmy.xsw/ +( The root folder of the package located at file:///e:/my.xsw +)

+

vnd.sun.star.pkg://file:%2F%2F%2Fe:%2Fmy.xsw/Content +( The folder/stream named "Content" that is contained in +the root folder of the located at file:///e:/my.xsw +)

+

vnd.sun.star.pkg://file:%2F%2F%2Fe:%2Fmy.xsw/Content%20A +( The folder/stream named "Content A" that is contained in +the root folder of the located at file:///e:/my.xsw +)

+

Appendix

+

The following table gives an overview of the different PCP +contents.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+


+

+
+

UCB Type

+

(returned by XContent::getContentType )

+
+

Properties

+
+

Commands

+
+

Interfaces

+
+

Stream

+
+

application/vnd.sun.star.pkg-stream

+
+

[readonly] ContentType

+

[readonly] IsDocument

+

[readonly] IsFolder

+

MediaType

+

[readonly] Size

+

Title

+

Compressed1

+
+

getCommandInfo

+

getPropertySetInfo

+

getPropertyValues

+

setPropertyValues

+

insert

+

delete

+

open

+
+

lang::XTypeProvider,

+

lang::XServiceInfo,

+

lang::XComponent,

+

ucb::XContent,

+

ucb::XCommandProcessor,

+

beans::XPropertiesChangeNotifier,

+

beans::XPropertyContainer,

+

beans::XPropertySetInfoChangeNotifier,

+

ucb::XCommandInfoChangeNotifier,

+

container::XChild

+
+

Folder

+
+

application/vnd.sun.star.pkg-folder

+
+

[readonly] ContentType

+

[readonly] IsDocument

+

[readonly] IsFolder

+

MediaType

+

[readonly] Size

+

Title +

+
+

getCommandInfo

+

getPropertySetInfo

+

getPropertyValues

+

setPropertyValues

+

insert

+

delete

+

open

+

transfer2

+

flush3

+
+

same as PCP Stream

+

plus ucb::XContentCreator

+
+



+

+
+

1The + property "Compressed" is introduced by package streams. It + allows you to explecitly state whether you want a stream to be + compressed or not. The default value of this property will be + determined according to the value suggested by the underlying + packager implementation.

+
+
+

2The + „transfer“ command only transfers PCP-folders/-streams to + other PCP folders. It does not handle contents with a URL scheme + other then the PCP-URL-scheme.

+
+
+

3"flush" + is a command introduced by the PCP Folder. It takes a void-argument + and returns void. This command is used to write unsaved changes to + the underlying package file. Note that the current implementation of + PCP contents never flush automatically! Operations, which + require a flush to get persistent, are: "setPropertyValues( + Title | MediaType ) ", "delete", "insert".

+
+ + \ No newline at end of file Propchange: incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/package-ucp.html ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/tdoc-contents.gif URL: http://svn.apache.org/viewvc/incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/tdoc-contents.gif?rev=1206884&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/tdoc-contents.gif ------------------------------------------------------------------------------ svn:mime-type = image/gif Added: incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/tdoc-ucp.html URL: http://svn.apache.org/viewvc/incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/tdoc-ucp.html?rev=1206884&view=auto ============================================================================== --- incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/tdoc-ucp.html (added) +++ incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/tdoc-ucp.html Sun Nov 27 22:36:56 2011 @@ -0,0 +1,393 @@ + + + + + + + + + + + + +

The Transient Document Content +Provider

+



+

+

Preface

+

The Transient Document Content Provider (TDCP) +implements a Content Provider for the Universal Content Broker (UCB). +It provides access to the hierachical structure of the documents that +are active in a running OpenOffice.org process. As long as a document +was not closed, the TDCP can access it. All documents that have been +loaded – regardless of their persistent document format--- or +that have been created but not yet saved to any storage medium, are +supported. The TDCP is not able to load any documents itself. This is +exclusively done by the OpenOffice.org document handling framework. +The document contents provided by the TDCP represent live data, which +may differ from any persistent representation of the document, for +instance, because the user modified the document after loading, but +did not yet save it.

+

TDCP Contents

+

The TDCP provides four different types of contents: +Stream, Folder, Document and Root.

+
    +
  1. A TDCP Stream is a content which represents a + data stream of an Office document. It is contained in a TDCP Folder + or TDCP Document. A TDCP Stream has no children.

    +
  2. A TDCP Folder is a container for other TDCP + Folders and TDCP Streams. It may be contained in another TDCP Folder + or in a TDCP Document.

    +
  3. A TDCP Document represents the root folder of a + transient document. It is a container for other TDCP Folders and + TDCP Streams. It is always a child of the TDCP Root.

    +
  4. There is at most one instance of a TDCP Root at + a time. All other TDCP contents are children of this folder. The + TDCP Root Folder can contain only TDCP Documents. It has the fixed + URL „vnd.sun.star.tdoc:/“.

    +
+



+

+

DrawObject

+

+



+

+



+

+



+

+



+

+



+

+



+

+



+

+



+

+



+

+

Creation Of New TDCP Contents

+

TDCP Folders and TDCP Documents implement the +interface XContentCreator. TDCP Streams and TDCP Folders support the +command „insert“; the TDCP Root and TDCP Documents do +not. TDCP Folders and TDCP Documents can create new TDCP Folders and +TDCP Streams. To create a new child of a TDCP Folder or TDCP +Document:

+
    +
  1. Let the parent folder create a new content by + calling its createNewContent-method. The content type to use for new + folders is application/vnd.sun.star.tdoc-folder. + To create a new stream, use the type string + application/vnd.sun.star.tdoc-stream.

    +
  2. Set a title at the + new folder/stream. ( Let the new child execute a setPropertyValues – + command, which sets at least the property „Title“ to a + non-empty value ). +

    +
  3. Let the new child ( + not the parent! ) execute the command „insert“. This + will commit the creation process. For streams, you need to supply + the implementation of an XInputStream with the command's parameters, + that provides access to the stream data.

    +
+



+

+

Another, more +convenient way for creating streams is simply to assemble the URL +for the new content ( last part of the path will become the title of +the new stream ) and to obtain a Content object for that URL from the +UCB. Then let the content execute the command "insert". The +command will fail, if you set the command's parameter +"ReplaceExisting" to false and there is already a stream +with the title given by the content's URL.

+



+

+

URL Scheme for TDCP Contents

+

Each TDCP content has an identifier corresponding to +the following scheme:

+

tdcp-URL = +"vnd.sun.star.tdoc:" abs-path

+

abs-path = ++( "/" segment )

+

segment = +*( pchar )

+

pchar = +unreserved | escaped | ":" | "@" | "&" +| "=" +

+

| +"+" | "$" | ","

+

unreserved = +alphanum | mark

+

mark = +"-" | "_" | "." | "!" | "~" +| "*" | "'" | "("

+

| +")"

+

escaped = +"%" hex hex

+



+

+

Examples:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

URL

+
+

Comment

+
+

vnd.sun.star.tdoc:/

+
+

The TDCP Root +

+
+

vnd.sun.star.tdoc:/22

+
+

The document with the + id 22

+
+

vnd.sun.star.tdoc:/22/

+
+

The document with the + id 22

+
+

vnd.sun.star.tdoc:/42/folder/subfolder

+
+

The folder/stream + named subfolder contained in folder named folder, which is + contained in the document with the id 42

+
+

vnd.sun.star.tdoc:/42/folder/subfolder/

+
+

The folder named + subfolder contained in folder named folder, which is contained in + the document with the id 42 (final slash identifies that resource + is a folder)

+
+

vnd.sun.star.tdoc:/1/content.xml

+
+

The stream/folder + named content.xml contained in the document with the id 1

+
+



+

+

Appendix

+

The following table gives an overview of the +different TDCP contents.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+


+

+
+

UCB Type

+

(returned by + XContent::getContentType )

+
+

Properties

+
+

Commands

+
+

Interfaces

+
+

Stream +

+
+

application/vnd.sun.star.tdoc-stream

+
+

[readonly] string ContentType

+

[readonly] boolean IsDocument

+

[readonly] boolean IsFolder

+

string Title

+
+

getCommandInfo

+

getPropertySetInfo

+

getPropertyValues

+

setPropertyValues

+

insert

+

delete

+

open +

+


+

+
+

lang::XTypeProvider,

+

lang::XServiceInfo,

+

lang::XComponent,

+

ucb::XContent,

+

ucb::XCommandProcessor,

+

beans::XPropertiesChangeNotifier,

+

beans::XPropertyContainer,

+

beans::XPropertySetInfoChangeNotifier,

+

ucb::XCommandInfoChangeNotifier,

+

container::XChild

+
+

Folder

+
+

application/vnd.sun.star.tdoc-folder

+
+

[readonly] string ContentType

+

[readonly] boolean IsDocument

+

[readonly] boolean IsFolder

+

string Title

+

[readonly] embed::XStorage Storage**

+
+

getCommandInfo

+

getPropertySetInfo

+

getPropertyValues

+

setPropertyValues

+

insert

+

delete

+

open

+

transfer*

+
+

same as TDCP Stream +

+

plus ucb::XContentCreator

+
+

Document

+
+

application/vnd.sun.star.tdoc-document

+
+

[readonly] string ContentType

+

[readonly] boolean IsDocument

+

[readonly] boolean IsFolder

+

[readonly] string Title

+

[readonly] frame::XModel DocumentModel

+
+

getCommandInfo

+

getPropertySetInfo

+

getPropertyValues

+

setPropertyValues

+

open

+

transfer*

+
+

same as TDCP Stream +

+

plus ucb::XContentCreator

+
+

Root

+
+

application/vnd.sun.star.tdoc-root

+
+

[readonly] string ContentType

+

[readonly] boolean IsDocument

+

[readonly] boolean IsFolder

+

[readonly] string Title (value: always an empty + string)

+
+

getCommandInfo

+

getPropertySetInfo

+

getPropertyValues

+

setPropertyValues

+

open

+
+

same as TDCP Stream (not Folder!)

+
+

*) The „transfer“ +command only transfers TDCP documents, TDCP folders and TDCP streams +to TDCP folders or TDCP documents. It does not handle contents with a +URL scheme other than the TDOC URL scheme.

+

**) always a reference to +a storage opened in read-only mode. No write operations are possible. +UCB content must be used for operations that modify the storage (if +equivalent functionality is available) or a writable storage must be +obtained from somewhere else.

+ + Propchange: incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/tdoc-ucp.html ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/webdav-contents.gif URL: http://svn.apache.org/viewvc/incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/webdav-contents.gif?rev=1206884&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/webdav-contents.gif ------------------------------------------------------------------------------ svn:mime-type = image/gif Added: incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/webdav-ucp.html URL: http://svn.apache.org/viewvc/incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/webdav-ucp.html?rev=1206884&view=auto ============================================================================== --- incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/webdav-ucp.html (added) +++ incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/webdav-ucp.html Sun Nov 27 22:36:56 2011 @@ -0,0 +1,335 @@ + + + + + + + + + + + + + +

The WebDAV Provider

+

Preface

+

The WebDAV1 +Content Provider (DCP) implements a Content Provider for the +Universal Content Broker (UCB). It provides access to WebDAV and +standard HTTP servers. The DCP communicates with the server using the +WebDAV protocol which is an extention to the HTTP protocol or using +the plain HTTP protocol in case the server is not WebDAV enabled. +

+

DCP Contents

+

The DCP provides two types of content: a Folder or Document +which corresponds to a collection or non-collection (nodes and leafs) +in WebDAV respectively.

+
    +
  1. A DCP Folder is a container for other DCP Folders or + Documents.

    +
  2. A DCP Document is a container for Document data/content. + The data/content may be anything, a WebDAV server, like an HTTP + server, does not necessarily mandate what type of data/content may + be contained within Documents. The type of data/content is defined + by the MediaType + property which is different from the content type returned from the + getContentType method. + The MediaType property + is mapped to the equivalent WebDAV property and the WebDAV server + calculates the value.

    +
+



+

+



+

+



+

+



+

+



+

+



+

+

Creation Of New DCP Contents

+

DCP Folders implement the interface XContentCreator. +DCP Documents and DCP Folders support the command„insert. +To create a new child of a DCP Folder:

+
    +
  1. Let the parent folder create a new content by calling its + createNewContent method. The + content type to use for new folders is + application/vnd.sun.star.webdav-collection. + To create a new document, use the type string + application/http-content.

    +
  2. Set a title at the new + folder/document. ( Let the new child execute a setPropertyValues + – command, which sets at least the property„Title + to a non-empty value ).

    +
  3. Let the new child ( not the + parent! ) execute the command „insert“. + This will commit the creation process and persist the newly created + content on the WebDAV server

    +
+

Authentication

+

DAV resources that require authentication can be accessed using +the interaction handler mechanism of the UCB. This means, the DAV +content will call an interaction handler supplied by the client in +order to let it handle an authentication request. The implementation +of the interaction handler should be able to collect the user name / +password from somewhere (i.e. Login Dialog ) and can supply this data +as an interaction response.

+

Property Handling

+

In addition to the manadatory UCB properties, the DCP supports +reading and writing all DAV "live" and "dead" +properties. Some DAV "live" properties are mapped +additionally to UCB properties and vice versa (i.e. DAV:creationdate +is mapped to DateCreated). +Adding and removing dead properties is also supported by the +implementation of the XPropertyContainer interface of a DCP +Content.

+

Property Values:

+

The DCP cannot determine the semantics +of unknown properties. Thus the values of such properties will always +be presented as plain text ( as they were returned from the server).

+

Namespaces:

+

The following namespaces are well-known to the DCP:

+ +

Properties with these namespaces can be addresssed using a UCB +property name which is the concatenation of namespace and name (i.e. +DAV:getcontentlength)

+

Dead proprties with namespaces that are not well-known to the DCP +can be addressed using a special UCB property name string, that +contains both the namespace and the property name. Such a special +property name string must look as follows:

+

<prop:the_propname xmlns:prop="the_namespace"> +

+

The DCP internally applies the +namespace "http://ucb.openoffice.org/dav/props/" +to all UCB property names:

+
    +
  • that are not predefined by the + UCB API.

    +
  • that do not start with a + well-known namespace.

    +
  • that do not use the special + property name string to encode namespace and name.

    +
+

For example, a client can do an addProperty( .... +"MyAdditionalProperty" ... ). The resulting DAV property +will have the name "MyAdditionalProperty", its namespace +will be "http://ucb.openoffice.org/dav/props/". +However, the DCP client will never see that namespace. He can always +use the "simple" name "MyAdditionalProperty".

+



+

+

DAV / UCB Property Mapping:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

DAV:creationdate

+
+

DateCreated

+
+

DAV:getlastmodified

+
+

DateModified

+
+

DAV:getcontenttype

+
+

MediaType

+
+

DAV:getcontentlength

+
+

Size

+
+

DAV:resourcetype

+
+

(used to set IsFolder, IsDocument, + ContentType)

+
+

+

+

URL Scheme for DCP Contents

+

Each DCP content has an identifier corresponding to the following +scheme:

+

vnd.sun.star.webdav://host:port/<path>

+

where <path> is a hierarchical path of the form

+

<name>/<name>/.../<name>

+

where <name> is a string encoded according to the URL +conventions.

+

It is also possible to use standard HTTP-URLs. In +this case the implementation will determine by itself, if the +requested resource is DAV enabled.

+



+

+

Examples:

+

vnd.sun.star.webdav://localhost/davhome/

+

vnd.sun.star.webdav://davserver.com/Documents/report.sdw

+

http://davserver.com/Documents/report.sdw

+



+

+

Note the that WebDAV URL namespace +model is the same as the HTTP URL namespace model.

+



+

+

Appendix

+

The following table gives an overview of the different DCP +contents.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+


+

+
+

UCB Type

+

(returned by XContent::getContentType )

+
+

Properties

+
+

Commands

+
+

Interfaces

+
+

Document

+
+

application/http-content

+
+

[readonly] ContentType

+

[readonly] DateCreated

+

[readonly] DateModified

+

[readonly] IsDocument

+

[readonly] IsFolder

+

[readonly] MediaType

+

[readonly] Size

+

Title

+
+

getCommandInfo

+

getPropertySetInfo

+

getPropertyValues

+

setPropertyValues

+

insert

+

delete

+

open

+



+

+


+

+
+

lang::XTypeProvider,

+

lang::XServiceInfo

+

lang::XComponent

+

ucb::XContent

+

ucb::XCommandProcessor

+

beans::XPropertiesChangeNotifier

+

beans::XPropertyContainer

+

beans::XPropertySetInfoChangeNotifier

+

ucb::XCommandInfoChangeNotifier

+

container::XChild

+
+

Folder

+
+

application/vnd.sun.star.webdav-collection

+
+

[readonly] ContentType

+

[readonly] DateCreated

+

[readonly] DateModified

+

[readonly] IsDocument

+

[readonly] IsFolder

+

[readonly] MediaType

+

[readonly] Size

+

Title +

+
+

getCommandInfo

+

getPropertySetInfo

+

getPropertyValues

+

setPropertyValues

+

insert

+

delete

+

open

+

transfer

+
+

same as DCP Folder, plus +

+

ucb::XContentCreator

+
+



+

+



+

+ + + \ No newline at end of file Propchange: incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/webdav-ucp.html ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/wfs.gif URL: http://svn.apache.org/viewvc/incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/wfs.gif?rev=1206884&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/ooo/ooo-site/trunk/content/ucb/docs/ucp-ref/wfs.gif ------------------------------------------------------------------------------ svn:mime-type = image/gif