public PackageVersion createPackageVersionWithDisplayVersion(Subject subject, String packageName,
int packageTypeId, String version, String displayVersion, Integer architectureId, byte[] packageBytes) {
// Check permissions first
if (!authorizationManager.hasGlobalPermission(subject, Permission.MANAGE_CONTENT)) {
throw new PermissionException("User [" + subject.getName()
+ "] does not have permission to create package versions");
}
return createPackageVersionWithDisplayVersion(subject, packageName, packageTypeId, version, displayVersion,
(null == architectureId) ? getNoArchitecture().getId() : architectureId, new ByteArrayInputStream(