Fix PR comments

scep-fix2
osh 2 years ago
parent ad7466ee1e
commit 95d4afbc3b

@ -115,7 +115,7 @@ public class ApplicationStorageManagerImpl implements ApplicationStorageManager
log.error(msg, e);
throw new ApplicationStorageManagementException(msg, e);
} catch (StorageManagementException e) {
String msg = "Error occurred while uploading image artifacts"
String msg = "Error occurred while uploading image artifacts. UUID: "
+ applicationReleaseDTO.getUuid();
log.error(msg, e);
throw new ResourceManagementException(msg, e);
@ -167,7 +167,7 @@ public class ApplicationStorageManagerImpl implements ApplicationStorageManager
log.error(msg, e);
throw new ResourceManagementException( msg, e);
} catch (StorageManagementException e) {
String msg = "Error occurred while uploading image artifacts"
String msg = "Error occurred while uploading image artifacts. UUID: "
+ applicationReleaseDTO.getUuid();
log.error(msg, e);
throw new ResourceManagementException(msg, e);
@ -301,14 +301,12 @@ public class ApplicationStorageManagerImpl implements ApplicationStorageManager
@Override
public String getMD5(InputStream inputStream) throws StorageManagementException {
String md5;
try {
md5 = DigestUtils.md5Hex(inputStream);
return DigestUtils.md5Hex(inputStream);
} catch (IOException e) {
String msg = "IO Exception occurred while trying to get the md5sum value of application";
log.error(msg, e);
throw new StorageManagementException(msg, e);
}
return md5;
}
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
* Copyright (c) 2023, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
*
* Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except

@ -162,7 +162,6 @@ public class MetadataServiceImpl implements MetadataService {
Response.ResponseBuilder response = Response
.ok(binaryDuplicate, MediaType.APPLICATION_OCTET_STREAM);
response.status(Response.Status.OK);
// response.header("Content-Disposition", "attachment; filename=\"" + fileName + "\"");
response.header("Content-Length", content.length);
return response.build();
} catch (IOException e) {
@ -171,5 +170,4 @@ public class MetadataServiceImpl implements MetadataService {
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build();
}
}
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
* Copyright (c) 2023, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
*
* Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
@ -59,8 +59,7 @@ public class WhiteLabelServiceImpl implements WhiteLabelService {
FileResponse fileResponse = DeviceMgtAPIUtils.getWhiteLabelManagementService().getWhiteLabelFavicon(tenantDomain);
return sendFileStream(fileResponse);
} catch (NotFoundException e) {
String msg = "Favicon white label image cannot be found in the system. Updating the whitelabel theme might" +
"help restore it";
String msg = "Favicon white label image cannot be found in the system. Uploading the favicon white label image again might help solve the issue.";
log.error(msg, e);
return Response.status(Response.Status.NOT_FOUND).entity(msg).build();
} catch (MetadataManagementException e) {
@ -78,8 +77,7 @@ public class WhiteLabelServiceImpl implements WhiteLabelService {
FileResponse fileResponse = DeviceMgtAPIUtils.getWhiteLabelManagementService().getWhiteLabelLogo(tenantDomain);
return sendFileStream(fileResponse);
} catch (NotFoundException e) {
String msg = "Logo white label image cannot be found in the system. Updating the whitelabel theme might" +
"help restore it";
String msg = "Logo white label image cannot be found in the system. Uploading the logo white label image again might help solve the issue.";
log.error(msg, e);
return Response.status(Response.Status.NOT_FOUND).entity(msg).build();
} catch (MetadataManagementException e) {
@ -97,8 +95,7 @@ public class WhiteLabelServiceImpl implements WhiteLabelService {
FileResponse fileResponse = DeviceMgtAPIUtils.getWhiteLabelManagementService().getWhiteLabelLogoIcon(tenantDomain);
return sendFileStream(fileResponse);
} catch (NotFoundException e) {
String msg = "Logo white label image cannot be found in the system. Updating the whitelabel theme might" +
"help restore it";
String msg = "Icon white label image cannot be found in the system. Uploading the icon white label image again might help solve the issue.";
log.error(msg, e);
return Response.status(Response.Status.NOT_FOUND).entity(msg).build();
} catch (MetadataManagementException e) {

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* Copyright (c) 2023, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
* Copyright (c) 2023, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
*
* Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Entgra (pvt) Ltd. (http://entgra.io) All Rights Reserved.
* Copyright (c) 2023, Entgra (pvt) Ltd. (http://entgra.io) All Rights Reserved.
*
* Entgra (pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
* Copyright (c) 2023, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
*
* Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Entgra (pvt) Ltd. (http://entgra.io) All Rights Reserved.
* Copyright (c) 2023, Entgra (pvt) Ltd. (http://entgra.io) All Rights Reserved.
*
* Entgra (pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Entgra (pvt) Ltd. (http://entgra.io) All Rights Reserved.
* Copyright (c) 2023, Entgra (pvt) Ltd. (http://entgra.io) All Rights Reserved.
*
* Entgra (pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
* Copyright (c) 2023, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
*
* Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
* Copyright (c) 2023, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
*
* Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
* Copyright (c) 2023, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
*
* Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except

@ -1,4 +1,4 @@
/* Copyright (c) 2019, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
/* Copyright (c) 2023, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
*
* Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
* Copyright (c) 2023, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
*
* Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
* Copyright (c) 2023, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
*
* Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
* Copyright (c) 2023, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
*
* Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
* Copyright (c) 2023, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
*
* Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
@ -439,7 +439,7 @@ public class WhiteLabelManagementServiceImpl implements WhiteLabelManagementServ
Metadata metadata = metadataDAO.getMetadata(tenantId, MetadataConstants.WHITELABEL_META_KEY);
if (metadata == null) {
String msg = "Whitelabel theme not found for tenant: " + tenantId;
log.debug(msg);
log.error(msg);
throw new NotFoundException(msg);
}
return new Gson().fromJson(metadata.getMetaValue(), WhiteLabelTheme.class);

@ -1,4 +1,4 @@
/* Copyright (c) 2022, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
/* Copyright (c) 2023, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
*
* Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except

@ -1,4 +1,4 @@
/* Copyright (c) 2022, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
/* Copyright (c) 2023, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
*
* Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except

@ -189,7 +189,7 @@
<a href='https://entgra.io' target='_blank'>
Entgra
</a>
IoT Server 5.0.0 | © 2023
IoT Server 5.2.0 | © 2023
, All Rights Reserved.
</FooterText>
<AppTitle>Entgra</AppTitle>

@ -328,7 +328,7 @@
&lt;a href='https://entgra.io' target='_blank'&gt;
Entgra
&lt;/a&gt;
IoT Server 5.0.0 | &#169; 2023
IoT Server 5.2.0 | &#169; 2023
, All Rights Reserved.
</FooterText>
<AppTitle>Entgra</AppTitle>

Loading…
Cancel
Save