1*d1766043SAndrew Rist/************************************************************** 2cdf0e10cSrcweir * 3*d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*d1766043SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*d1766043SAndrew Rist * distributed with this work for additional information 6*d1766043SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*d1766043SAndrew Rist * "License"); you may not use this file except in compliance 9*d1766043SAndrew Rist * with the License. You may obtain a copy of the License at 10*d1766043SAndrew Rist * 11*d1766043SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*d1766043SAndrew Rist * 13*d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*d1766043SAndrew Rist * software distributed under the License is distributed on an 15*d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*d1766043SAndrew Rist * KIND, either express or implied. See the License for the 17*d1766043SAndrew Rist * specific language governing permissions and limitations 18*d1766043SAndrew Rist * under the License. 19*d1766043SAndrew Rist * 20*d1766043SAndrew Rist *************************************************************/ 21*d1766043SAndrew Rist 22*d1766043SAndrew Rist 23cdf0e10cSrcweir#ifndef __com_sun_star_frame_XDocumentTemplates_idl__ 24cdf0e10cSrcweir#define __com_sun_star_frame_XDocumentTemplates_idl__ 25cdf0e10cSrcweir 26cdf0e10cSrcweir#ifndef __com_sun_star_frame_XStorable_idl__ 27cdf0e10cSrcweir#include <com/sun/star/frame/XStorable.idl> 28cdf0e10cSrcweir#endif 29cdf0e10cSrcweir 30cdf0e10cSrcweir#ifndef __com_sun_star_ucb_XContent_idl__ 31cdf0e10cSrcweir#include <com/sun/star/ucb/XContent.idl> 32cdf0e10cSrcweir#endif 33cdf0e10cSrcweir 34cdf0e10cSrcweir//============================================================================= 35cdf0e10cSrcweir 36cdf0e10cSrcweirmodule com { module sun { module star { module frame { 37cdf0e10cSrcweir 38cdf0e10cSrcweir//============================================================================= 39cdf0e10cSrcweir/** provides a high level api to organize document templates 40cdf0e10cSrcweir 41cdf0e10cSrcweir <p> 42cdf0e10cSrcweir Template informations are saved as links to the original content 43cdf0e10cSrcweir and organized in groups. This data should be persistent and can be 44cdf0e10cSrcweir updated by calling special method <member>XDocumentTemplates::update()</member>. 45cdf0e10cSrcweir A real implementation of this interface can do that on top of 46cdf0e10cSrcweir an ucb content provider. Method <member>XDocumentTemplates::getContent()</member> 47cdf0e10cSrcweir force that. 48cdf0e10cSrcweir </p> 49cdf0e10cSrcweir */ 50cdf0e10cSrcweirpublished interface XDocumentTemplates: com::sun::star::uno::XInterface 51cdf0e10cSrcweir{ 52cdf0e10cSrcweir //------------------------------------------------------------------------- 53cdf0e10cSrcweir /** privides access to the root of internal used hierarchy 54cdf0e10cSrcweir 55cdf0e10cSrcweir <p> 56cdf0e10cSrcweir This content can be used for accessing the groups directly. 57cdf0e10cSrcweir </p> 58cdf0e10cSrcweir 59cdf0e10cSrcweir @return 60cdf0e10cSrcweir the ucb content for template configuration 61cdf0e10cSrcweir */ 62cdf0e10cSrcweir com::sun::star::ucb::XContent getContent(); 63cdf0e10cSrcweir 64cdf0e10cSrcweir //------------------------------------------------------------------------- 65cdf0e10cSrcweir /** creates the template with the given name in the given group using the 66cdf0e10cSrcweir data from the storable 67cdf0e10cSrcweir 68cdf0e10cSrcweir @param GroupName 69cdf0e10cSrcweir specifies the group 70cdf0e10cSrcweir 71cdf0e10cSrcweir @param TemplateName 72cdf0e10cSrcweir specifies the template 73cdf0e10cSrcweir 74cdf0e10cSrcweir @param Storable 75cdf0e10cSrcweir specifies the target 76cdf0e10cSrcweir 77cdf0e10cSrcweir @return 78cdf0e10cSrcweir <TRUE/> if operation was sucessfully 79cdf0e10cSrcweir <br> 80cdf0e10cSrcweir <FALSE/> otherwise 81cdf0e10cSrcweir 82cdf0e10cSrcweir @see XDocumentTemplates::addTemplate() 83cdf0e10cSrcweir */ 84cdf0e10cSrcweir boolean storeTemplate( 85cdf0e10cSrcweir [in] string GroupName, 86cdf0e10cSrcweir [in] string TemplateName, 87cdf0e10cSrcweir [in] XStorable Storable); 88cdf0e10cSrcweir 89cdf0e10cSrcweir //------------------------------------------------------------------------- 90cdf0e10cSrcweir /** creates the template with the given name in the given group using the 91cdf0e10cSrcweir given URL 92cdf0e10cSrcweir 93cdf0e10cSrcweir @param GroupName 94cdf0e10cSrcweir specifies the group 95cdf0e10cSrcweir 96cdf0e10cSrcweir @param TemplateName 97cdf0e10cSrcweir specifies the template 98cdf0e10cSrcweir 99cdf0e10cSrcweir @param SourceURL 100cdf0e10cSrcweir specifies the position of template 101cdf0e10cSrcweir 102cdf0e10cSrcweir @return 103cdf0e10cSrcweir <TRUE/> if operation was sucessfully 104cdf0e10cSrcweir <br> 105cdf0e10cSrcweir <FALSE/> otherwise 106cdf0e10cSrcweir 107cdf0e10cSrcweir @see XDocumentTemplates::storeTemplate() 108cdf0e10cSrcweir */ 109cdf0e10cSrcweir boolean addTemplate( 110cdf0e10cSrcweir [in] string GroupName, 111cdf0e10cSrcweir [in] string TemplateName, 112cdf0e10cSrcweir [in] string SourceURL); 113cdf0e10cSrcweir 114cdf0e10cSrcweir //------------------------------------------------------------------------- 115cdf0e10cSrcweir /** remove a template from specified group 116cdf0e10cSrcweir 117cdf0e10cSrcweir @param GroupName 118cdf0e10cSrcweir specifies the group which include the template 119cdf0e10cSrcweir 120cdf0e10cSrcweir @param TemplateName 121cdf0e10cSrcweir specifies the template for delete 122cdf0e10cSrcweir 123cdf0e10cSrcweir @return 124cdf0e10cSrcweir <TRUE/> if operation was sucessfully 125cdf0e10cSrcweir <br> 126cdf0e10cSrcweir <FALSE/> otherwise 127cdf0e10cSrcweir */ 128cdf0e10cSrcweir boolean removeTemplate( 129cdf0e10cSrcweir [in] string GroupName, 130cdf0e10cSrcweir [in] string TemplateName); 131cdf0e10cSrcweir 132cdf0e10cSrcweir //------------------------------------------------------------------------- 133cdf0e10cSrcweir /** rename a template inside specified group 134cdf0e10cSrcweir 135cdf0e10cSrcweir @param GroupName 136cdf0e10cSrcweir specifies the group which include the template 137cdf0e10cSrcweir 138cdf0e10cSrcweir @param TemplateName 139cdf0e10cSrcweir specifies the template for renaming 140cdf0e10cSrcweir 141cdf0e10cSrcweir @return 142cdf0e10cSrcweir <TRUE/> if operation was sucessfully 143cdf0e10cSrcweir <br> 144cdf0e10cSrcweir <FALSE/> otherwise 145cdf0e10cSrcweir */ 146cdf0e10cSrcweir boolean renameTemplate( 147cdf0e10cSrcweir [in] string GroupName, 148cdf0e10cSrcweir [in] string OldTemplateName, 149cdf0e10cSrcweir [in] string NewTemplateName); 150cdf0e10cSrcweir 151cdf0e10cSrcweir //------------------------------------------------------------------------- 152cdf0e10cSrcweir /** creates a new group 153cdf0e10cSrcweir 154cdf0e10cSrcweir @param GroupName 155cdf0e10cSrcweir the name of the group to be created 156cdf0e10cSrcweir 157cdf0e10cSrcweir @return 158cdf0e10cSrcweir <TRUE/> if operation was sucessfully 159cdf0e10cSrcweir <br> 160cdf0e10cSrcweir <FALSE/> otherwise 161cdf0e10cSrcweir */ 162cdf0e10cSrcweir boolean addGroup( [in] string GroupName ); 163cdf0e10cSrcweir 164cdf0e10cSrcweir //------------------------------------------------------------------------- 165cdf0e10cSrcweir /** remove an existing group 166cdf0e10cSrcweir 167cdf0e10cSrcweir @param GroupName 168cdf0e10cSrcweir the name of the group to be removed 169cdf0e10cSrcweir 170cdf0e10cSrcweir @return 171cdf0e10cSrcweir <TRUE/> if operation was sucessfully 172cdf0e10cSrcweir <br> 173cdf0e10cSrcweir <FALSE/> otherwise 174cdf0e10cSrcweir */ 175cdf0e10cSrcweir boolean removeGroup( [in] string GroupName ); 176cdf0e10cSrcweir 177cdf0e10cSrcweir //------------------------------------------------------------------------- 178cdf0e10cSrcweir /** rename an existing group 179cdf0e10cSrcweir 180cdf0e10cSrcweir @param OldGroupName 181cdf0e10cSrcweir the old name of the group 182cdf0e10cSrcweir 183cdf0e10cSrcweir @param NewGroupName 184cdf0e10cSrcweir the new name of the group 185cdf0e10cSrcweir 186cdf0e10cSrcweir @return 187cdf0e10cSrcweir <TRUE/> if operation was sucessfully 188cdf0e10cSrcweir <br> 189cdf0e10cSrcweir <FALSE/> otherwise 190cdf0e10cSrcweir */ 191cdf0e10cSrcweir boolean renameGroup( 192cdf0e10cSrcweir [in] string OldGroupName, 193cdf0e10cSrcweir [in] string NewGroupName); 194cdf0e10cSrcweir 195cdf0e10cSrcweir //------------------------------------------------------------------------- 196cdf0e10cSrcweir /** force an update for internal structures 197cdf0e10cSrcweir 198cdf0e10cSrcweir <p> 199cdf0e10cSrcweir Because the templates are well known by links and not as direct content 200cdf0e10cSrcweir they can be outdated. An update force actualization of that to find 201cdf0e10cSrcweir wrong links. 202cdf0e10cSrcweir </p> 203cdf0e10cSrcweir */ 204cdf0e10cSrcweir [oneway] void update(); 205cdf0e10cSrcweir}; 206cdf0e10cSrcweir 207cdf0e10cSrcweir//============================================================================= 208cdf0e10cSrcweir 209cdf0e10cSrcweir}; }; }; }; 210cdf0e10cSrcweir 211cdf0e10cSrcweir#endif 212