com.hp.ucmdb.api
Interface UcmdbServiceProvider


public interface UcmdbServiceProvider

Services to obtain a UcmdbService and server information.
Typical use of this interface to obtain a UcmdbService:

 Credentials credentials = provider.createCredentials(username, password);
 ClientContext myContext = provider.createClientContext("myapplication");
 UcmdbService ucmdbService = provider.connect(credentials, myContext);
 


Method Summary
 UcmdbService connect(Credentials credentials, ClientContext clientContext)
          Connects the client to the UCMDB.
 UcmdbService connect(CustomerContext customerContext, Credentials credentials, ClientContext clientContext)
          Connects to an instance of a customer in the multi-tenant UCMDB server.
 UcmdbManagementService connectManagement(Credentials credentials, ClientContext clientContext)
          Connects the client to the UCMDB.
 Credentials createCertificateCredentials(java.lang.String keystore, java.lang.String keystorePass)
          Creates a Certificate Credentials object to be used in the connect method.
 ClientContext createClientContext(java.lang.String clientIdentification)
          Creates an ClientContext object to be used in the connect method.
 Credentials createCredentials(java.lang.String userName, java.lang.String password)
          Creates a Credentials object to be used in the connect method.
 CustomerContext createCustomerContext(int customerId)
          Deprecated. use createCustomerContext(String)
 CustomerContext createCustomerContext(java.lang.String customerName)
          Creates a customer context to be used in the connect method in the multi-tenant environment.
 CustomerContext createDatasetContext(int customerId, java.lang.String state)
          Deprecated. use UcmdbService.getUcmdbServiceForState(java.lang.String)
 java.lang.String getServerVersion()
          The version of the UCMDB server to which this client is connected.
 UcmdbService getUcmdbService(UcmdbService ucmdbService, ClientContext clientContext)
          Deprecated. use UcmdbService.getUcmdbServiceForClientContext(ClientContext)
 

Method Detail

getServerVersion

java.lang.String getServerVersion()
The version of the UCMDB server to which this client is connected.


createCredentials

Credentials createCredentials(java.lang.String userName,
                              java.lang.String password)
Creates a Credentials object to be used in the connect method.

Parameters:
userName -
password -
Returns:
A Credentials object.
See Also:
connect(com.hp.ucmdb.api.Credentials, com.hp.ucmdb.api.ClientContext)

createCertificateCredentials

Credentials createCertificateCredentials(java.lang.String keystore,
                                         java.lang.String keystorePass)
Creates a Certificate Credentials object to be used in the connect method.

Returns:
A Credentials object.
See Also:
connect(com.hp.ucmdb.api.Credentials, com.hp.ucmdb.api.ClientContext)

createClientContext

ClientContext createClientContext(java.lang.String clientIdentification)
Creates an ClientContext object to be used in the connect method. The ClientContext object provides additional information about your application to the UCMDB.

Parameters:
clientIdentification - a string used to identify this connection.
Returns:
an application context object
See Also:
connect(com.hp.ucmdb.api.Credentials, com.hp.ucmdb.api.ClientContext)

connect

UcmdbService connect(Credentials credentials,
                     ClientContext clientContext)
                     throws InvalidCredentialsException,
                            CustomerNotAvailableException
Connects the client to the UCMDB. Performs authentication and returns the root interface for accessing UCMDB services.

Parameters:
credentials - an object obtained from the createCredentials method
clientContext - an object obtained from the createClientContext method
Returns:
an interface to the UCMDB
Throws:
InvalidCredentialsException - if the authentication fails
CustomerNotAvailableException - if the server is not yet ready for connections.
See Also:
createCredentials(java.lang.String, java.lang.String), createClientContext(java.lang.String)

createCustomerContext

CustomerContext createCustomerContext(int customerId)
Deprecated. use createCustomerContext(String)

Creates a customer context to be used in the connect method in the multi-tenant environment.

Parameters:
customerId -
Returns:
a customer context corresponding to the given customer ID
See Also:
connect(CustomerContext, Credentials, ClientContext)

createCustomerContext

CustomerContext createCustomerContext(java.lang.String customerName)
Creates a customer context to be used in the connect method in the multi-tenant environment.

Parameters:
customerName -
Returns:
a customer context corresponding to the given customer name
See Also:
connect(CustomerContext, Credentials, ClientContext)

createDatasetContext

CustomerContext createDatasetContext(int customerId,
                                     java.lang.String state)
Deprecated. use UcmdbService.getUcmdbServiceForState(java.lang.String)

Creates customer context for dataset

Parameters:
customerId - Customer ID in the multi-tenant UCMDB system
state - State name (currently only supports State.ACTUAL and State.AUTHORIZED
Returns:
a customer context corresponding to the given customer ID and state ID

connect

UcmdbService connect(CustomerContext customerContext,
                     Credentials credentials,
                     ClientContext clientContext)
                     throws InvalidCredentialsException,
                            CustomerNotAvailableException
Connects to an instance of a customer in the multi-tenant UCMDB server. Performs authentication and returns the root interface for accessing UCMDB services.

Parameters:
customerContext - an object obtained with one of the link methods
credentials - an object obtained with createCustomerContext method
clientContext - an object obtained with the createClientContext method
Returns:
an interface to UCMDB
Throws:
InvalidCredentialsException - if authentication fails
CustomerNotAvailableException - if the server is not yet ready for connections.
See Also:
createCustomerContext(int), createClientContext(java.lang.String)

getUcmdbService

UcmdbService getUcmdbService(UcmdbService ucmdbService,
                             ClientContext clientContext)
Deprecated. use UcmdbService.getUcmdbServiceForClientContext(ClientContext)

Returns the interface for querying various UCMDB subsystems using specified clientContext. Returned interface will share resources with provided UcmdbService

Parameters:
ucmdbService - an interface to UCMDB
clientContext - an object obtained with the createClientContext method
Since:
9.0

connectManagement

@NotFinalAPI
UcmdbManagementService connectManagement(Credentials credentials,
                                                     ClientContext clientContext)
                                         throws InvalidCredentialsException,
                                                CustomerNotAvailableException
Connects the client to the UCMDB. Performs authentication and returns the root interface for accessing UCMDB management services.

Parameters:
credentials - an object obtained from the createCredentials method
clientContext - an object obtained from the createClientContext method
Returns:
an interface to the UCMDB
Throws:
InvalidCredentialsException - if the authentication fails
CustomerNotAvailableException - if the server is not yet ready for connections.
See Also:
createCredentials(java.lang.String, java.lang.String), createClientContext(java.lang.String)


Documentation Feedback
Copyright 2010 Hewlett-Packard Development Company, L.P.