//
// CIMClient.java
//
// The contents of this file are subject to the SNIA Public License Version 1.0
// (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.snia.org/resources/openSource.html
//
// Software distributed under the License is distributed on an "AS IS" basis,
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the 
// License for the specific language governing rights and limitations
// under the License.
//
// The Original Code is CIMClient.java
// 
// The Initial Developer of the Original Code is David Simons.
//
// Contributor(s): Viktor Mihajlovski,Frank Piorko, Adrian Schuur,
// Nag Boranna.
//
// This source uses the Solaris WBEM APIs version 2.2. 
// Synchronization will be maintained with the Solaris WBEM APIS,
// which are being standardized through the Java Community Process.
//
//
// $Id: CIMClient.java,v 1.1 2003/07/17 18:32:55 kumpf Exp $
//
//
package org.snia.wbem.client;

import java.io.*;
import java.util.Enumeration;
import java.util.Vector;
import java.util.Hashtable;
import java.net.*;
import java.text.MessageFormat;
import org.snia.wbem.cim.*;
import org.snia.wbemcmd.cimom.*;
//import org.snia.wbemcmd.cimom.CIMOMHandleXML;
//import org.snia.wbemcmd.cimom.CIMOMHandleSNIA;
//import org.snia.wbemcmd.cimom.CIMFeatures;



/**
 * This class provides the interface that a CIM Client can use to perform 
 * CIM operations with CIM Object Manager on the specified host. It connects
 * to CIM object manager for this client session to perform CIM operations, 
 * such as, adding, modifying, or deleting a CIM class, CIM instance, and CIM 
 * qualifier type in a namespace. 
 *
 */
public class CIMClient implements CIMOMHandle 
{
    /** Handle for the CIM Object Manager */
    CIMOMHandleSNIA ch=null; 

    /** Requested name space */
    CIMNameSpace ns=null;     

    /** Constant indicating the Query Language. */
    public static final int WQL=0;

    /** Constant indicating the Query Language.*/
    public static final int WQL1=1;

    /** Constant indicating the Query Language.*/
    public static final int WQL2=2;

    /** Constant indicating the CIM operations over HTTP protocol. */
    public static final int HTTP=2; 

    /** Constant indicating the CIM operations over HTTP protocol. */
    public static final int XML=2; 

    // As per the sun definition:
    // DEEP instance enumeration = the class instances and all
    //                instances of its subclasses. 
    // DEEP class enumeration = all subclasses but not
    //                the class requested

    /** Constant indicating deep inheritance. */
    public static final boolean DEEP = true;  

    /**
     * preCheck() ensures there is a handle in place. In the case
     * of a object path being specified it also ensures that a
     * namespace is assigned into the path. Note that the namespace
     * isn't necessarily known by the user of the handle because it
     * was specified when the CIMClient was created and the caller
     * may not wish to track this.
     *
     * @throws CIMException - If the CIMOM handle is null, then it
     *     returns the status code CIM_ERR_FAILED.
     */ 
    private void preCheck() throws CIMException 
    {
        if (ch==null)
        {
            throw new CIMException(CIMException.CIM_ERR_FAILED,
                       "Not bound to a cimom");
        }
    }
        
    /**
     * preCheck() ensures there is a handle in place. In the case
     * of a object path being specified it also ensures that a
     * namespace is assigned into the path. Note that the namespace
     * isn't necessarily known by the user of the handle because it
     * was specified when the CIMClient was created and the caller
     * may not wish to track this.
     *
     * @param opath - The CIMObjectPath 
     *
     * @throws CIMException - If the CIMOM handle is null, then it
     *     returns the status code CIM_ERR_FAILED.
     */ 
    private void preCheck(CIMObjectPath opath) throws CIMException 
    {
        if (ch==null)
        {
            throw new CIMException(CIMException.CIM_ERR_FAILED,
                       "Not bound to a cimom");
        }
        //
        // always use this CIMClient's host name
        // use the namespace if one hasn't been set
        //
        String curNameSpace=opath.getNameSpace();
        if (curNameSpace==null || curNameSpace.equals(CIMObjectPath.NOT_SET))
        {
            opath.setNameSpace(ns.getNameSpace());
        }
        opath.setHost(ns.getHost());
    }
    

    /**
     * Creates a new client connection to the CIM Object Manager on the 
     * host and namespace specified in the CIMNamespace object, using 
     * the specified username and password to authenticate the client 
     * user identity to the CIM Object Manager. This connection uses 
     * HTTP protocol to send messages to the CIM Object Manager. 
     *
     * @param name - The namespace in which operations will be performed.
     *
     * @param userName - The user name for authentication.
     *
     * @param password - The user password for authentication.
     *
     * @throws CIMException - If unsuccessful, one of the following status
     * codes may be returned.
     *     CIM_ERR_ACCESS_DENIED,
     *     CIM_ERR_NOT_SUPPORTED,
     *     CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
     *         unrecognized or otherwise incorrect parameters),
     *     CIM_ERR_FAILED (some other unspecified error occurred)
     */
    public CIMClient(
        CIMNameSpace name, 
        String userName, 
        String password) throws CIMException 
    {
        this(name, userName, password, HTTP);
    }


    /**
     * Creates a new client connection to the CIM Object Manager on the 
     * host and namespace specified in the CIMNamespace object using the
     * specified protocol. Uses the specified username and password to 
     * authenticate the client user identity to the CIM Object Manager. 
     *
     * @param name - The namespace in which operations will be performed.
     *
     * @param userName - The user name for authentication.
     *
     * @param password - The user password for authentication.
     *
     * @param protocol - The protocol to use for sending messages to 
     *     CIM Object Manager, e.g., XML/HTTP.
     *
     * @throws CIMException - If unsuccessful, one of the following status
     * codes may be returned.
     *     CIM_ERR_ACCESS_DENIED,
     *     CIM_ERR_NOT_SUPPORTED,
     *     CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
     *         unrecognized or otherwise incorrect parameters),
     *     CIM_ERR_FAILED (some other unspecified error occurred)
     */
    public CIMClient(
        CIMNameSpace name,
        String userName,
        String password,
        int protocol)throws CIMException
    {
        if (name.getNameSpace()!=null)
        {
            ns = new CIMNameSpace(name.getHostURL().toString(),
                    name.getNameSpace());
        }

        if (protocol == HTTP)
        {
            ch = new CIMOMHandleXML(name);
        }
        /* Other protocol types not supported */
        //else if (type==RMI)
        //    ch=new CIMOMHandleRMI(name);
        //else if (type==LOCAL)
        //    ch=new CIMOMHandleLocal();
        else
        {
            throw new CIMException("Specified protocol type not supported.");
        }

        ch.authenticate(userName, password);
    }

    /**
     * Closes the client connection to the CIM Object Manager.
     *
     * @throws CIMException - If unsuccessful, one of the following status
     * codes may be returned.
     *     CIM_ERR_ACCESS_DENIED,
     *     CIM_ERR_NOT_SUPPORTED,
     *     CIM_ERR_FAILED (some other unspecified error occurred)
     */
    public void close() throws CIMException 
    {
        ch.close();
        ch = null;
        ns = null;
    }

    /**
     * Sets the namespace used by the CIMClient to the specified namespace.
     *
     * @param name - The CIMNameSpace to be set.
     *
     */
    public void setNameSpace(CIMNameSpace name)
    {
        if (name.getNameSpace()!=null)
        {
            ns = new CIMNameSpace(name.getHostURL().toString(),
                    name.getNameSpace());
        }
    }

    /**
     * Gets the namespace used by the CIMClient.
     *
     * @return CIMNameSpace - the target namespace.
     *
     */
    public CIMNameSpace getNameSpace()
    {
        return ns;
    }

