1*cdf0e10cSrcweir/************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir#ifndef __com_sun_star_frame_XDocumentTemplates_idl__ 28*cdf0e10cSrcweir#define __com_sun_star_frame_XDocumentTemplates_idl__ 29*cdf0e10cSrcweir 30*cdf0e10cSrcweir#ifndef __com_sun_star_frame_XStorable_idl__ 31*cdf0e10cSrcweir#include <com/sun/star/frame/XStorable.idl> 32*cdf0e10cSrcweir#endif 33*cdf0e10cSrcweir 34*cdf0e10cSrcweir#ifndef __com_sun_star_ucb_XContent_idl__ 35*cdf0e10cSrcweir#include <com/sun/star/ucb/XContent.idl> 36*cdf0e10cSrcweir#endif 37*cdf0e10cSrcweir 38*cdf0e10cSrcweir//============================================================================= 39*cdf0e10cSrcweir 40*cdf0e10cSrcweirmodule com { module sun { module star { module frame { 41*cdf0e10cSrcweir 42*cdf0e10cSrcweir//============================================================================= 43*cdf0e10cSrcweir/** provides a high level api to organize document templates 44*cdf0e10cSrcweir 45*cdf0e10cSrcweir <p> 46*cdf0e10cSrcweir Template informations are saved as links to the original content 47*cdf0e10cSrcweir and organized in groups. This data should be persistent and can be 48*cdf0e10cSrcweir updated by calling special method <member>XDocumentTemplates::update()</member>. 49*cdf0e10cSrcweir A real implementation of this interface can do that on top of 50*cdf0e10cSrcweir an ucb content provider. Method <member>XDocumentTemplates::getContent()</member> 51*cdf0e10cSrcweir force that. 52*cdf0e10cSrcweir </p> 53*cdf0e10cSrcweir */ 54*cdf0e10cSrcweirpublished interface XDocumentTemplates: com::sun::star::uno::XInterface 55*cdf0e10cSrcweir{ 56*cdf0e10cSrcweir //------------------------------------------------------------------------- 57*cdf0e10cSrcweir /** privides access to the root of internal used hierarchy 58*cdf0e10cSrcweir 59*cdf0e10cSrcweir <p> 60*cdf0e10cSrcweir This content can be used for accessing the groups directly. 61*cdf0e10cSrcweir </p> 62*cdf0e10cSrcweir 63*cdf0e10cSrcweir @return 64*cdf0e10cSrcweir the ucb content for template configuration 65*cdf0e10cSrcweir */ 66*cdf0e10cSrcweir com::sun::star::ucb::XContent getContent(); 67*cdf0e10cSrcweir 68*cdf0e10cSrcweir //------------------------------------------------------------------------- 69*cdf0e10cSrcweir /** creates the template with the given name in the given group using the 70*cdf0e10cSrcweir data from the storable 71*cdf0e10cSrcweir 72*cdf0e10cSrcweir @param GroupName 73*cdf0e10cSrcweir specifies the group 74*cdf0e10cSrcweir 75*cdf0e10cSrcweir @param TemplateName 76*cdf0e10cSrcweir specifies the template 77*cdf0e10cSrcweir 78*cdf0e10cSrcweir @param Storable 79*cdf0e10cSrcweir specifies the target 80*cdf0e10cSrcweir 81*cdf0e10cSrcweir @return 82*cdf0e10cSrcweir <TRUE/> if operation was sucessfully 83*cdf0e10cSrcweir <br> 84*cdf0e10cSrcweir <FALSE/> otherwise 85*cdf0e10cSrcweir 86*cdf0e10cSrcweir @see XDocumentTemplates::addTemplate() 87*cdf0e10cSrcweir */ 88*cdf0e10cSrcweir boolean storeTemplate( 89*cdf0e10cSrcweir [in] string GroupName, 90*cdf0e10cSrcweir [in] string TemplateName, 91*cdf0e10cSrcweir [in] XStorable Storable); 92*cdf0e10cSrcweir 93*cdf0e10cSrcweir //------------------------------------------------------------------------- 94*cdf0e10cSrcweir /** creates the template with the given name in the given group using the 95*cdf0e10cSrcweir given URL 96*cdf0e10cSrcweir 97*cdf0e10cSrcweir @param GroupName 98*cdf0e10cSrcweir specifies the group 99*cdf0e10cSrcweir 100*cdf0e10cSrcweir @param TemplateName 101*cdf0e10cSrcweir specifies the template 102*cdf0e10cSrcweir 103*cdf0e10cSrcweir @param SourceURL 104*cdf0e10cSrcweir specifies the position of template 105*cdf0e10cSrcweir 106*cdf0e10cSrcweir @return 107*cdf0e10cSrcweir <TRUE/> if operation was sucessfully 108*cdf0e10cSrcweir <br> 109*cdf0e10cSrcweir <FALSE/> otherwise 110*cdf0e10cSrcweir 111*cdf0e10cSrcweir @see XDocumentTemplates::storeTemplate() 112*cdf0e10cSrcweir */ 113*cdf0e10cSrcweir boolean addTemplate( 114*cdf0e10cSrcweir [in] string GroupName, 115*cdf0e10cSrcweir [in] string TemplateName, 116*cdf0e10cSrcweir [in] string SourceURL); 117*cdf0e10cSrcweir 118*cdf0e10cSrcweir //------------------------------------------------------------------------- 119*cdf0e10cSrcweir /** remove a template from specified group 120*cdf0e10cSrcweir 121*cdf0e10cSrcweir @param GroupName 122*cdf0e10cSrcweir specifies the group which include the template 123*cdf0e10cSrcweir 124*cdf0e10cSrcweir @param TemplateName 125*cdf0e10cSrcweir specifies the template for delete 126*cdf0e10cSrcweir 127*cdf0e10cSrcweir @return 128*cdf0e10cSrcweir <TRUE/> if operation was sucessfully 129*cdf0e10cSrcweir <br> 130*cdf0e10cSrcweir <FALSE/> otherwise 131*cdf0e10cSrcweir */ 132*cdf0e10cSrcweir boolean removeTemplate( 133*cdf0e10cSrcweir [in] string GroupName, 134*cdf0e10cSrcweir [in] string TemplateName); 135*cdf0e10cSrcweir 136*cdf0e10cSrcweir //------------------------------------------------------------------------- 137*cdf0e10cSrcweir /** rename a template inside specified group 138*cdf0e10cSrcweir 139*cdf0e10cSrcweir @param GroupName 140*cdf0e10cSrcweir specifies the group which include the template 141*cdf0e10cSrcweir 142*cdf0e10cSrcweir @param TemplateName 143*cdf0e10cSrcweir specifies the template for renaming 144*cdf0e10cSrcweir 145*cdf0e10cSrcweir @return 146*cdf0e10cSrcweir <TRUE/> if operation was sucessfully 147*cdf0e10cSrcweir <br> 148*cdf0e10cSrcweir <FALSE/> otherwise 149*cdf0e10cSrcweir */ 150*cdf0e10cSrcweir boolean renameTemplate( 151*cdf0e10cSrcweir [in] string GroupName, 152*cdf0e10cSrcweir [in] string OldTemplateName, 153*cdf0e10cSrcweir [in] string NewTemplateName); 154*cdf0e10cSrcweir 155*cdf0e10cSrcweir //------------------------------------------------------------------------- 156*cdf0e10cSrcweir /** creates a new group 157*cdf0e10cSrcweir 158*cdf0e10cSrcweir @param GroupName 159*cdf0e10cSrcweir the name of the group to be created 160*cdf0e10cSrcweir 161*cdf0e10cSrcweir @return 162*cdf0e10cSrcweir <TRUE/> if operation was sucessfully 163*cdf0e10cSrcweir <br> 164*cdf0e10cSrcweir <FALSE/> otherwise 165*cdf0e10cSrcweir */ 166*cdf0e10cSrcweir boolean addGroup( [in] string GroupName ); 167*cdf0e10cSrcweir 168*cdf0e10cSrcweir //------------------------------------------------------------------------- 169*cdf0e10cSrcweir /** remove an existing group 170*cdf0e10cSrcweir 171*cdf0e10cSrcweir @param GroupName 172*cdf0e10cSrcweir the name of the group to be removed 173*cdf0e10cSrcweir 174*cdf0e10cSrcweir @return 175*cdf0e10cSrcweir <TRUE/> if operation was sucessfully 176*cdf0e10cSrcweir <br> 177*cdf0e10cSrcweir <FALSE/> otherwise 178*cdf0e10cSrcweir */ 179*cdf0e10cSrcweir boolean removeGroup( [in] string GroupName ); 180*cdf0e10cSrcweir 181*cdf0e10cSrcweir //------------------------------------------------------------------------- 182*cdf0e10cSrcweir /** rename an existing group 183*cdf0e10cSrcweir 184*cdf0e10cSrcweir @param OldGroupName 185*cdf0e10cSrcweir the old name of the group 186*cdf0e10cSrcweir 187*cdf0e10cSrcweir @param NewGroupName 188*cdf0e10cSrcweir the new name of the group 189*cdf0e10cSrcweir 190*cdf0e10cSrcweir @return 191*cdf0e10cSrcweir <TRUE/> if operation was sucessfully 192*cdf0e10cSrcweir <br> 193*cdf0e10cSrcweir <FALSE/> otherwise 194*cdf0e10cSrcweir */ 195*cdf0e10cSrcweir boolean renameGroup( 196*cdf0e10cSrcweir [in] string OldGroupName, 197*cdf0e10cSrcweir [in] string NewGroupName); 198*cdf0e10cSrcweir 199*cdf0e10cSrcweir //------------------------------------------------------------------------- 200*cdf0e10cSrcweir /** force an update for internal structures 201*cdf0e10cSrcweir 202*cdf0e10cSrcweir <p> 203*cdf0e10cSrcweir Because the templates are well known by links and not as direct content 204*cdf0e10cSrcweir they can be outdated. An update force actualization of that to find 205*cdf0e10cSrcweir wrong links. 206*cdf0e10cSrcweir </p> 207*cdf0e10cSrcweir */ 208*cdf0e10cSrcweir [oneway] void update(); 209*cdf0e10cSrcweir}; 210*cdf0e10cSrcweir 211*cdf0e10cSrcweir//============================================================================= 212*cdf0e10cSrcweir 213*cdf0e10cSrcweir}; }; }; }; 214*cdf0e10cSrcweir 215*cdf0e10cSrcweir#endif 216