com.sun.wbem.provider
Interface InstanceProvider


public interface InstanceProvider
extends CIMProvider

This is the base interface implemented by instance providers. Instance providers are used to serve up dynamic instances of classes.

Since:
WBEM 1.0

Method Summary
 void createInstance(CIMInstance ci)
          Deprecated. New APIs in the provider20 package.
 void deleteInstance(CIMObjectPath op)
          Deprecated. New APIs in the provider20 package.
 java.util.Vector enumInstances(CIMObjectPath op, boolean deep, CIMClass cc)
          Deprecated. New APIs in the provider20 package.
 java.util.Vector enumInstances(CIMObjectPath op, boolean deep, CIMClass cc, boolean localOnly)
          Deprecated. New APIs in the provider20 package.
 CIMInstance getInstance(CIMObjectPath op, CIMClass cc, boolean localOnly)
          Deprecated. New APIs in the provider20 package.
 void setInstance(CIMInstance ci)
          Deprecated. New APIs in the provider20 package.
 
Methods inherited from interface com.sun.wbem.provider.CIMProvider
cleanup, initialize
 

Method Detail

enumInstances

public java.util.Vector enumInstances(CIMObjectPath op,
                                      boolean deep,
                                      CIMClass cc)
                               throws CIMException
Deprecated. New APIs in the provider20 package.

This method must be implemented by instance providers to enumerate all names of instances of the class which is specified in op. Deep or shallow enumeration is possible, however currently the CIMOM only asks for shallow enumeration.
Parameters:
op - The object path specifies the class that must be enumerated.
deep - If true, deep enumeration must be done, otherwise shallow.
cc, - the class reference
Returns:
Vector of CIMObjectPath containing names of the enumerated instances.
Throws:
CIMException - The method enumInstances throws a CIMException message if the CIMObjectPath is incorrect or does not exist.
See Also:
InstanceProvider

enumInstances

public java.util.Vector enumInstances(CIMObjectPath op,
                                      boolean deep,
                                      CIMClass cc,
                                      boolean localOnly)
                               throws CIMException
Deprecated. New APIs in the provider20 package.

This method must be implemented by instance providers to enumerate all instances of the class which is specified in op. The entire instances and not just the names are returned. Deep or shallow enumeration is possible, however currently the CIMOM only asks for shallow enumeration.
Parameters:
op - The object path specifies the class that must be enumerated.
deep - If true, deep enumeration must be done, otherwise shallow.
cc, - the class reference
localOnly - If true, only the non-inherited properties are to be returned, otherwise all properties are required.
Returns:
Vector of CIMInstance containing names of the enumerated instances.
Throws:
CIMException - The method enumInstances throws a CIMException if the CIMObjectPath is incorrect or does not exist.
See Also:
InstanceProvider

getInstance

public CIMInstance getInstance(CIMObjectPath op,
                               CIMClass cc,
                               boolean localOnly)
                        throws CIMException
Deprecated. New APIs in the provider20 package.

This method must be implemented by instance providers to retrieve the instance specified in the object path.
Parameters:
op - The name of the instance to be retrieved.
cc - The Class to which the instance belongs. This is useful for providers which do not want to create instances from scratch. They can call the class newInstance() routine to create a template for the new instance.
localOnly - If true, only the non-inherited properties are to be returned, otherwise all properties are required.
Returns:
CIMInstance The retrieved instance.
Throws:
CIMException - The method getInstance throws a CIMException if the CIMObjectPath is incorrect or does not exist.
See Also:
InstanceProvider

createInstance

public void createInstance(CIMInstance ci)
                    throws CIMException
Deprecated. New APIs in the provider20 package.

This method must be implemented by instance providers to create the instance specified in the object path. If the instance does exist, CIMInstanceException with ID CIM_ERR_ALREADY_EXISTS must be thrown. The parameter should be the instance name.
Parameters:
ci - The instance to be set.
Throws:
CIMException - The method createInstance throws a CIMException.
See Also:
InstanceProvider

setInstance

public void setInstance(CIMInstance ci)
                 throws CIMException
Deprecated. New APIs in the provider20 package.

This method must be implemented by instance providers to set the instance specified in the object path. If the instance does not exist, CIMInstanceException with ID CIM_ERR_NOT_FOUND must be thrown. The parameter should be the instance name.
Parameters:
ci - The instance to be set.
Throws:
CIMException - The setInstance method throws a CIMException.
See Also:
InstanceProvider

deleteInstance

public void deleteInstance(CIMObjectPath op)
                    throws CIMException
Deprecated. New APIs in the provider20 package.

This method must be implemented by instance providers to delete the instance specified in the object path.
Parameters:
ci - The instance to be deleted.
Throws:
CIMException - The deleteInstance method throws a CIMException.
See Also:
InstanceProvider