    /**
     * Sets the CIMClient timeout in milliseconds.
     *
     * @param timeout - Time in milliseconds. A timeout of zero is
     * interpreted as an infinite timeout.
     *
     * @throws CIMException - If unsuccessful, the following status code 
     * will be returned.
     *     CIM_ERR_FAILED (If not bound to a cimom)
     */
    public void setTimeout(int timeout) throws CIMException
    {
        preCheck();
        ch.setTimeout(timeout);
    }

    /**
     * Gets the CIMClient timeout.
     *
     * @return Time in milliseconds.
     *
     * @throws CIMException - If unsuccessful, the following status code 
     * will be returned.
     *     CIM_ERR_FAILED (If not bound to a cimom)
     */
    public int getTimeout() throws CIMException
    {
        preCheck();
        return (ch.getTimeout());
    }

    /**
     * Creates a CIM namespace, a directory containing CIM classes and 
     * CIM instances. When a client application connects to the CIM Object 
     * Manager, it specifies a namespace. All subsequent operations occur 
     * within that namespace on the CIM  Object Manager.
     *
     * @param name - The CIMNameSpace object that specifies the host name
     * and namespace.
     *     
     * @throws CIMException - If unsuccessful, one of the following status
     * codes may be returned.
     * 
     *     CIM_ERR_ACCESS_DENIED,
     *     CIM_ERR_NOT_SUPPORTED,
     *     CIM_ERR_INVALID_PARAMETER (including missing, duplicate, 
     *         unrecognized or otherwise incorrect parameters),
     *     CIM_ERR_ALREADY_EXISTS (if namespace already exist),
     *     CIM_ERR_FAILED (some other unspecified error occurred)
     */
    public void createNameSpace(CIMNameSpace name) throws CIMException
    {
        preCheck();
        ch.createNameSpace(name);
    }

    /**
     * Deletes the specified namespace on the specified host. 
     *
     * @param name - The CIMNameSpace object that identifies the namespace 
     * to be deleted.
     *
     * @throws CIMException - If unsuccessful, one of the following status
     * codes may be returned.
     * 
     *     CIM_ERR_ACCESS_DENIED,
     *     CIM_ERR_NOT_SUPPORTED,
     *     CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
     *         unrecognized or otherwise incorrect parameters),
     *     CIM_ERR_NOT_FOUND (if namespace does not exist),
     *     CIM_ERR_FAILED (some other unspecified error occurred)
     */
    public void deleteNameSpace(CIMNameSpace name) throws CIMException
    {
        preCheck();
        ch.deleteNameSpace(name);
    }

    /**
     * Enumerates the namespaces within the specified path.
     *
     * @param path - The CIMObjectPath identifying the namespace to be 
     * enumerated.
     *
     * @param deepInheritance - If set to true, the enumeration returned will 
     * contain the entire hierarchy of namespaces present under the specified 
     * namespace. If set to false the enumeration will return only the first 
     * level children of the enumerated namespace. 
     *
     * @return Enumeration of namespace names as CIMObjectPath. NULL is 
     * returned if no namespaces are found. 
     *
     * @throws CIMException - If unsuccessful, one of the following status
     * codes may be returned.
     * 
     *     CIM_ERR_ACCESS_DENIED,
     *     CIM_ERR_NOT_SUPPORTED,
     *     CIM_ERR_INVALID_NAMESPACE,
     *     CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
     *         unrecognized or otherwise incorrect parameters),
     *     CIM_ERR_FAILED (some other unspecified error occurred)
     */
    public Enumeration enumerateNameSpaces(
        CIMObjectPath path, 
        boolean deepInheritance) throws CIMException 
    {
        Enumeration en;
        
        preCheck(path);
        en = ch.enumerateNameSpaces(path, deepInheritance);
        return(en);
    }

    /**
     * Enumerates the namespaces within the specified path.
     *
     * @deprecated
     * @see #enumerateNameSpaces
     */
    public Enumeration enumNameSpace(
        CIMObjectPath path, 
        boolean deepInheritance) throws CIMException 
    {
        return(this.enumerateNameSpaces(path, deepInheritance));
    }

    /**
     * This method executes a CIM operation that returns a single CIM Class 
     * from the target Namespace where the CIMObjectPath input parameter 
     * defines the name of the class to be retrieved. The entire class 
     * contents (and not just the class names) are returned. 
     *
     * @param path - The CIMObjectPath that identifies the CIMClass to be
     * retrieved.
     *
     * @param localOnly - If set to true, non-inherited properties and methods
     * are returned. If set to false, all elements are returned. This parameter 
     * therefore effects a CIM Server-side mechanism to filter certain elements 
     * of the returned object based on whether or not they have been propagated 
     * from the parent Class (as defined by the PROPAGATED attribute).
     *
     * @param includeQualifiers - If set to true, all Qualifiers for the Class 
     * will be included in the response. If set to false, no Qualifiers are 
     * included.
     *
     * @param includeClassOrigin - If set to true, the CLASSORIGIN attribute 
     * will be present on all appropriate elements in the returned Class. 
     * If set to false, no CLASSORIGIN attributes will be present in the 
     * returned Class.
     *
     * @param PropertyList - If not NULL, the members of the array define one 
     * or more Property names.  The returned Class will not include elements 
     * for any Properties missing from this list. Note that if localOnly is 
     * specified as true this acts as an additional filter on the set of 
     * properties returned (for example, if Property A is included in the 
     * PropertyList but LocalOnly is set to true and A is not local to the 
     * requested Class, then it will not be included in the response). If the 
     * PropertyList input parameter is an empty array this signifies that no 
     * Properties are included in the response. If the PropertyList input 
     * parameter is NULL this specifies that all Properties (subject to the 
     * conditions expressed by the other parameters) are included in the 
     * response. 
     *
     * @return The CIM class identified by the CIMObjectPath.
     *
     * @throws CIMException - If unsuccessful, one of the following status 
     * codes may be returned. 
     * 
     *   CIM_ERR_ACCESS_DENIED,
     *   CIM_ERR_INVALID_NAMESPACE,
     *   CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized or
     *     otherwise incorrect parameters),
     *   CIM_ERR_NOT_FOUND (the request CIM Class does not exist in the
     *     specified namespace) 
     *   CIM_ERR_FAILED (some other unspecified error occurred)
     */
    public CIMClass getClass(
        CIMObjectPath path,
        boolean localOnly,
        boolean includeQualifiers,
        boolean includeClassOrigin,
        String propertyList[]) throws CIMException
    {
        preCheck(path);
        return(ch.getClass(path, localOnly, includeQualifiers, 
            includeClassOrigin, propertyList));
    }

    /**
     * This method executes a CIM operation that returns a single CIM Class 
     * from the target Namespace where the CIMObjectPath input parameter 
     * defines the name of the class to be retrieved. The entire class 
     * contents (and not just the class names) are returned. 
     *
     * @param path - The CIMObjectPath that identifies the CIMClass to be
     * retrieved.
     *
     * @param localOnly - If set to true, non-inherited properties and methods
     * are returned. If set to false, all elements are returned. This parameter 
     * therefore effects a CIM Server-side mechanism to filter certain elements 
     * of the returned object based on whether or not they have been propagated 
     * from the parent Class (as defined by the PROPAGATED attribute).
     *
     * @deprecated
     * @see #getClass
     //* @see #getClass(CIMObjectPath path, boolean localOnly,
     //   boolean includeQualifiers, boolean includeClassOrigin,
     //   String propertyList[])
     */
    public CIMClass getClass(
        CIMObjectPath path,
        boolean localOnly) throws CIMException
    {
        return(this.getClass(path, localOnly, true, false, null));
    }

