Difference between revisions of "Documentation/DevGuide/UCB/Deleting"
From Apache OpenOffice Wiki
< Documentation | DevGuide
OOoWikiBot (Talk | contribs) m (Robot: Changing Category:Documentation/Developers Guide/Universal Content Broker) |
OOoWikiBot (Talk | contribs) m (FINAL VERSION FOR L10N) |
||
Line 6: | Line 6: | ||
|NextPage=Documentation/DevGuide/UCB/Copying, Moving and Linking | |NextPage=Documentation/DevGuide/UCB/Copying, Moving and Linking | ||
}} | }} | ||
− | {{DISPLAYTITLE:Deleting}} | + | {{Documentation/DevGuideLanguages|Documentation/DevGuide/UCB/{{SUBPAGENAME}}}} |
+ | {{DISPLAYTITLE:Deleting}} | ||
Executing the command "<code>delete</code>" on a UCB content destroys the resource it represents. This command takes a boolean parameter. If it is set to true, the resource is immediately, destroyed physically. | Executing the command "<code>delete</code>" on a UCB content destroys the resource it represents. This command takes a boolean parameter. If it is set to true, the resource is immediately, destroyed physically. | ||
Revision as of 13:07, 15 May 2009
Executing the command "delete
" on a UCB content destroys the resource it represents. This command takes a boolean parameter. If it is set to true, the resource is immediately, destroyed physically.
If false
is passed to this command, the caller wants to delete the resource "logically". This means that the resource is restored or physically destroyed later. A soft-deleted content needs to support the command "undelete
". This command brings it back to life. The implementation of the delete command can ignore the parameter and may opt to always destroy the resource physically.
Deleting a resource:
import com.sun.star.ucb.*; { XContent xContent = ... ///////////////////////////////////////////////////////////////////// // Destroy a resource physically... ///////////////////////////////////////////////////////////////////// try { Boolean bDeletePhysically = new Boolean(true); // Execute command "delete". // using helper method executeCommand (see [CHAPTER:UCB.Using.Commands]) executeCommand(xContent, "delete", bDeletePhysically); } catch (com.sun.star.ucb.CommandAbortedException e) { ... error ... } catch (com.sun.star.uno.Exception e) { ... error ... } }
Content on this page is licensed under the Public Documentation License (PDL). |