}
packageName = new File(packageName).getName();
}
try {
ResourceFactoryManagerLocal resourceFactoryManager = LookupUtil.getResourceFactoryManager();
// RHQ-666 - Changed to not request the resource name from the user; simply pass null
// JON 2.0 RC3 - use timestamp versioning; pass null for version
// resourceFactoryManager.createResource(user, parentResource.getId(), getResourceTypeId(), null,
// pluginConfiguration, packageName, null, selectedArchitectureId, deployTimeConfiguration,
// packageContentStream);
if (packageUploadDetails != null) {
resourceFactoryManager.createResource(user, parentResource.getId(), getResourceTypeId(), null,
pluginConfiguration, packageName, getVersion(), selectedArchitectureId,
deployTimeConfiguration, packageContentStream, packageUploadDetails);
} else {
resourceFactoryManager.createResource(user, parentResource.getId(), getResourceTypeId(), null,
pluginConfiguration, packageName, null, selectedArchitectureId, deployTimeConfiguration,
packageContentStream);
}