    /**
     * Gets the CIM instance for the specified CIM object path. 
     *
     * @param path - The CIMObjectPath that identifies the CIM Instance to be
     * retrieved.
     *
     * @param localOnly - If set to true, non-inherited properties and methods
     * are returned. If set to false, all elements are returned. This parameter 
     * therefore effects a CIM Server-side mechanism to filter certain elements 
     * of the returned object based on whether or not they have been propagated 
     * from the parent Class (as defined by the PROPAGATED attribute).
     *
     * @param includeQualifiers - If set to true, all Qualifiers for the 
     * Instance will be included in the response. If set to false, no 
     * Qualifiers are included.
     *
     * @param includeClassOrigin - If set to true, the CLASSORIGIN attribute 
     * will be present on all appropriate elements in the returned Instance. 
     * If set to false, no CLASSORIGIN attributes will be present in the 
     * returned Instance.
     *
     * @param PropertyList - If not NULL, the members of the array define one 
     * or more Property names.  The returned Class will not include elements 
     * for any Properties missing from this list. Note that if localOnly is 
     * specified as true this acts as an additional filter on the set of 
     * properties returned (for example, if Property A is included in the 
     * PropertyList but LocalOnly is set to true and A is not local to the 
     * requested Class, then it will not be included in the response). If the 
     * PropertyList input parameter is an empty array this signifies that no 
     * Properties are included in the response. If the PropertyList input 
     * parameter is NULL this specifies that all Properties (subject to the 
     * conditions expressed by the other parameters) are included in the 
     * response. 
     *
     * @return The CIM Instance identified by the CIMObjectPath.
     *
     * @throws CIMException - If unsuccessful, one of the following status 
     * codes may be returned. 
     * 
     *   CIM_ERR_ACCESS_DENIED,
     *   CIM_ERR_INVALID_NAMESPACE,
     *   CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized or
     *     otherwise incorrect parameters),
     *   CIM_ERR_INVALID_CLASS (in this namespace),
     *   CIM_ERR_NOT_FOUND (the requested instance does not exist),
     *   CIM_ERR_NOT_SUPPORTED (provider does not support this method),
     *   CIM_ERR_FAILED (some other unspecified error occurred)
     */
    public CIMInstance getInstance(
        CIMObjectPath path,
        boolean localOnly,
        boolean includeQualifiers,
        boolean includeClassOrigin,
        String propertyList[]) throws CIMException
    {
        CIMInstance instance;
        
        preCheck(path);
        instance=ch.getInstance(path, localOnly, includeQualifiers, 
            includeClassOrigin, propertyList);
        return(instance);
    }

    /**
     * Gets the CIM instance for the specified CIM object path. 
     *
     * @param path - The CIMObjectPath that identifies the CIM Instance to be
     * retrieved.
     *
     * @param localOnly - If set to true, non-inherited properties and methods
     * are returned. If set to false, all elements are returned. This parameter 
     * therefore effects a CIM Server-side mechanism to filter certain elements 
     * of the returned object based on whether or not they have been propagated 
     * from the parent Class (as defined by the PROPAGATED attribute).
     *
     * @deprecated
     * @see #getInstance
     //* @see #getInstance(CIMObjectPath path, boolean localOnly,
     //  boolean includeQualifiers, boolean includeClassOrigin,
     //  String propertyList[])
     */
    public CIMInstance getInstance(
        CIMObjectPath path,
        boolean localOnly) throws CIMException
    {
        return(this.getInstance(path, localOnly, false, false, null));
    }

    /**
     * Deletes a single CIM Class from the target Namespace for the object 
     * specified by the CIMobjectpath.
     *
     * @param path - The CIMObjectPath identifying the name of the class to 
     * be deleted. 
     *
     * @throws CIMException - If unsuccessful, one of the following status 
     * codes may be returned.
     *
     *     CIM_ERR_ACCESS_DENIED,
     *     CIM_ERR_NOT_SUPPORTED,
     *     CIM_ERR_INVALID_NAMESPACE,
     *     CIM_ERR_INVALID_PARAMETER (including missing, duplicate, 
     *         unrecognized or otherwise incorrect parameters),
     *     CIM_ERR_NOT_FOUND (the CIM Class to be deleted does not exisT),
     *     CIM_ERR_CLASS_HAS_CHILDREN (the CIM Class has one or more 
     *         subclasses which cannot be deleted),
     *     CIM_ERR_CLASS_HAS_INSTANCES (the CIM Class has one or more 
     *         instances which cannot be deleted),
     *     CIM_ERR_FAILED (some other unspecified error occurred)
     */
    public void deleteClass(CIMObjectPath path) throws CIMException
    {
        preCheck(path);
        ch.deleteClass(path);
    }

    /**
     * Deletes the CIM instance specified by the CIM object path from 
     * the target Namespace. 
     *
     * @param path - The CIMObjectPath identifying the name (model path) 
     * of the Instance to be deleted.  
     *
     * @throws CIMException - If unsuccessful, one of the following status
     * codes may be returned.
     *
     *     CIM_ERR_ACCESS_DENIED,
     *     CIM_ERR_NOT_SUPPORTED (provider does not support this method),
     *     CIM_ERR_INVALID_NAMESPACE,
     *     CIM_ERR_INVALID_PARAMETER (including missing, duplicate, 
     *         unrecognized or otherwise incorrect parameters),
     *     CIM_ERR_INVALID_CLASS (in this namespace),
     *     CIM_ERR_NOT_FOUND (if instance does not exist),
     *     CIM_ERR_FAILED (some other unspecified error occurred)
     */
    public void deleteInstance(CIMObjectPath path) throws CIMException
    {
        preCheck(path);
        ch.deleteInstance(path);
    }

    /**
     * Creates a single CIM class in the target namespace. 
     *
     * @param path - The CIMObjectPath identifying the CIM Class to be created.
     *
     * @param newClass - CIMClass to be created.  
     *
     * @throws CIMException - If unsuccessful, one of the following status
     * codes may be returned.
     *
     *     CIM_ERR_ACCESS_DENIED, 
     *     CIM_ERR_NOT_SUPPORTED, 
     *     CIM_ERR_INVALID_NAMESPACE, 
     *     CIM_ERR_INVALID_PARAMETER (including missing, duplicate, 
     *         unrecognized or otherwise incorrect parameters),
     *     CIM_ERR_ALREADY_EXISTS (the CIM Class already exists), 
     *     CIM_ERR_INVALID_SUPERCLASS (the putative CIM Class declares a 
     *         non-existent superclass), 
     *     CIM_ERR_FAILED (some other unspecified error occurred)
     */
    public void createClass(
        CIMObjectPath path,
        CIMClass newClass) throws CIMException 
    {
        preCheck(path);
        ch.createClass(path, newClass);
    }

    /**
     * Creates the specified CIM Instance in the specified namespace. 
     *
     * @param path - The CIMObjectPath identifying the CIM Instance to be 
     * created and the target namespace.
     *
     * @param newClass - CIMInstance to be created.  
     *
     * @throws CIMException - If unsuccessful, one of the following status
     * codes may be returned.
     *
     *     CIM_ERR_ACCESS_DENIED,
     *     CIM_ERR_NOT_SUPPORTED (provider does not support this method),
     *     CIM_ERR_INVALID_NAMESPACE,
     *     CIM_ERR_INVALID_PARAMETER (for this method),
     *     CIM_ERR_INVALID_CLASS (in this namespace),
     *     CIM_ERR_ALREADY_EXISTS (the CIM Instance already exists),
     *     CIM_ERR_FAILED (some other unspecified error occurred)
     */
    public CIMObjectPath createInstance(
        CIMObjectPath path,
        CIMInstance newInstance) throws CIMException
    {
        preCheck(path);
        return(ch.createInstance(path, newInstance));
    }

