Fix PR comments

improvement/fix-task-deletion^2
osh 2 years ago
parent ad7466ee1e
commit 95d4afbc3b

@ -115,7 +115,7 @@ public class ApplicationStorageManagerImpl implements ApplicationStorageManager
log.error(msg, e); log.error(msg, e);
throw new ApplicationStorageManagementException(msg, e); throw new ApplicationStorageManagementException(msg, e);
} catch (StorageManagementException e) { } catch (StorageManagementException e) {
String msg = "Error occurred while uploading image artifacts" String msg = "Error occurred while uploading image artifacts. UUID: "
+ applicationReleaseDTO.getUuid(); + applicationReleaseDTO.getUuid();
log.error(msg, e); log.error(msg, e);
throw new ResourceManagementException(msg, e); throw new ResourceManagementException(msg, e);
@ -167,7 +167,7 @@ public class ApplicationStorageManagerImpl implements ApplicationStorageManager
log.error(msg, e); log.error(msg, e);
throw new ResourceManagementException( msg, e); throw new ResourceManagementException( msg, e);
} catch (StorageManagementException e) { } catch (StorageManagementException e) {
String msg = "Error occurred while uploading image artifacts" String msg = "Error occurred while uploading image artifacts. UUID: "
+ applicationReleaseDTO.getUuid(); + applicationReleaseDTO.getUuid();
log.error(msg, e); log.error(msg, e);
throw new ResourceManagementException(msg, e); throw new ResourceManagementException(msg, e);
@ -301,14 +301,12 @@ public class ApplicationStorageManagerImpl implements ApplicationStorageManager
@Override @Override
public String getMD5(InputStream inputStream) throws StorageManagementException { public String getMD5(InputStream inputStream) throws StorageManagementException {
String md5;
try { try {
md5 = DigestUtils.md5Hex(inputStream); return DigestUtils.md5Hex(inputStream);
} catch (IOException e) { } catch (IOException e) {
String msg = "IO Exception occurred while trying to get the md5sum value of application"; String msg = "IO Exception occurred while trying to get the md5sum value of application";
log.error(msg, e); log.error(msg, e);
throw new StorageManagementException(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, * Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * 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 Response.ResponseBuilder response = Response
.ok(binaryDuplicate, MediaType.APPLICATION_OCTET_STREAM); .ok(binaryDuplicate, MediaType.APPLICATION_OCTET_STREAM);
response.status(Response.Status.OK); response.status(Response.Status.OK);
// response.header("Content-Disposition", "attachment; filename=\"" + fileName + "\"");
response.header("Content-Length", content.length); response.header("Content-Length", content.length);
return response.build(); return response.build();
} catch (IOException e) { } catch (IOException e) {
@ -171,5 +170,4 @@ public class MetadataServiceImpl implements MetadataService {
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); 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, * Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * 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); FileResponse fileResponse = DeviceMgtAPIUtils.getWhiteLabelManagementService().getWhiteLabelFavicon(tenantDomain);
return sendFileStream(fileResponse); return sendFileStream(fileResponse);
} catch (NotFoundException e) { } catch (NotFoundException e) {
String msg = "Favicon white label image cannot be found in the system. Updating the whitelabel theme might" + String msg = "Favicon white label image cannot be found in the system. Uploading the favicon white label image again might help solve the issue.";
"help restore it";
log.error(msg, e); log.error(msg, e);
return Response.status(Response.Status.NOT_FOUND).entity(msg).build(); return Response.status(Response.Status.NOT_FOUND).entity(msg).build();
} catch (MetadataManagementException e) { } catch (MetadataManagementException e) {
@ -78,8 +77,7 @@ public class WhiteLabelServiceImpl implements WhiteLabelService {
FileResponse fileResponse = DeviceMgtAPIUtils.getWhiteLabelManagementService().getWhiteLabelLogo(tenantDomain); FileResponse fileResponse = DeviceMgtAPIUtils.getWhiteLabelManagementService().getWhiteLabelLogo(tenantDomain);
return sendFileStream(fileResponse); return sendFileStream(fileResponse);
} catch (NotFoundException e) { } catch (NotFoundException e) {
String msg = "Logo white label image cannot be found in the system. Updating the whitelabel theme might" + String msg = "Logo white label image cannot be found in the system. Uploading the logo white label image again might help solve the issue.";
"help restore it";
log.error(msg, e); log.error(msg, e);
return Response.status(Response.Status.NOT_FOUND).entity(msg).build(); return Response.status(Response.Status.NOT_FOUND).entity(msg).build();
} catch (MetadataManagementException e) { } catch (MetadataManagementException e) {
@ -97,8 +95,7 @@ public class WhiteLabelServiceImpl implements WhiteLabelService {
FileResponse fileResponse = DeviceMgtAPIUtils.getWhiteLabelManagementService().getWhiteLabelLogoIcon(tenantDomain); FileResponse fileResponse = DeviceMgtAPIUtils.getWhiteLabelManagementService().getWhiteLabelLogoIcon(tenantDomain);
return sendFileStream(fileResponse); return sendFileStream(fileResponse);
} catch (NotFoundException e) { } catch (NotFoundException e) {
String msg = "Logo white label image cannot be found in the system. Updating the whitelabel theme might" + String msg = "Icon white label image cannot be found in the system. Uploading the icon white label image again might help solve the issue.";
"help restore it";
log.error(msg, e); log.error(msg, e);
return Response.status(Response.Status.NOT_FOUND).entity(msg).build(); return Response.status(Response.Status.NOT_FOUND).entity(msg).build();
} catch (MetadataManagementException e) { } 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, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * 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, * Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * 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, * Entgra (pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * 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, * Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * 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, * Entgra (pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * 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, * Entgra (pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * 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, * Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * 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, * Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * 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, * Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * 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, * Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * 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, * Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * 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, * Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * 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, * Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * 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, * Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * 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); Metadata metadata = metadataDAO.getMetadata(tenantId, MetadataConstants.WHITELABEL_META_KEY);
if (metadata == null) { if (metadata == null) {
String msg = "Whitelabel theme not found for tenant: " + tenantId; String msg = "Whitelabel theme not found for tenant: " + tenantId;
log.debug(msg); log.error(msg);
throw new NotFoundException(msg); throw new NotFoundException(msg);
} }
return new Gson().fromJson(metadata.getMetaValue(), WhiteLabelTheme.class); 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, * Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * 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, * Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except

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

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

Loading…
Cancel
Save