1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 package com.sun.star.comp.beans;
25 
26 import java.awt.Container;
27 
28 import com.sun.star.lang.XComponent;
29 import com.sun.star.uno.XComponentContext;
30 
31 /**
32  * This abstract class reprecents a connection to the office
33  * application.
34 
35     @deprecated
36  */
37 public interface OfficeConnection
38 	extends XComponent
39 {
40 	/**
41 	 * Sets a connection URL.
42 	 *
43 	 * @param url This is UNO URL which describes the type of a connection.
44 	 */
setUnoUrl(String url)45 	void setUnoUrl(String url)
46 		throws java.net.MalformedURLException;
47 
48 	/**
49 	 * Sets an AWT container catory.
50 	 *
51 	 * @param containerFactory This is a application provided AWT container
52 	 *	factory.
53 	 */
setContainerFactory(ContainerFactory containerFactory)54 	void setContainerFactory(ContainerFactory containerFactory);
55 
56 	/**
57 	 * Retrives the UNO component context.
58 	 * Establishes a connection if necessary and initialises the
59 	 * UNO service manager if it has not already been initialised.
60 	 *
61 	 * @return The office UNO component context.
62 	 */
getComponentContext()63 	XComponentContext getComponentContext();
64 
65 	/**
66 	 * Creates an office window.
67 	 * The window is either a sub-class of java.awt.Canvas (local) or
68 	 * java.awt.Container (RVP).
69 	 *
70 	 * This method does not add add the office window to its container.
71 	 *
72 	 * @param container This is an AWT container.
73 	 * @return The office window instance.
74 	 */
createOfficeWindow(Container container)75 	OfficeWindow createOfficeWindow(Container container);
76 }
77