    /**
     * Modifies an existing CIM Class in the target Namespace. The Class MUST 
     * already exist.
     *
     * @param path - The CIMObjectPath identifying the CIM Class 
     * to be modified and the target namespace.
     *
     * @param modifiedClass - CIMClass to be modified.  
     *
     * @throws CIMException - If unsuccessful, one of the following status
     * codes may be returned.
     *
     *     CIM_ERR_ACCESS_DENIED,
     *     CIM_ERR_NOT_SUPPORTED,
     *     CIM_ERR_INVALID_NAMESPACE,
     *     CIM_ERR_INVALID_PARAMETER (including missing, duplicate, 
     *         unrecognized or otherwise incorrect parameters),
     *     CIM_ERR_INVALID_SUPERCLASS (the putative CIM Class declares a
     *         non-existent superclass),
     *     CIM_ERR_CLASS_HAS_CHILDREN (the modification could not be performed
     *         because it was not possible to update the subclasses of the
     *         Class in a consistent fashion),
     *     CIM_ERR_CLASS_HAS_INSTANCES (the modification could not be performed
     *         because it was not possible to update the instances of the 
     *         Class in a consistent fashion)  
     *     CIM_ERR_FAILED (some other unspecified error occurred)
     */
    public void modifyClass(
        CIMObjectPath path,
        CIMClass modifiedClass) throws CIMException
    {
        preCheck(path);
        ch.modifyClass(path, modifiedClass);
    }


    /**
     * Modifies the specified CIM Class in the target Namespace. 
     * The Class MUST already exist.
     *
     * @param path - The CIMObjectPath identifying the CIM Class 
     * to be modified and the target namespace.
     *
     * @param cimClass - CIMClass to be modified.  
     *
     * @deprecated
     * @see #modifyClass
     */
    public void setClass(
        CIMObjectPath path,
        CIMClass cimClass) throws CIMException 
    {
        preCheck(path);
        ch.setClass(path,cimClass);
    }

    /**
     * Modifies the specified CIM Instance in the target Namespace. 
     * The Instance MUST already exist.
     *
     * @param path - The CIMObjectPath identifying the CIM Instance
     * to be modified and the target namespace.
     *
     * @param modifiedInstance - CIMInstance to be modified.  
     *
     * @param includeQualifiers - If set to true, the Qualifiers are modified 
     * as specified in the modifiedInstance.  If set to false, Qualifiers in
     * the modifiedInstance are ignored and no Qualifiers are explicitly 
     * modified in the specified Instance. 
     *
     * @param PropertyList - If the PropertyList input parameter is not NULL, 
     * the members of the array define one or more Property names. Only those 
     * properties specified in the PropertyList are modified as specified in 
     * the modifiedInstance.  Properties of the modifiedInstance that are 
     * missing from the PropertyList are ignored.  If the PropertyList is an 
     * empty array, then no Properties are explicitly modified in the 
     * specified Instance. If the PropertyList is NULL, then all Properties 
     * are updated in the specified Instance. 
     *
     * @throws CIMException - If unsuccessful, one of the following status
     * codes may be returned.
     *
     *     CIM_ERR_ACCESS_DENIED,
     *     CIM_ERR_NOT_SUPPORTED,
     *     CIM_ERR_INVALID_NAMESPACE ,
     *     CIM_ERR_INVALID_PARAMETER (including missing, duplicate, 
     *         unrecognized or otherwise incorrect parameters),
     *     CIM_ERR_INVALID_CLASS (the CIM Class of which this is to be a 
     *         new Instance does not exist) 
     *     CIM_ERR_NOT_FOUND (the CIM Instance does not exist),
     *     CIM_ERR_FAILED (some other unspecified error occurred)
     */
    public void modifyInstance(
        CIMObjectPath path,
        CIMInstance modifiedInstance,
        boolean includeQualifiers,
        String propertyList[]) throws CIMException
    {
        preCheck(path);
        ch.modifyInstance(path, modifiedInstance, includeQualifiers, 
            propertyList);
    }

    /**
     * Modifies the specified CIM Instance in the target Namespace. 
     * The Instance MUST already exist.
     *
     * @param path - The CIMObjectPath identifying the CIM Instance
     * to be modified and the target namespace.
     *
     * @param cimInstance - CIMInstance to be modified.  
     *
     * @deprecated
     * @see #modifyInstance
     */
    public void setInstance(
        CIMObjectPath path,
        CIMInstance cimInstance) throws CIMException
    {
        preCheck(path);
        ch.setInstance(path,cimInstance);
    }


    /**
     * Enumerates the subclasses (with all properties) of the CIM Class 
     * specified in the path in the target Namespace. 
     *
     * @param path - The CIMObjectPath identifying the CIM Class for 
     * which the subclasses to be enumerated.
     *
     * @param deepInheritance - If set to  true, all subclasses of the specified 
     * Class are returned. If set to false, only immediate child subclasses are 
     * returned.
     *
     * @param localOnly - If set to true, only CIM Elements (properties, 
     * methods and qualifiers) defined or overridden within the definition 
     * of the Class (as specified in the classname input parameter) are 
     * returned. If set to false, all elements are returned.  
     *
     * @param includeQualifiers - If set to true, all Qualifiers for each Class 
     * (including Qualifiers on the Class and on any returned Properties, 
     * Methods or Method Parameters) are included as <QUALIFIER> elements 
     * in the response. If set to false, no <QUALIFIER> elements are included 
     * in each returned Class.
     *
     * @param includeClassOrigin - If set to true, the CLASSORIGIN attribute 
     * will be present on all appropriate elements in the returned Class. 
     * If set to false, no CLASSORIGIN attributes will be present in the 
     * returned Class.
     *
     * @return Enumeration - If successful, returns zero or more Classes that 
     * meet the requested criteria.
     *
     * @throws CIMException If unsuccessful, one of the following status codes 
     * may be returned.
     *
     *     CIM_ERR_ACCESS_DENIED,
     *     CIM_ERR_NOT_SUPPORTED,
     *     CIM_ERR_INVALID_NAMESPACE,
     *     CIM_ERR_INVALID_PARAMETER (including missing, duplicate, 
     *         unrecognized or otherwise incorrect parameters),
     *     CIM_ERR_INVALID_CLASS (the CIM Class that is the basis for this 
     *         enumeration does not exist), 
     *     CIM_ERR_FAILED (some other unspecified error occurred)
     */
    public Enumeration enumerateClasses(
        CIMObjectPath path,
        boolean deepInheritance,
        boolean localOnly,
        boolean includeQualifiers,
        boolean includeClassOrigin) throws CIMException
    {
        Enumeration en;
        
        preCheck(path);
        en = ch.enumerateClasses(path, deepInheritance, localOnly, 
            includeQualifiers, includeClassOrigin);
        return(en);
    }

    /**
     * Enumerates the subclasses (with all properties) of the CIM Class 
     * specified in the path in the target Namespace. 
     *
     * @param path - The CIMObjectPath identifying the CIM Class for 
     * which the subclasses to be enumerated.
     *
     * @param deepInheritance - If set to  true, all subclasses of the specified 
     * Class are returned. If set to false, only immediate child subclasses are 
     * returned.
     *
     * @param localOnly - If set to true, only CIM Elements (properties, 
     * methods and qualifiers) defined or overridden within the definition 
     * of the Class (as specified in the classname input parameter) are 
     * returned. If set to false, all elements are returned.  
     *
     * @deprecated
     * @see #enumerateClasses
     */
    public Enumeration enumClass(
        CIMObjectPath path,
        boolean deepInheritance,
        boolean localOnly) throws CIMException 
    {
        return(this.enumerateClasses(path, deepInheritance, localOnly,
            true, false));
    }
           
