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.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  * @deprecated
35  */
36 public interface OfficeConnection
37 	extends XComponent
38 {
39 	/**
40 	 * Sets a connection URL.
41 	 *
42 	 * @param url This is UNO URL which describes the type of a connection.
43 	 */
setUnoUrl(String url)44 	void setUnoUrl(String url)
45 		throws java.net.MalformedURLException;
46 
47 	/**
48 	 * Sets an AWT container catory.
49 	 *
50 	 * @param containerFactory This is a application provided AWT container
51 	 *	factory.
52 	 */
setContainerFactory(ContainerFactory containerFactory)53 	void setContainerFactory(ContainerFactory containerFactory);
54 
55 	/**
56 	 * Retrives the UNO component context.
57 	 * Establishes a connection if necessary and initialises the
58 	 * UNO service manager if it has not already been initialised.
59 	 *
60 	 * @return The office UNO component context.
61 	 */
getComponentContext()62 	XComponentContext getComponentContext();
63 
64 	/**
65 	 * Creates an office window.
66 	 * The window is either a sub-class of java.awt.Canvas (local) or
67 	 * java.awt.Container (RVP).
68 	 *
69 	 * This method does not add add the office window to its container.
70 	 *
71 	 * @param container This is an AWT container.
72 	 * @return The office window instance.
73 	 */
createOfficeWindow(Container container)74 	OfficeWindow createOfficeWindow(Container container);
75 }
76