|
|
|
@ -3434,6 +3434,7 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
|
String userName = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUsername();
|
|
|
|
|
int deviceTypeId = -1;
|
|
|
|
|
String appName;
|
|
|
|
|
int appNameLength = 20;
|
|
|
|
|
List<String> appCategories;
|
|
|
|
|
List<String> unrestrictedRoles;
|
|
|
|
|
|
|
|
|
@ -3445,6 +3446,11 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
|
log.error(msg);
|
|
|
|
|
throw new BadRequestException(msg);
|
|
|
|
|
}
|
|
|
|
|
if (appName.length() > appNameLength) {
|
|
|
|
|
String msg = "Application name must be less than or equal to 20 characters in length.";
|
|
|
|
|
log.error(msg);
|
|
|
|
|
throw new BadRequestException(msg);
|
|
|
|
|
}
|
|
|
|
|
appCategories = applicationWrapper.getCategories();
|
|
|
|
|
if (appCategories == null) {
|
|
|
|
|
String msg = "Application category can't be null.";
|
|
|
|
@ -3477,6 +3483,11 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
|
log.error(msg);
|
|
|
|
|
throw new BadRequestException(msg);
|
|
|
|
|
}
|
|
|
|
|
if (appName.length() > appNameLength) {
|
|
|
|
|
String msg = "Application name must be less than or equal to 20 characters in length.";
|
|
|
|
|
log.error(msg);
|
|
|
|
|
throw new BadRequestException(msg);
|
|
|
|
|
}
|
|
|
|
|
appCategories = webAppWrapper.getCategories();
|
|
|
|
|
if (appCategories == null) {
|
|
|
|
|
String msg = "Web Clip category can't be null.";
|
|
|
|
@ -3510,6 +3521,11 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
|
log.error(msg);
|
|
|
|
|
throw new BadRequestException(msg);
|
|
|
|
|
}
|
|
|
|
|
if (appName.length() > appNameLength) {
|
|
|
|
|
String msg = "Application name must be less than or equal to 20 characters in length.";
|
|
|
|
|
log.error(msg);
|
|
|
|
|
throw new BadRequestException(msg);
|
|
|
|
|
}
|
|
|
|
|
appCategories = publicAppWrapper.getCategories();
|
|
|
|
|
if (appCategories == null) {
|
|
|
|
|
String msg = "Application category can't be null.";
|
|
|
|
@ -3542,6 +3558,11 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
|
log.error(msg);
|
|
|
|
|
throw new BadRequestException(msg);
|
|
|
|
|
}
|
|
|
|
|
if (appName.length() > appNameLength) {
|
|
|
|
|
String msg = "Application name must be less than or equal to 20 characters in length.";
|
|
|
|
|
log.error(msg);
|
|
|
|
|
throw new BadRequestException(msg);
|
|
|
|
|
}
|
|
|
|
|
appCategories = customAppWrapper.getCategories();
|
|
|
|
|
if (appCategories == null) {
|
|
|
|
|
String msg = "Application category can't be null.";
|
|
|
|
|