diff options
author | Kai Sommerfeld <kso@openoffice.org> | 2009-12-21 15:53:33 +0100 |
---|---|---|
committer | Kai Sommerfeld <kso@openoffice.org> | 2009-12-21 15:53:33 +0100 |
commit | f62c114209af22c517d245f74f11f1dde02f53cc (patch) | |
tree | 14b8b6070c70f1727d7ab3a863a77fe1b55968cc | |
parent | f7cf077f7ad3e29e68875eae96d47a9e982bda7b (diff) |
#i61429#, deprecated css.ucb.XContentCreator, implemented replacement.
-rw-r--r-- | offapi/com/sun/star/ucb/Content.idl | 53 | ||||
-rw-r--r-- | offapi/com/sun/star/ucb/XContentCreator.idl | 13 |
2 files changed, 56 insertions, 10 deletions
diff --git a/offapi/com/sun/star/ucb/Content.idl b/offapi/com/sun/star/ucb/Content.idl index 5d363f9d880a..eef4f474e527 100644 --- a/offapi/com/sun/star/ucb/Content.idl +++ b/offapi/com/sun/star/ucb/Content.idl @@ -296,8 +296,8 @@ published service Content void // (1) This command inserts a new content. It commits the process of - // creating a new content via calling another content's method - // <member>XContentCreator::createNewContent</member> + // creating a new content via executing the command "createNewContent" + // and initializing it via setting properties, afterwards. // The command is not called on the content which created the new // content, because the new object already knows where it is to be // inserted (i.e. Calling createNewContent with the content type for a @@ -350,7 +350,7 @@ published service Content // Transfers without the transfer command can be done as follows: // // 1) Create a new content at the target folder - // --> targetContent = target.XContentCreator::createNewContent(...) + // --> targetContent = target.execute( "createNewContent", type ) // 2) Transfer data from source to target content // --> props = sourceContent.execute( "getPropertyValues", ... ) // --> dataStream = sourceContent.execute( "open", ... ) @@ -387,12 +387,36 @@ published service Content // Note that <type>InteractiveLockingLockExpiredException</type> might // be raised by any command that requires a previously obtained lock. + // This command creates a new non-persistent content of a given type. + // + // <p>Creation of a new (persistent) content: + // <ol> + // <li>creatabletypes = obtain "CreatableContentsInfo" property<br> + // from creator + // <li>choose a suitable type from creatabletypes + // <li>newObject = execute command "createNewContent(type)" at<br> + // creator + // <li>initialize the new object (i.e. newObject.Property1 = ...) + // <li>execute command "insert" at new content. This command + // commits the data and makes the new content persistent. + // </ol> + // + // This command must be supported by every Content that supports the + // property "CreatableContentsInfo" if the returned property value + // contains a non-empty sequence of creatable types. + // + // Note: This command is part of the replacement for the deprecated + // interface <type>XContentCreator</type>. + <type>XContent</type> > + <B>createNewContent</B> + <type>ContentInfo<type> contentinfo + ======================================================================= Properties: ======================================================================= ----------------------------------------------------------------------- - Requiered properties: + Mandatory properties: ----------------------------------------------------------------------- // contains a unique(!) type string for the content ( i.e. @@ -401,8 +425,8 @@ published service Content // content. Media types may be provided through the optional property // "MediaType". // The value of this property should match the information on creatable - // contents given by UCB contents that implement the interface - // <type>XContentCreator</type>. + // contents given by UCB contents that implement the property + // "CreatableContentsInfo". string ContentType // indicates, whether a content can contain other contents. @@ -591,7 +615,6 @@ published service Content </dt><dd>Show in new task </dd></dl> </p> - string TargetFrames // for contents that are links to other contents, contains the URL of @@ -607,6 +630,17 @@ published service Content // describes a verification policy. <type>VerificationMode</type> VerificationMode + + // contains the types of Contents a Content object can create via + // command "createNewContent". + // + // If the property value can be a non-empty sequence, the Content must + // also support command "createNewContent". + // + // Note: This property is part of the replacement for the deprecated + // interface <type>XContentCreator</type>. + sequence <type>ContentInfo</type> CreatableContentsInfo + </pre> */ interface com::sun::star::ucb::XCommandProcessor; @@ -696,6 +730,11 @@ published service Content <p>This interface is optional. It should be implemented by contents which shall be able to create new objects. + + @deprecated + + <p>This interface is <b>deprecated</b>. Use property + "CreatableContentsInfo" and command "createNewContent" instead. */ [optional] interface com::sun::star::ucb::XContentCreator; diff --git a/offapi/com/sun/star/ucb/XContentCreator.idl b/offapi/com/sun/star/ucb/XContentCreator.idl index 72b2dd02f6b5..df0c89a1b398 100644 --- a/offapi/com/sun/star/ucb/XContentCreator.idl +++ b/offapi/com/sun/star/ucb/XContentCreator.idl @@ -52,12 +52,19 @@ module com { module sun { module star { module ucb { <p>Creation of a new (persistent) content: <ol> - <li>newObject = creator.createNewContent( ... ) + <li>creatabletypes = creator.queryCreatableContentsInfo() + <li>choose a suitable type from creatabletypes + <li>newObject = creator.createNewContent( type ) <li>initialize the new object (i.e. newObject.Property1 = ...) <li>let the new content execute the command "insert". That command commits the data and makes the new content persistent. </ol> + @deprecated + + <p>This interface is deprecated. Use <type>Content</type> property + "CreatableContentsInfo" and command "createNewContent" instead. + @version 1.0 @author Kai Sommerfeld @see XContent @@ -74,13 +81,13 @@ published interface XContentCreator: com::sun::star::uno::XInterface sequence<com::sun::star::ucb::ContentInfo> queryCreatableContentsInfo(); //------------------------------------------------------------------------- - /** creates a new content of given type.. + /** creates a new content of given type. @param Info the content information. @returns - the new content, if operation was succesful. + the new content, if operation was successful. */ com::sun::star::ucb::XContent createNewContent( [in] com::sun::star::ucb::ContentInfo Info ); |