throw new FatalErrorException(new ErrorMessage("errors.install.AlreadyInstalled"));
String rootPublisherStr = config.getString(Property.JUDDI_ROOT_PUBLISHER);
String fileRootTModelKeygen = rootPublisherStr + FILE_TMODELKEYGEN;
TModel rootTModelKeyGen = (TModel)buildInstallEntity(fileRootTModelKeygen, "org.uddi.api_v3", config);
String fileRootBusinessEntity = rootPublisherStr + FILE_BUSINESSENTITY;
org.uddi.api_v3.BusinessEntity rootBusinessEntity = (org.uddi.api_v3.BusinessEntity)buildInstallEntity(fileRootBusinessEntity, "org.uddi.api_v3",config);
String rootPartition = getRootPartition(rootTModelKeyGen);
//JUDDI-645
String nodeId = config.getString(Property.JUDDI_NODE_ID,getNodeId(rootBusinessEntity.getBusinessKey(), rootPartition) );
//getNodeId(rootBusinessEntity.getBusinessKey(), rootPartition);
String rootbizkey = getNodeId(rootBusinessEntity.getBusinessKey(), rootPartition);
String fileRootPublisher = rootPublisherStr + FILE_PUBLISHER;
if (!alreadyInstalled) {
log.info("Loading the root Publisher from file " + fileRootPublisher);
rootPublisher = installPublisher(em, fileRootPublisher, config);
installRootPublisherKeyGen(em, rootTModelKeyGen, rootPartition, rootPublisher, nodeId);
rootBusinessEntity.setBusinessKey(rootbizkey);
installBusinessEntity(true, em, rootBusinessEntity, rootPublisher, rootPartition, config,nodeId);
} else {
log.debug("juddi.seed.always reapplies all seed files except for the root data.");
}
List<String> juddiPublishers = getPublishers(config);
for (String publisherStr : juddiPublishers) {
String filePublisher = publisherStr + FILE_PUBLISHER;
String fileTModelKeygen = publisherStr + FILE_TMODELKEYGEN;
TModel tModelKeyGen = (TModel)buildInstallEntity(fileTModelKeygen, "org.uddi.api_v3", config);
String fileBusinessEntity = publisherStr + FILE_BUSINESSENTITY;
org.uddi.api_v3.BusinessEntity businessEntity = (org.uddi.api_v3.BusinessEntity)buildInstallEntity(fileBusinessEntity, "org.uddi.api_v3",config);
UddiEntityPublisher publisher = installPublisher(em, filePublisher, config);
if (publisher==null) {
throw new ConfigurationException("File " + filePublisher + " not found.");