/************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: XDocumentTemplates.idl,v $ * $Revision: 1.8 $ * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License version 3 * only, as published by the Free Software Foundation. * * OpenOffice.org is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License version 3 for more details * (a copy is included in the LICENSE file that accompanied this code). * * You should have received a copy of the GNU Lesser General Public License * version 3 along with OpenOffice.org. If not, see * * for a copy of the LGPLv3 License. * ************************************************************************/ #ifndef __com_sun_star_frame_XDocumentTemplates_idl__ #define __com_sun_star_frame_XDocumentTemplates_idl__ #ifndef __com_sun_star_frame_XStorable_idl__ #include #endif #ifndef __com_sun_star_ucb_XContent_idl__ #include #endif //============================================================================= module com { module sun { module star { module frame { //============================================================================= /** 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 XDocumentTemplates::update(). A real implementation of this interface can do that on top of an ucb content provider. Method XDocumentTemplates::getContent() force that.

*/ published interface XDocumentTemplates: com::sun::star::uno::XInterface { //------------------------------------------------------------------------- /** privides access to the root of internal used hierarchy

This content can be used for accessing the groups directly.

@return the ucb content for template configuration */ com::sun::star::ucb::XContent getContent(); //------------------------------------------------------------------------- /** creates the template with the given name in the given group using the data from the storable @param GroupName specifies the group @param TemplateName specifies the template @param Storable specifies the target @return if operation was sucessfully
otherwise @see XDocumentTemplates::addTemplate() */ boolean storeTemplate( [in] string GroupName, [in] string TemplateName, [in] XStorable Storable); //------------------------------------------------------------------------- /** creates the template with the given name in the given group using the given URL @param GroupName specifies the group @param TemplateName specifies the template @param SourceURL specifies the position of template @return if operation was sucessfully
otherwise @see XDocumentTemplates::storeTemplate() */ boolean addTemplate( [in] string GroupName, [in] string TemplateName, [in] string SourceURL); //------------------------------------------------------------------------- /** remove a template from specified group @param GroupName specifies the group which include the template @param TemplateName specifies the template for delete @return if operation was sucessfully
otherwise */ boolean removeTemplate( [in] string GroupName, [in] string TemplateName); //------------------------------------------------------------------------- /** rename a template inside specified group @param GroupName specifies the group which include the template @param TemplateName specifies the template for renaming @return if operation was sucessfully
otherwise */ boolean renameTemplate( [in] string GroupName, [in] string OldTemplateName, [in] string NewTemplateName); //------------------------------------------------------------------------- /** creates a new group @param GroupName the name of the group to be created @return if operation was sucessfully
otherwise */ boolean addGroup( [in] string GroupName ); //------------------------------------------------------------------------- /** remove an existing group @param GroupName the name of the group to be removed @return if operation was sucessfully
otherwise */ boolean removeGroup( [in] string GroupName ); //------------------------------------------------------------------------- /** rename an existing group @param OldGroupName the old name of the group @param NewGroupName the new name of the group @return if operation was sucessfully
otherwise */ boolean renameGroup( [in] string OldGroupName, [in] string NewGroupName); //------------------------------------------------------------------------- /** 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.

*/ [oneway] void update(); }; //============================================================================= }; }; }; }; #endif