/*************************************************************************
 *
 *  $RCSfile: HierarchyDataSource.idl,v $
 *
 *  $Revision: 1.2 $
 *
 *  last change: $Author: kso $ $Date: 2001/07/04 08:22:08 $
 *
 *  The Contents of this file are made available subject to the terms of
 *  either of the following licenses
 *
 *         - GNU Lesser General Public License Version 2.1
 *         - Sun Industry Standards Source License Version 1.1
 *
 *  Sun Microsystems Inc., October, 2000
 *
 *  GNU Lesser General Public License Version 2.1
 *  =============================================
 *  Copyright 2000 by Sun Microsystems, Inc.
 *  901 San Antonio Road, Palo Alto, CA 94303, USA
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License version 2.1, as published by the Free Software Foundation.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 *  MA  02111-1307  USA
 *
 *
 *  Sun Industry Standards Source License Version 1.1
 *  =================================================
 *  The contents of this file are subject to the Sun Industry Standards
 *  Source License Version 1.1 (the "License"); You may not use this file
 *  except in compliance with the License. You may obtain a copy of the
 *  License at http://www.openoffice.org/license.html.
 *
 *  Software provided under this License is provided on an "AS IS" basis,
 *  WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
 *  WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
 *  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
 *  See the License for the specific provisions governing your rights and
 *  obligations concerning the Software.
 *
 *  The Initial Developer of the Original Code is: Sun Microsystems, Inc.
 *
 *  Copyright: 2000 by Sun Microsystems, Inc.
 *
 *  All Rights Reserved.
 *
 *  Contributor(s): _______________________________________
 *
 *
 ************************************************************************/
#ifndef __com_sun_star_ucb_HierarchyDataSource_idl__
#define __com_sun_star_ucb_HierarchyDataSource_idl__

#ifndef __com_sun_star_lang_XMultiServiceFactory_idl__
#include <com/sun/star/lang/XMultiServiceFactory.idl>
#endif
#ifndef __com_sun_star_lang_XComponent_idl__
#include <com/sun/star/lang/XComponent.idl>
#endif

//=============================================================================

module com { module sun { module star { module ucb {

//=============================================================================
/** manages one or more complete sets of hierarchy data and serves as a factory
    for objects that provide access to a subset of the data.

    <p><b>Note:</b> This is an abstract service. This means, that there should
    never be implementations that can be instanciated using the service name
    <code>com.sun.star.ucb.HierarchyDataSource</code>. Each implementation must
    provide its own service name that can be used to create instances of that
    service implementation. Important for those service specifications is also
    to specify which of the optional parts are supported by the implementation.
*/
service HierarchyDataSource
{
	//-------------------------------------------------------------------------
    /** allows creating access objects for specific views such as subsets and
        fragments of the hierrachy data.

        <p>The parameter <var>aServiceSpecifier</var> passed to
        <member scope="com::sun::star::lang">XMultiServiceFactory::createInstanceWithArguments</member>
        supports at least the service specifier
        <code>"com.sun.star.ucb.HierarchyDataReadAccess"</code>, which will
        create a <b>read-only view</b> to the data. The object that is created
        implements the service <type>HierarchyDataReadAccess</type>.

        <p><b>Optionally</b> the factory may support <b>writable views</b>. A
        writable view is requested by passing the service specifier
        <code>"com.sun.star.ucb.HierarchyDataReadWriteAccess"</code> to
        <member scope="com::sun::star::lang">XMultiServiceFactory::createInstanceWithArguments</member>
        The object that is created implements the service
        <type>HierarchyDataReadWriteAccess</type>.

        <p>The arguments passed to
        <member scope="com::sun::star::lang">XMultiServiceFactory::createInstanceWithArguments</member>
        in parameter <var>aArguments</var> specify the view of the data that
        should be created. That is, they determine the subset of elements that
        can be accessed starting from the returned object. Each element of the
        argument sequence should be a
        <type scope="com::sun::star::beans">PropertyValue</type>, so that the
        parameters can be identified by name rather than by position.

        <p>With both of the standard service specifiers above, an implementation
        must accept a property named <code>nodepath</code> of type
        <atom>string</atom>. This property must contain the absolute path to an
        element of the data. The view that is selected consists of the named
        element and all its decendants. A path consists of segments that are
        separated by a single slash ('/'). There is neither a leading nor a
        trailing slash allowed. The <b>root</b> of the hierarchy data always
        has an empty path. Refer to <type>HierarchyDataReadAccess</type> for
        more informtion on hierarchical names.

        <p>Other arguments can be used to control the behavior of the view.
        These are different for different implementations. Whether and how they
        are used may also depend on the configuration store and configuration
        that were selected when the provider was created.

        <p>An implementation must ignore unknown arguments.

        <p>The implementation of
        <member scope="com::sun::star::lang">XMultiServiceFactory::createInstance</member>
        must behave exactly as if
        <member scope="com::sun::star::lang">XMultiServiceFactory::createInstanceWithArguments</member>
        were called passing one single property named <code>nodepath</code>
        where the property value is an empty string. Thus it always creates a
        view to the root of the hierarchy data.
	 */
    interface com::sun::star::lang::XMultiServiceFactory;

	//-------------------------------------------------------------------------
    /** allows controlling or observing the lifetime of the hierarchy data
        source and its views.
	 */
    interface com::sun::star::lang::XComponent;
};

//=============================================================================

}; }; }; };

#endif