    /**
     * Enumerates the names of subclasses of the CIM Class specified in 
     * the path in the target Namespace. 
     *
     * @param path - The CIMObjectPath identifying the CIM Class for 
     * which the names of subclasses to be enumerated.
     *
     * @param deepInheritance - If set to true, names of all subclasses of 
     * the specified Class should be returned. If set to false, only the 
     * names of immediate child subclasses are returned.
     *
     * @return Enumeration - If successful, returns zero or more names of 
     * Classes that meet the requested criteria.
     *
     * @throws CIMException - If unsuccessful, one of the following status 
     * codes may be returned.
     *
     *     CIM_ERR_ACCESS_DENIED,
     *     CIM_ERR_NOT_SUPPORTED,
     *     CIM_ERR_INVALID_NAMESPACE,
     *     CIM_ERR_INVALID_PARAMETER (including missing, duplicate, 
     *         unrecognized or otherwise incorrect parameters),
     *     CIM_ERR_INVALID_CLASS (the CIM Class that is the basis for this 
     *         enumeration does not exist),
     *     CIM_ERR_FAILED (some other unspecified error occurred)
     */
    public Enumeration enumerateClassNames(
        CIMObjectPath path,
        boolean deepInheritance) throws CIMException
    {
        Enumeration en;
        
        preCheck(path);
        en = ch.enumerateClassNames(path, deepInheritance);
        return(en);
    }
           
    /**
     * Enumerates the names of subclasses of the CIM Class specified in 
     * the path in the target Namespace. 
     *
     * @param path - The CIMObjectPath identifying the CIM Class for 
     * which the names of subclasses to be enumerated.
     *
     * @param deepInheritance - If set to true, names of all subclasses of 
     * the specified Class should be returned. If set to false, only the 
     * names of immediate child subclasses are returned.
     *
     * @deprecated
     * @see #enumerateClassNames
     */
    public Enumeration enumClass(
        CIMObjectPath path,
        boolean deepInheritance) throws CIMException 
    {
        return(this.enumerateClassNames(path, deepInheritance));
    }

    /**
     * Enumerates instances of the specified CIM Class in the 
     * target Namespace.
     *
     * @param path - The CIMObjectPath identifying the CIM Class
     * to be enumerated.
     *
     * @param deepInheritance - If set to true, the enumeration returned 
     * will contain the contents of all the subclasses, in-addition to 
     * those of the specified class. If set to false, the enumeration will 
     * return only the contents of the first level children of the 
     * specified class. 
     *
     * @param localOnly - If set to true, only CIM Elements (properties, 
     * methods and qualifiers) defined or overridden within the definition 
     * of the Class are returned. If set to false, all elements are returned.  
     *
     * @param includeQualifiers - If set to true, all Qualifiers for each 
     * Instance (including Qualifiers on the Instance and on any returned 
     * Properties) are included as <QUALIFIER> elements in the response. 
     * If set to false, no <QUALIFIER> elements are included in each 
     * returned Instance.
     *
     * @param includeClassOrigin - If set to true, the CLASSORIGIN attribute 
     * will be present on all appropriate elements in the returned Instance. 
     * If set to false, no CLASSORIGIN attributes will be present in the 
     * returned Instance.
     *
     * @param propertyList -
     * @param PropertyList - If the PropertyList input parameter is not NULL, 
     * the members of the array define one or more Property names. Only those 
     * properties specified in the PropertyList are included in the returned
     * instances.
     * If the PropertyList is an empty array, then no Properties are included
     * int returned Instances. If the PropertyList is NULL, no additional
     * filtering is defined by this parameter.
     *
     * @return Enumeration - If successful, returns zero or more instances 
     * of the specified class including properties.
     *
     * @throws CIMException If unsuccessful, one of the following status 
     * codes may be returned.
     *
     *     CIM_ERR_ACCESS_DENIED,
     *     CIM_ERR_NOT_SUPPORTED,
     *     CIM_ERR_INVALID_NAMESPACE,
     *     CIM_ERR_INVALID_PARAMETER (including missing, duplicate, 
     *         unrecognized or otherwise incorrect parameters),
     *     CIM_ERR_INVALID_CLASS (the CIM Class that is the basis for this
     *         enumeration does not exist), 
     *     CIM_ERR_FAILED (some other unspecified error occurred)
     */
    public Enumeration enumerateInstances(
        CIMObjectPath path,
        boolean deepInheritance,
        boolean localOnly,
        boolean includeQualifiers,
        boolean includeClassOrigin,
        String propertyList[]) throws CIMException
    {
        preCheck(path);
        return(ch.enumerateInstances(path, deepInheritance, localOnly, 
            includeQualifiers, includeClassOrigin, propertyList));
    }

    /**
     * Enumerates instances of the specified CIM Class in the 
     * target Namespace.
     *
     * @param path - The CIMObjectPath identifying the CIM Class
     * to be enumerated.
     *
     * @param deepInheritance - If set to true, the enumeration returned 
     * will contain the contents of all the subclasses, in-addition to 
     * those of the specified class. If set to false, the enumeration will 
     * return only the contents of the first level children of the 
     * specified class. 
     *
     * @param localOnly - If set to true, only CIM Elements (properties, 
     * methods and qualifiers) defined or overridden within the definition 
     * of the Class are returned. If set to false, all elements are returned.  
     *
     * @deprecated
     * @see #enumerateInstances
     */
    public Enumeration enumInstances(
        CIMObjectPath path,
        boolean deepInheritance,
        boolean localOnly) throws CIMException
    {
        return(this.enumerateInstances(path, deepInheritance, localOnly,
            false, false, null));
    }

    /**
     * Enumerates the names (object paths) of the instances of the specified
     * CIM Class in the target Namespace. 
     *
     * @param path - The CIMObjectPath identifying the CIM Class for which 
     * the instance names are to be enumerated.
     *
     * @return Enumeration - If successful, returns zero or more instance 
     * names as CIMObjectPaths. If none are found, then NULL is returned.     
     *
     * @throws CIMException - If unsuccessful, one of the following status 
     * codes may be returned.
     *
     *     CIM_ERR_ACCESS_DENIED 
     *     CIM_ERR_NOT_SUPPORTED 
     *     CIM_ERR_INVALID_NAMESPACE 
     *     CIM_ERR_INVALID_PARAMETER (including missing, duplicate, 
     *         unrecognized or otherwise incorrect parameters) 
     *     CIM_ERR_INVALID_CLASS (the CIM Class that is the basis for this 
     *         enumeration does not exist) 
     *     CIM_ERR_FAILED (some other unspecified error occurred) 
     */
    public Enumeration enumerateInstanceNames(
        CIMObjectPath path) throws CIMException
    {
        Enumeration en;
        
        preCheck(path);
        en = ch.enumerateInstanceNames(path);
        return(en);
    }

    /**
     * Enumerates the names (object paths) of the instances of the specified
     * CIM Class in the target Namespace. 
     *
     * @param path - The CIMObjectPath identifying the CIM Class for which 
     * the instance names are to be enumerated.
     *
     * @param deepInheritance - NOT USED.
     *
     * @deprecated
     * @see #enumerateInstanceNames
     */
    public Enumeration enumInstances(
        CIMObjectPath path,
        boolean deepInheritance) throws CIMException
    {
        return(this.enumerateInstanceNames(path));
    }


    /**
     * Executes a query against the target Namespace to retrieve the objects.
     * Only queries on class instances are supported. 
     *
     * @param path - The CIMObjectPath identifying the CIM Class in which
     * to query. 
     *
     * @param query - Defines the query to be executed. This parameter cannot 
     * be null.
     *
     * @param queryLanguage - Defines the query language in which the Query 
     * parameter is expressed (WQL level 1 is the only currently supported 
     * query language). 
     *
     * @return Enumeration - If successful, returns zero or more instances of 
     * the specified class and all classes derived from the specified class, 
     * that match the query string. If none are found, then NULL is returned. 
     *
     * @throws CIMException If unsuccessful, one of the following status 
     * codes may be returned.
     *
     *     CIM_ERR_ACCESS_DENIED, 
     *     CIM_ERR_NOT_SUPPORTED, 
     *     CIM_ERR_INVALID_NAMESPACE, 
     *     CIM_ERR_INVALID_PARAMETER (including missing, duplicate, 
     *         unrecognized or otherwise incorrect parameters), 
     *     CIM_ERR_QUERY_LANGUAGE_NOT_SUPPORTED (the requested query language 
     *         is not recognized), 
     *     CIM_ERR_INVALID_QUERY (the query is not a valid query in the 
     *         specified query language), 
     *     CIM_ERR_FAILED (some other unspecified error occurred) 
     */
    public Enumeration execQuery(
        CIMObjectPath path,
        String query, 
        int queryLanguage) throws CIMException
    {
        preCheck(path);
        return(ch.execQuery(path, query, queryLanguage));
    }


