Language:

The Free and Open Productivity Suite
Apache OpenOffice 4.1.4 released

Developer's Guide

API

SDK

Tips 'n' Tricks

Miscellaneous


UDK 3.2.7 Java API Reference

com.sun.star.lib.uno.helper
Class Factory

java.lang.Object
  extended by com.sun.star.lib.uno.helper.WeakBase
      extended by com.sun.star.lib.uno.helper.ComponentBase
          extended by com.sun.star.lib.uno.helper.Factory
All Implemented Interfaces:
XComponent, XServiceInfo, XSingleComponentFactory, XTypeProvider, XInterface, XWeak

public class Factory
extends ComponentBase
implements XSingleComponentFactory, XServiceInfo

Factory helper class supporting com.sun.star.lang.XServiceInfo and com.sun.star.lang.XSingleComponentFactory.


Field Summary
 
Fields inherited from class com.sun.star.lib.uno.helper.ComponentBase
bDisposed, bInDispose, listenerContainer
 
Fields inherited from class com.sun.star.lib.uno.helper.WeakBase
_mapImplementationIds, _mapTypes
 
Fields inherited from interface com.sun.star.lang.XSingleComponentFactory
UNOTYPEINFO
 
Fields inherited from interface com.sun.star.lang.XServiceInfo
UNOTYPEINFO
 
Fields inherited from interface com.sun.star.lang.XComponent
UNOTYPEINFO
 
Fields inherited from interface com.sun.star.uno.XWeak
UNOTYPEINFO
 
Fields inherited from interface com.sun.star.lang.XTypeProvider
UNOTYPEINFO
 
Method Summary
static XSingleComponentFactory createComponentFactory(Class impl_class, String[] supported_services)
          Creates an object factory supporting interfaces com.sun.star.lang.XSingleComponentFactory and com.sun.star.lang.XServiceInfo The implementation name is the name of the implementation class.
static XSingleComponentFactory createComponentFactory(Class impl_class, String impl_name, String[] supported_services)
          Creates an object factory supporting interfaces com.sun.star.lang.XSingleComponentFactory and com.sun.star.lang.XServiceInfo
 Object createInstanceWithArgumentsAndContext(Object[] arguments, XComponentContext xContext)
           
 Object createInstanceWithContext(XComponentContext xContext)
           
 String getImplementationName()
           
 String[] getSupportedServiceNames()
           
 boolean supportsService(String service_name)
           
static boolean writeRegistryServiceInfo(String impl_name, String[] supported_services, XRegistryKey xKey)
          Writes component's implementation info to given registry key.
 
Methods inherited from class com.sun.star.lib.uno.helper.ComponentBase
addEventListener, dispose, finalize, postDisposing, preDisposing, removeEventListener
 
Methods inherited from class com.sun.star.lib.uno.helper.WeakBase
getImplementationId, getTypes, queryAdapter
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createComponentFactory

public static XSingleComponentFactory createComponentFactory(Class impl_class,
                                                             String impl_name,
                                                             String[] supported_services)
                                                      throws RuntimeException
Creates an object factory supporting interfaces com.sun.star.lang.XSingleComponentFactory and com.sun.star.lang.XServiceInfo

Parameters:
impl_class - implementation class
impl_name - implementation name
supported_services - services implemented
Returns:
object factory
Throws:
RuntimeException
Since:
UDK 3.2.13

createComponentFactory

public static XSingleComponentFactory createComponentFactory(Class impl_class,
                                                             String[] supported_services)
                                                      throws RuntimeException
Creates an object factory supporting interfaces com.sun.star.lang.XSingleComponentFactory and com.sun.star.lang.XServiceInfo The implementation name is the name of the implementation class.

Parameters:
impl_class - implementation class
supported_services - services implemented
Returns:
object factory
Throws:
RuntimeException

writeRegistryServiceInfo

public static boolean writeRegistryServiceInfo(String impl_name,
                                               String[] supported_services,
                                               XRegistryKey xKey)
Writes component's implementation info to given registry key.

Parameters:
impl_name - name of implementation
supported_services - supported services of implementation
xKey - registry key to write to
Returns:
success

createInstanceWithContext

public final Object createInstanceWithContext(XComponentContext xContext)
                                       throws Exception
Specified by:
createInstanceWithContext in interface XSingleComponentFactory
Throws:
Exception

createInstanceWithArgumentsAndContext

public final Object createInstanceWithArgumentsAndContext(Object[] arguments,
                                                          XComponentContext xContext)
                                                   throws Exception
Specified by:
createInstanceWithArgumentsAndContext in interface XSingleComponentFactory
Throws:
Exception

getImplementationName

public final String getImplementationName()
Specified by:
getImplementationName in interface XServiceInfo

supportsService

public final boolean supportsService(String service_name)
Specified by:
supportsService in interface XServiceInfo

getSupportedServiceNames

public final String[] getSupportedServiceNames()
Specified by:
getSupportedServiceNames in interface XServiceInfo

UDK 3.2.7 Java API Reference

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache and the Apache feather logo are trademarks of The Apache Software Foundation. OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.