public interface CustomersService
Modifier and Type | Method and Description |
---|---|
void |
addCustomer(CustomerInfo newCustomer,
int customerConfigurationID,
boolean asynch)
Registers a new customer in uCMDB, attaches it to the existing CustomerConfiguration and runs the customer.
|
ClusterInfo |
createCluster(ClusterInfo cluster)
Creates new cluster; cluster.getID() must be null
|
int |
createCustomerConfiguration(CustomerConfiguration newCustomerConfiguration,
boolean cmdbCreate)
Does the same as written above, however it doesn't create nor trying connect to History schema
|
int |
createCustomerConfiguration(CustomerConfiguration newCustomerConfiguration,
boolean cmdbCreate,
boolean historyCreate)
Deprecated.
|
Collection<ClusterInfo> |
getAllClusters()
Returns all clusters.
|
Collection<CustomerConfiguration> |
getAllCustomerConfigurations()
Returns all registered customer configurations (cmdb/history schemas).
|
Collection<CustomerInfo> |
getAllCustomers()
Returns all registered customers.
|
Collection<CustomerInfo> |
getAllCustomersIncludingStopped()
Returns all registered customers.
|
Collection<ServerInfo> |
getAllServers()
Returns all registered servers.
|
Integer |
getDefaultCustomerConfigId() |
CustomerFactory |
getFactory()
CustomerFactory is used for creating customer relating objects.
|
boolean |
hasPassiveServersUp()
Returns true if there are passive servers up in the cluster of the connected server.
|
void |
removeCluster(int clusterID)
Removes specified cluster.
|
void |
removeCustomer(int customerID)
Stops specified customer and removes its registration.
|
void |
removeCustomerConfiguration(int customerConfigurationID)
Removes specified customer configuration.
|
void |
removeServer(String serverName)
Removes specified server.
|
void |
setDefaultCustomerConfig(Integer configId) |
void |
startCustomer(int customerID,
boolean asynch)
Starts components of existing customer
|
void |
stopCustomer(int customerID)
Stops components of the specified customer
|
void |
updateCluster(ClusterInfo cluster)
updates specified cluster.
|
void |
updateCustomer(CustomerInfo customer)
Updates customer properties.
|
Collection<CustomerInfo> getAllCustomers()
Collection<CustomerInfo> getAllCustomersIncludingStopped()
Collection<CustomerConfiguration> getAllCustomerConfigurations()
CustomerFactory getFactory()
void addCustomer(CustomerInfo newCustomer, int customerConfigurationID, boolean asynch)
CustomersService customersService=ucmdbManagementService.getCustomersService(); CustomerInfo cust=customersService.getFactory().createCustomer(2); cust.setName("Customer #2"); cust.setDescription("some description"); customersService.addCustomer(cust, 1, true);
newCustomer
- info for new customercustomerConfigurationID
- CustomerConfiguration IDasynch
- if TRUE, the new customer is running asynchronously@Deprecated int createCustomerConfiguration(CustomerConfiguration newCustomerConfiguration, boolean cmdbCreate, boolean historyCreate)
CustomersService customersService=ucmdbManagementService.getCustomersService(); DatabaseInfo cmdbInf=customersService.getFactory().createDatabaseInfo(); DatabaseInfo histInf=customersService.getFactory().createDatabaseInfo(); DatabaseAdminInfo cmdbAdminInf=customersService.getFactory().createDatabaseAdminInfo(); DatabaseAdminInfo histAdminInf=customersService.getFactory().createDatabaseAdminInfo(); cmdbInf.setSchemaType(DatabaseInfo.SchemaType.CMDB); cmdbInf.setDbName("cmdb schema name"); cmdbInf.setDbType(DatabaseInfo.DbType.ORACLE); ... histInf.setSchemaType(DatabaseInfo.SchemaType.CMDB); histInf.setDbName("hist schema name"); histInf.setDbType(DatabaseInfo.DbType.ORACLE); ... cmdbAdminInf.setAdminUser("system"); ... histAdminInf.setAdminUser("system"); ... conf.setCmdbDbInfo(cmdbInf); conf.setHistoryDbInfo(histInf); conf.setCmdbDbAdminInfo(cmdbAdminInf); conf.setHistoryDbAdminInfo(histAdminInf); int ID=customersService.createCustomerConfiguration(conf, true, true);
newCustomerConfiguration
- - parameters of main/history schemascmdbCreate
- - if TRUE main schema must be created, else existing schema is usedhistoryCreate
- - if TRUE history schema must be created, else existing schema is usedint createCustomerConfiguration(CustomerConfiguration newCustomerConfiguration, boolean cmdbCreate)
newCustomerConfiguration
- - parameters of main schemacmdbCreate
- - if TRUE main schema must be created, else existing schema is usedvoid removeCustomer(int customerID)
void removeCustomerConfiguration(int customerConfigurationID)
void updateCustomer(CustomerInfo customer)
CustomersService customersService=ucmdbManagementService.getCustomersService(); Collectionlst= customersService.getAllCustomers(); if (lst!=null) { CustomerInfo cust=lst.iterator().next(); cust.setDescription("new description "); customersService.updateCustomer(cust); }
void startCustomer(int customerID, boolean asynch)
customerID
- customer IDasynch
- if TRUE, the new customer is running asynchronouslyvoid stopCustomer(int customerID)
Collection<ClusterInfo> getAllClusters()
Collection<ServerInfo> getAllServers()
boolean hasPassiveServersUp()
ClusterInfo createCluster(ClusterInfo cluster)
void updateCluster(ClusterInfo cluster)
void removeCluster(int clusterID)
void removeServer(String serverName)
void setDefaultCustomerConfig(Integer configId)
Integer getDefaultCustomerConfigId()
Documentation Feedback
Copyright 2011 - 2018 Micro Focus or one of its affiliates.