    /**
     * Enumerate CIM Objects that are associated to a particular source CIM 
     * Object. If the source CIM object is a class, then associated class names
     * are returned. If the target CIM object is an instance, then entire 
     * instances of associated classes are returned. 
     *
     * @param path - The CIMObjectPath identifying the source CIM Object 
     * whose associated Objects are to be returned. This may be either a 
     * Class name or Instance name (model path). 
     *
     * @param assocClass - If not NULL, MUST be a valid CIM Association Class 
     * name. It acts as a filter on the returned set of Objects by mandating 
     * that each returned Object MUST be associated to the source Object via 
     * an Instance of this Class or one of its subclasses. 
     * 
     * @param resultClass - If not NULL, MUST be a valid CIM Class name. It 
     * acts as a filter on the returned set of Objects by mandating that each 
     * returned Object MUST be either an Instance of this Class (or one of its 
     * subclasses) or be this Class (or one of its subclasses). 
     *
     * @param role - If not NULL, MUST be a valid Property name. It acts as a 
     * filter on the returned set of Objects by mandating that each returned 
     * Object MUST be associated to the source Object via an Association in 
     * which the source Object plays the specified role (i.e. the name of the 
     * Property in the Association Class that refers to the source Object MUST 
     * match the value of this parameter).
     *
     * @param resultRole - If not NULL, MUST be a valid Property name. It acts 
     * as a filter on the returned set of Objects by mandating that each 
     * returned Object MUST be associated to the source Object via an 
     * Association in which the returned Object plays the specified role 
     * (i.e. the name of the Property in the Association Class that refers to 
     * the returned Object MUST match the value of this parameter).
     *
     * @param includeQualifiers - If set to true, all Qualifiers for each 
     * Object (including Qualifiers on the Object and on any returned 
     * Properties) will be included in the response. If false, no Qualifiers 
     * are present in each returned Object. 
     *
     * @param includeClassOrigin - If set to true, specifies that the 
     * CLASSORIGIN attribute will be present on all appropriate elements in 
     * each returned Object. If set to false, no CLASSORIGIN attributes are 
     * present in each returned Object. 
     *
     * @param propertyList - If not NULL, the members of the array define one 
     * or more Property names. Each returned Object will not include elements 
     * for any Properties missing from this list. If the PropertyList input 
     * parameter is an empty array this signifies that no Properties are 
     * included in each returned Object. If the PropertyList input parameter 
     * is NULL this specifies that all Properties (subject to the conditions 
     * expressed by the other parameters) are included in each returned Object. 
     * If the PropertyList contains duplicate elements, the Server ignores the 
     * duplicates but otherwise process the request normally. If the 
     * PropertyList contains elements which are invalid Property names for any 
     * target Object, the Server ignores such entries but otherwise process 
     * the request normally. Clients SHOULD NOT explicitly specify properties
     * in the PropertyList parameter unless they have specified a non-NULL 
     * value for the ResultClass parameter. 
     *
     * @return If successful, returns zero or more CIM Classes or Instances 
     * meeting the requested criteria. If none found, then NULL is returned. 
     *
     * @throws CIMException If unsuccessful, one of the following status 
     * code may be returned.
     *
     *     CIM_ERR_ACCESS_DENIED, 
     *     CIM_ERR_NOT_SUPPORTED, 
     *     CIM_ERR_INVALID_NAMESPACE, 
     *     CIM_ERR_INVALID_PARAMETER (including missing, duplicate, 
     *         unrecognized or otherwise incorrect parameters), 
     *     CIM_ERR_FAILED (some other unspecified error occurred) 
     */
    public Enumeration associators(
        CIMObjectPath path,
        String assocClass,
        String resultClass,
        String role,
        String resultRole,
        boolean includeQualifiers,
        boolean includeClassOrigin,
        String propertyList[])throws CIMException 
    {
        preCheck(path);
        return(ch.associators(path, assocClass, resultClass, role,
                 resultRole, includeQualifiers,
                 includeClassOrigin, propertyList));
    }


    /**
     * Enumerate the object paths to CIM Objects that are associated to a 
     * particular source CIM Object. If the source CIM object is a class, then 
     * associated class names are returned. If the target CIM object is an 
     * instance, then object paths to the instances of associated classes are 
     * returned.      
     *
     * @param path - The CIMObjectPath identifying the source CIM Object 
     * whose associated Objects are to be returned. This may be either a 
     * Class name or Instance name (model path). 
     *
     * @param assocClass - If not NULL, MUST be a valid CIM Association Class 
     * name. It acts as a filter on the returned set of names by mandating 
     * that each returned name identifies an object that MUST be associated 
     * to the source Object via an Instance of this Class or one of its 
     * subclasses. 
     * 
     * @param resultClass - If not NULL, MUST be a valid CIM Class name. It 
     * acts as a filter on the returned set of names by mandating that each 
     * returned name identifies an Object that MUST be either an Instance of 
     * this Class (or one of its subclasses) or be this Class (or one of its 
     * subclasses). 
     *
     * @param role - If not NULL, MUST be a valid Property name. It acts as a 
     * filter on the returned set of names by mandating that each returned 
     * name identifies an Object that MUST be associated to the source Object 
     * via an Association in which the source Object plays the specified role 
     * (i.e. the name of the Property in the Association Class that refers to 
     * the source Object MUST match the value of this parameter). 
     *
     * @param resultRole - If not NULL, MUST be a valid Property name. It acts 
     * as a filter on the returned set of names by mandating that each returned
     * name identifies an Object that MUST be associated to the source Object 
     * via an Association in which the returned Object plays the specified role 
     * (i.e. the name of the Property in the Association Class that refers to 
     * the returned Object MUST match the value of this parameter).
     *
     * @return If successful, returns zero or more CIM Class paths or 
     * Instance paths of Objects meeting the requested criteria. If none found, 
     * then NULL is returned.
     *
     * @throws CIMException If unsuccessful, one of the following status
     * codes may be returned.
     *
     *     CIM_ERR_ACCESS_DENIED 
     *     CIM_ERR_NOT_SUPPORTED 
     *     CIM_ERR_INVALID_NAMESPACE 
     *     CIM_ERR_INVALID_PARAMETER (including missing, duplicate, 
     *         unrecognized or otherwise incorrect parameters) 
     *     CIM_ERR_FAILED (some other unspecified error occurred) 
     */
    public Enumeration associatorNames(
        CIMObjectPath path,
        String assocClass,
        String resultClass,
        String role,
        String resultRole) throws CIMException
    {
        preCheck(path);
        return(ch.associatorNames(path, assocClass, resultClass, 
            role, resultRole));
    }

