version 1.1, 2003/10/07 19:18:41
|
version 1.6.16.1, 2006/02/10 16:12:57
|
|
|
//%///////////////////////////////////////////////////////////////////////////// |
//%2006//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000 - 2003 BMC Software, Hewlett-Packard Company, IBM, |
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
// The Open Group, Tivoli Systems |
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. |
|
// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.; |
|
// IBM Corp.; EMC Corporation, The Open Group. |
|
// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.; |
|
// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. |
|
// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; VERITAS Software Corporation; The Open Group. |
|
// Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; Symantec Corporation; The Open Group. |
// | // |
// Permission is hereby granted, free of charge, to any person obtaining a copy | // Permission is hereby granted, free of charge, to any person obtaining a copy |
// of this software and associated documentation files (the "Software"), to | // of this software and associated documentation files (the "Software"), to |
|
|
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
class RegistrationRecord |
Array<RegistrationRecord> _globalRegistrationTable; |
{ |
|
public: |
|
String _className; |
|
String _namespace; |
|
String _providerName; |
|
String _moduleName; |
|
|
|
}; |
|
| |
ProviderRegistrarInitializer::ProviderRegistrarInitializer(void) | ProviderRegistrarInitializer::ProviderRegistrarInitializer(void) |
{ | { |
|
|
| |
Array<RegistrationRecord> records; | Array<RegistrationRecord> records; |
| |
repository->read_lock(); |
|
|
|
// | // |
// get all relevant registration instances from the repository and cache them locally. | // get all relevant registration instances from the repository and cache them locally. |
// | // |
|
|
// get class name | // get class name |
if((pos = providerInstances[i].findProperty("Name")) != PEG_NOT_FOUND) | if((pos = providerInstances[i].findProperty("Name")) != PEG_NOT_FOUND) |
{ | { |
providerInstances[i].getProperty(pos).getValue().get(record._className); |
providerInstances[i].getProperty(pos).getValue().get(record.className); |
} | } |
| |
// get namespace | // get namespace |
|
|
// ATTN: must create duplicate entries for each namespace. for now, only | // ATTN: must create duplicate entries for each namespace. for now, only |
// one namespace is support (0 is invalid). | // one namespace is support (0 is invalid). |
| |
Array<String> temp; |
//Array<String> temp; |
| |
providerInstances[i].getProperty(pos).getValue().get(temp); |
//providerInstances[i].getProperty(pos).getValue().get(temp); |
| |
record._namespace = temp[0]; |
//record._namespace = temp[0]; |
} | } |
| |
// get provider name | // get provider name |
if((pos = providerInstances[i].findProperty("ProviderName")) != PEG_NOT_FOUND) | if((pos = providerInstances[i].findProperty("ProviderName")) != PEG_NOT_FOUND) |
{ | { |
providerInstances[i].getProperty(pos).getValue().get(record._providerName); |
providerInstances[i].getProperty(pos).getValue().get(record.providerName); |
} | } |
| |
// get provider module name | // get provider module name |
if((pos = providerInstances[i].findProperty("ProviderModuleName")) != PEG_NOT_FOUND) | if((pos = providerInstances[i].findProperty("ProviderModuleName")) != PEG_NOT_FOUND) |
{ | { |
providerInstances[i].getProperty(pos).getValue().get(record._moduleName); |
providerInstances[i].getProperty(pos).getValue().get(record.moduleName); |
} | } |
} | } |
| |
|
|
} | } |
| |
// compare record._providerName to PG_Provider.Name | // compare record._providerName to PG_Provider.Name |
if(String::equalNoCase(s, records[i]._providerName)) |
if(String::equalNoCase(s, records[i].providerName)) |
{ | { |
break; | break; |
} | } |
|
|
} | } |
| |
// compare record._moduleName to PG_ProviderModule.Name | // compare record._moduleName to PG_ProviderModule.Name |
if(String::equalNoCase(s, records[i]._moduleName)) |
if(String::equalNoCase(s, records[i].moduleName)) |
{ | { |
break; | break; |
} | } |