Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

API

SDK

Tips ‘n’ Tricks

Miscellaneous


:: com :: sun :: star :: frame ::

interface XDocumentTemplates
Description
provides a high level api to organize document templates

Template informations are saved as links to the original content and organized in groups. This data should be persistent and can be updated by calling special method update(). A real implementation of this interface can do that on top of an ucb content provider. Method getContent() force that.


Methods' Summary
getContent privides access to the root of internal used hierarchy  
storeTemplate creates the template with the given name in the given group using the data from the storable  
addTemplate creates the template with the given name in the given group using the given URL  
removeTemplate remove a template from specified group  
renameTemplate rename a template inside specified group  
addGroup creates a new group  
removeGroup remove an existing group  
renameGroup rename an existing group  
update force an update for internal structures  
Methods' Details
getContent
::com::sun::star::ucb::XContent
getContent();

Description
privides access to the root of internal used hierarchy

This content can be used for accessing the groups directly.

Returns
the ucb content for template configuration
storeTemplate
boolean
storeTemplate( [in] string  GroupName,
[in] string  TemplateName,
[in] XStorable  Storable );

Description
creates the template with the given name in the given group using the data from the storable
Parameter GroupName
specifies the group
Parameter TemplateName
specifies the template
Parameter Storable
specifies the target
Returns
true if operation was sucessfully
false otherwise
See also
XDocumentTemplates::addTemplate()
addTemplate
boolean
addTemplate( [in] string  GroupName,
[in] string  TemplateName,
[in] string  SourceURL );

Description
creates the template with the given name in the given group using the given URL
Parameter GroupName
specifies the group
Parameter TemplateName
specifies the template
Parameter SourceURL
specifies the position of template
Returns
true if operation was sucessfully
false otherwise
See also
XDocumentTemplates::storeTemplate()
removeTemplate
boolean
removeTemplate( [in] string  GroupName,
[in] string  TemplateName );

Description
remove a template from specified group
Parameter GroupName
specifies the group which include the template
Parameter TemplateName
specifies the template for delete
Returns
true if operation was sucessfully
false otherwise
renameTemplate
boolean
renameTemplate( [in] string  GroupName,
[in] string  OldTemplateName,
[in] string  NewTemplateName );

Description
rename a template inside specified group
Parameter GroupName
specifies the group which include the template
Parameter TemplateName
specifies the template for renaming
Returns
true if operation was sucessfully
false otherwise
addGroup
boolean
addGroup( [in] string  GroupName );

Description
creates a new group
Parameter GroupName
the name of the group to be created
Returns
true if operation was sucessfully
false otherwise
removeGroup
boolean
removeGroup( [in] string  GroupName );

Description
remove an existing group
Parameter GroupName
the name of the group to be removed
Returns
true if operation was sucessfully
false otherwise
renameGroup
boolean
renameGroup( [in] string  OldGroupName,
[in] string  NewGroupName );

Description
rename an existing group
Parameter OldGroupName
the old name of the group
Parameter NewGroupName
the new name of the group
Returns
true if operation was sucessfully
false otherwise
update
[oneway] void
update();

Description
force an update for internal structures

Because the templates are well known by links and not as direct content they can be outdated. An update force actualization of that to find wrong links.

Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.