    /**
     * Enumerates the association objects that refer to a particular target 
     * CIM Object. If the target CIM object is a class, association class 
     * names are returned. If the target CIM object is an instance, then 
     * association instances are returned. 
     *
     * @param path - The CIMObjectPath identifying the target CIM Object 
     * whose referring Objects are to be returned. This may be either a 
     * Class name or Instance name (model path). 
     *
     * @param resultClass - If not NULL, MUST be a valid CIM Class name. It 
     * acts as a filter on the returned set of Objects by mandating that each
     * returned Object MUST be an Instance of this Class (or one of its 
     * subclasses), or this Class (or one of its subclasses). 
     *
     * @param role - If not NULL, MUST be a valid Property name. It acts as 
     * a filter on the returned set of Objects by mandating that each returned
     * Objects MUST refer to the target Object via a Property whose name 
     * matches the value of this parameter. 
     *
     * @param includeQualifiers - If set to true, all Qualifiers for each 
     * Object (including Qualifiers on the Object and on any returned 
     * Properties) will be included in the response. If false, no Qualifiers 
     * are present in each returned Object. 
     *
     * @param includeClassOrigin - If set to true, specifies that the 
     * CLASSORIGIN attribute will be present on all appropriate elements in 
     * each returned Object. If set to false, no CLASSORIGIN attributes are 
     * present in each returned Object. 
     *
     * @param propertyList - If not NULL, the members of the array define one 
     * or more Property names. Each returned Object will not include elements 
     * for any Properties missing from this list. If the PropertyList input 
     * parameter is an empty array this signifies that no Properties are 
     * included in each returned Object. If the PropertyList input parameter 
     * is NULL this specifies that all Properties (subject to the conditions 
     * expressed by the other parameters) are included in each returned Object. 
     * If the PropertyList contains duplicate elements, the Server ignores the 
     * duplicates but otherwise process the request normally. If the 
     * PropertyList contains elements which are invalid Property names for any 
     * target Object, the Server ignores such entries but otherwise process 
     * the request normally. Clients SHOULD NOT explicitly specify properties
     * in the PropertyList parameter unless they have specified a non-NULL 
     * value for the ResultClass parameter. 
     *
     * @return If successful, returns zero or more CIM Classes or Instances 
     * meeting the requested criteria. If none found, then NULL is returned.
     *
     * @throws CIMException If unsuccessful, one of the following status
     * codes may be returned.
     *
     *     CIM_ERR_ACCESS_DENIED 
     *     CIM_ERR_NOT_SUPPORTED 
     *     CIM_ERR_INVALID_NAMESPACE 
     *     CIM_ERR_INVALID_PARAMETER (including missing, duplicate, 
     *         unrecognized or otherwise incorrect parameters) 
     *     CIM_ERR_FAILED (some other unspecified error occurred) 
     */
    public Enumeration references(
        CIMObjectPath path,
        String resultClass,
        String role,
        boolean includeQualifiers,
        boolean includeClassOrigin,
        String propertyList[] ) throws CIMException 
    {
        preCheck(path);
        return(ch.references(path, resultClass, role, includeQualifiers,
            includeClassOrigin, propertyList));
    }

    /**
     * Enumerates the object paths to association objects that refer to a 
     * particular target CIM Object. If the target CIM object is a class, 
     * association class names are returned. If the target CIM object is an 
     * instance, then object paths to the association instances are returned.
     *
     * @param path - The CIMObjectPath identifying the target CIM Object 
     * whose referring Object Names are to be returned. This may be either a 
     * Class name or Instance name (model path). 
     *
     * @param resultClass - If not NULL, MUST be a valid CIM Class name. It 
     * acts as a filter on the returned set of Object Names by mandating 
     * that each returned Object Name MUST be an Instance of this Class 
     * (or one of its subclasses), or this Class (or one of its subclasses). 
     *
     * @param role - If not NULL, MUST be a valid Property name. It acts as 
     * a filter on the returned set of Object Names by mandating that each 
     * returned Object Name MUST identify an Object that refers to the 
     * target Instance via a Property whose name matches the value of this 
     * parameter. 
     *
     * @return If successful, returns zero or more full CIM Class paths or 
     * Instance paths of Objects meeting the requested criteria. If none 
     * found, then NULL is returned. 
     *
     * @throws CIMException If unsuccessful, one of the following status
     * codes may be returned.
     *
     *     CIM_ERR_ACCESS_DENIED 
     *     CIM_ERR_NOT_SUPPORTED 
     *     CIM_ERR_INVALID_NAMESPACE 
     *     CIM_ERR_INVALID_PARAMETER (including missing, duplicate, 
     *         unrecognized or otherwise incorrect parameters) 
     *     CIM_ERR_FAILED (some other unspecified error occurred) 
     */
    public Enumeration referenceNames(
        CIMObjectPath path,
        String resultClass,
        String role) throws CIMException
    {
        preCheck(path);
        return(ch.referenceNames(path, resultClass, role));
    }
    

    /**
     * Gets the value of the specified property for the instance specified 
     * in the CIM object path. 
     *
     * @param path - The CIMObjectPath identifying the CIM instance to be 
     * accessed. It must include all of the keys.
     *
     * @param propertyName - Name of the Property whose value is to be 
     * returned. 
     *
     * @return If successful, value of the requested Property is returned. 
     * If the value is NULL then no element is returned. 
     *
     * @throws CIMException If unsuccessful, one of the following status
     * codes may be returned.
     *
     *     CIM_ERR_ACCESS_DENIED, 
     *     CIM_ERR_INVALID_NAMESPACE, 
     *     CIM_ERR_INVALID_PARAMETER (including missing, duplicate, 
     *         unrecognized or otherwise incorrect parameters), 
     *     CIM_ERR_INVALID_CLASS (the CIM Class does not exist in the
     *         specified namespace), 
     *     CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested 
     *         CIM Instance does not exist in the specified namespace), 
     *     CIM_ERR_NO_SUCH_PROPERTY (the CIM Instance does exist, but the 
     *         requested Property does not),
     *     CIM_ERR_FAILED (some other unspecified error occurred) 
     */
    public CIMValue getProperty(
        CIMObjectPath path,
        String propertyName) throws CIMException
    {
        preCheck(path);
        return(ch.getProperty(path, propertyName));
    }

    /**
     * Modifies the value of the specified property by setting it to the
     * specified value for the instance specified in the object path. 
     *
     * @param path - The CIMObjectPath identifying the CIM instance for
     * the property value is to be updated. It must include all of the keys.
     *
     * @param propertyName - Name of the Property whose value is to be
     * updated.
     *
     * @param newValue - The new value for the Property (which may be NULL).
     *
     * @throws CIMException If unsuccessful, one of the following status 
     * codes may be returned.
     *
     *     CIM_ERR_ACCESS_DENIED, 
     *     CIM_ERR_NOT_SUPPORTED, 
     *     CIM_ERR_INVALID_NAMESPACE, 
     *     CIM_ERR_INVALID_PARAMETER (including missing, duplicate, 
     *         unrecognized or otherwise incorrect parameters), 
     *     CIM_ERR_INVALID_CLASS (the CIM Class that is the basis for this 
     *         enumeration does not exist), 
     *     CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested 
     *         CIM Instance does not exist in the specified namespace), 
     *     CIM_ERR_NO_SUCH_PROPERTY (the CIM Instance does exist, but the 
     *         requested Property does not), 
     *     CIM_ERR_TYPE_MISMATCH (the supplied value is incompatible with 
     *         the type of the Property), 
     *     CIM_ERR_FAILED (some other unspecified error occurred) 
     */
    public void setProperty(
        CIMObjectPath path,
        String propertyName,
        CIMValue newValue) throws CIMException
    {
        preCheck(path);
        ch.setProperty(path, propertyName, newValue);
    }

    /**
     * Gets the CIM qualifier type specified in the CIM object path from
     * the traget Namespace.
     *
     * @param path - The CIMObjectPath identifying the CIM qualifier type
     * whose declaration is to be retrieved.
     *
     * @return If successful, returns the Qualifier Type for the named 
     * Qualifier. 
     *
     * @throws CIMException If unsuccessful, one of the following status
     * codes may be returned.
     *
     *     CIM_ERR_ACCESS_DENIED, 
     *     CIM_ERR_NOT_SUPPORTED, 
     *     CIM_ERR_INVALID_NAMESPACE, 
     *     CIM_ERR_INVALID_PARAMETER (including missing, duplicate, 
     *         unrecognized or otherwise incorrect parameters), 
     *     CIM_ERR_NOT_FOUND (the requested Qualifier declaration did 
     *         not exist), 
     *     CIM_ERR_FAILED (some other unspecified error occurred) 
     */
    public CIMQualifierType getQualifier(
        CIMObjectPath path) throws CIMException
    {
        preCheck(path);
        return(ch.getQualifier(path));
    }

