1*34dd1e25SAndrew Rist /************************************************************** 2*34dd1e25SAndrew Rist * 3*34dd1e25SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*34dd1e25SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*34dd1e25SAndrew Rist * distributed with this work for additional information 6*34dd1e25SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*34dd1e25SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*34dd1e25SAndrew Rist * "License"); you may not use this file except in compliance 9*34dd1e25SAndrew Rist * with the License. You may obtain a copy of the License at 10*34dd1e25SAndrew Rist * 11*34dd1e25SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*34dd1e25SAndrew Rist * 13*34dd1e25SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*34dd1e25SAndrew Rist * software distributed under the License is distributed on an 15*34dd1e25SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*34dd1e25SAndrew Rist * KIND, either express or implied. See the License for the 17*34dd1e25SAndrew Rist * specific language governing permissions and limitations 18*34dd1e25SAndrew Rist * under the License. 19*34dd1e25SAndrew Rist * 20*34dd1e25SAndrew Rist *************************************************************/ 21*34dd1e25SAndrew Rist 22*34dd1e25SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir import com.sun.star.uno.*; 25cdf0e10cSrcweir import com.sun.star.task.*; 26cdf0e10cSrcweir import java.util.Vector; 27cdf0e10cSrcweir 28cdf0e10cSrcweir /**************************************************************************/ 29cdf0e10cSrcweir /** helper class for implementing an interaction request. 30cdf0e10cSrcweir */ 31cdf0e10cSrcweir class InteractionRequest implements XInteractionRequest 32cdf0e10cSrcweir { 33cdf0e10cSrcweir private Object m_aRequest; 34cdf0e10cSrcweir private Vector m_aContinuations; 35cdf0e10cSrcweir 36cdf0e10cSrcweir /* ------------------------------------------------------------------ */ InteractionRequest( Object aRequest )37cdf0e10cSrcweir public InteractionRequest( Object aRequest ) 38cdf0e10cSrcweir { 39cdf0e10cSrcweir m_aRequest = aRequest; 40cdf0e10cSrcweir m_aContinuations = new Vector(); 41cdf0e10cSrcweir } 42cdf0e10cSrcweir 43cdf0e10cSrcweir /* ------------------------------------------------------------------ */ addContinuation( XInteractionContinuation xCont )44cdf0e10cSrcweir public void addContinuation( XInteractionContinuation xCont ) 45cdf0e10cSrcweir { 46cdf0e10cSrcweir if ( null != xCont ) 47cdf0e10cSrcweir m_aContinuations.add( xCont ); 48cdf0e10cSrcweir } 49cdf0e10cSrcweir 50cdf0e10cSrcweir /* ------------------------------------------------------------------ */ getRequest( )51cdf0e10cSrcweir public Object getRequest( ) 52cdf0e10cSrcweir { 53cdf0e10cSrcweir return m_aRequest; 54cdf0e10cSrcweir } 55cdf0e10cSrcweir 56cdf0e10cSrcweir /* ------------------------------------------------------------------ */ getContinuations( )57cdf0e10cSrcweir public XInteractionContinuation[] getContinuations( ) 58cdf0e10cSrcweir { 59cdf0e10cSrcweir XInteractionContinuation[] aContinuations = new XInteractionContinuation[ m_aContinuations.size() ]; 60cdf0e10cSrcweir for ( int i=0; i<m_aContinuations.size(); ++i ) 61cdf0e10cSrcweir aContinuations[ i ] = (XInteractionContinuation)m_aContinuations.elementAt( i ); 62cdf0e10cSrcweir return aContinuations; 63cdf0e10cSrcweir } 64cdf0e10cSrcweir }; 65cdf0e10cSrcweir 66