    /**
     * Gets the CIM qualifier type specified in the CIM object path from
     * the traget Namespace.
     *
     * @param path - The CIMObjectPath identifying the CIM qualifier type
     * whose declaration is to be retrieved.
     *
     * @return If successful, returns the Qualifier Type for the named 
     * Qualifier. 
     *
     * @deprecated
     * @see #getQualifier
     *
     */
    public CIMQualifierType getQualifierType(
        CIMObjectPath path) throws CIMException
    {
        return(this.getQualifier(path));
    }

    /**
     * Creates or updates the specified CIM qualifier type in the traget 
     * namespace. If the Qualifier declaration already exists it is 
     * overwritten. 
     *
     * @param path - The CIMObjectPath that identifies the CIM Qualifier
     * type to be set.
     *
     * @param qualifierType - CIM qualifier type whose qualifier declaration 
     * is to be added to the Namespace.
     *
     * @throws CIMException - If unsuccessful, one of the following status 
     * codes may be returned.
     *
     *     CIM_ERR_ACCESS_DENIED, 
     *     CIM_ERR_NOT_SUPPORTED, 
     *     CIM_ERR_INVALID_NAMESPACE, 
     *     CIM_ERR_INVALID_PARAMETER (including missing, duplicate, 
     *         unrecognized or otherwise incorrect parameters), 
     *     CIM_ERR_FAILED (some other unspecified error occurred) 
     */
    public void setQualifier(
        CIMObjectPath path,
        CIMQualifierType qualifierType) throws CIMException
    {
        preCheck(path);
        ch.setQualifier(path, qualifierType);
    }

    /**
     * Creates or updates the specified CIM qualifier type in the traget 
     * namespace. If the Qualifier declaration already exists it is 
     * overwritten. 
     *
     * @param path - The CIMObjectPath that identifies the CIM Qualifier
     * type to be set.
     *
     * @param qualifierType - CIM qualifier type whose qualifier declaration 
     * is to be added to the Namespace.
     *
     * @deprecated
     * @see #setQualifier
     *
     */
    public void setQualifierType(
        CIMObjectPath path,
        CIMQualifierType qualifierType) throws CIMException
    {
        this.setQualifier(path, qualifierType);
    }

    /**
     * Creates or updates the specified CIM qualifier type in the traget 
     * namespace. If the Qualifier declaration already exists it is 
     * overwritten. 
     *
     * @param path - The CIMObjectPath that identifies the CIM Qualifier
     * type to be set.
     *
     * @param qualifierType - CIM qualifier type whose qualifier declaration 
     * is to be added to the Namespace.
     *
     * @deprecated
     * @see #setQualifier
     *
     */
    public void createQualifierType(
        CIMObjectPath path,
        CIMQualifierType qualifierType) throws CIMException
    {
        this.setQualifier(path, qualifierType);
    }
              
    /**
     * Deletes the CIM Qualfier declaration from the target Namespace.
     *
     * @param path - the CIMObjectPath identifying the CIM qualifier to be 
     * deleted.  
     *
     * @throws CIMException - If unsuccessful, one of the following status
     * codes may be returned.
     *
     *     CIM_ERR_ACCESS_DENIED,
     *     CIM_ERR_NOT_SUPPORTED,
     *     CIM_ERR_INVALID_NAMESPACE,
     *     CIM_ERR_INVALID_PARAMETER (including missing, duplicate, 
     *         unrecognized or otherwise incorrect parameters),
     *     CIM_ERR_NOT_FOUND (if namespace does not exist),
     *     CIM_ERR_FAILED (some other unspecified error occurred)
     */
    public void deleteQualifier(
        CIMObjectPath path) throws CIMException
    {
        preCheck(path);
        ch.deleteQualifier(path);
    }


    /**
     * Deletes the CIM Qualfier declaration from the target Namespace.
     *
     * @param path - the CIMObjectPath identifying the CIM qualifier to be 
     * deleted.  
     *
     * @deprecated
     * @see #deleteQualifier
     *
     */
    public void deleteQualifierType(
        CIMObjectPath path) throws CIMException
    {
        this.deleteQualifier(path);
    }

    /**
     * Enumerates the Qualifier declarations from the target Namespace.
     *
     * @param path - The CIMObjectPath identifying the namespace whose 
     * qualifier definitions are to be enumerated. 
     *
     * @return Enumeration of qualifierType objects from the namespace. 
     * If none are found, then NULL is returned. 
     *
     * @throws CIMException - If unsuccessful, one of the following status
     * codes may be returned.
     *
     *     CIM_ERR_ACCESS_DENIED,
     *     CIM_ERR_NOT_SUPPORTED,
     *     CIM_ERR_INVALID_NAMESPACE,
     *     CIM_ERR_INVALID_PARAMETER (including missing, duplicate, 
     *         unrecognized or otherwise incorrect parameters),
     *     CIM_ERR_FAILED (some other unspecified error occurred)
     */
    public Enumeration enumerateQualifiers(
        CIMObjectPath path) throws CIMException
    {
        Enumeration en;
        
        preCheck(path);
        en=ch.enumerateQualifiers(path);
        return(en);
    }
        

    /**
     * Enumerates the Qualifier declarations from the target Namespace.
     *
     * @param path - The CIMObjectPath identifying the namespace whose 
     * qualifier definitions are to be enumerated. 
     *
     * @return Enumeration of qualifierType objects from the namespace. 
     * If none are found, then NULL is returned. 
     *
     * @deprecated
     * @see #enumerateQualifiers
     *
     */
    public Enumeration enumQualifierTypes(
        CIMObjectPath path) throws CIMException
    {
        return(this.enumerateQualifiers(path));
    }

    /**
     * Executes a specified method on the specified object.
     *
     * @param path - The CIMObjectPath of the object on which the method 
     * is being invoked. This can be a class or instance.
     *
     * @param methodName - the string name of the method to be invoked.
     *
     * @param inParams - The input parameters specified as a vector of 
     * CIMProperty elements.
     *
     * @param outParams - The output parameters specified as a vector of 
     * CIMProperty elements.
     *
     * @return CIMValue - The return value of the method. If the method 
     * returns nothing, the return value will be null. 
     *
     * @throws CIMException - If unsuccessful, one of the following status
     * codes may be returned.
     *
     *    CIM_ERR_ACCESS_DENIED,
     *    CIM_ERR_NOT_SUPPORTED (provider does not support this method),
     *    CIM_ERR_INVALID_NAMESPACE,
     *    CIM_ERR_INVALID_PARAMETER (for this method),
     *    CIM_ERR_NOT_FOUND (if instance does not exist),
     *    CIM_ERR_METHOD_NOT_FOUND,
     *    CIM_ERR_METHOD_NOT_AVAILABLE,
     *    CIM_ERR_FAILED (some other unspecified error occurred)
     */
    public CIMValue invokeMethod(
        CIMObjectPath path,
        String methodName,
        Vector inParams,
        Vector outParams) throws CIMException
    {
        preCheck(path);
        return(ch.invokeMethod(path, methodName, inParams, outParams));
    }


/*ATTN: For future release...
    public CIMFeatures getServerFeatures() throws CIMException
    {
        return(ch.getServerFeatures());
    }

    public void addCIMListener(CIMListener listener) throws CIMException
    {
        ch.addCIMListener(listener);
    }

    public void removeCIMListener(CIMListener listener) throws CIMException
    {
        ch.removeCIMListener(listener);
    }

    // used by IndReceiver
    Vector getListeners() 
    {
        return null;
    }

    //public String encryptData(String data) throws CIMException;
*/

}

