Add docUrl into metadata.

Nipuni Kavindya 2 months ago
parent 26a54a7a49
commit db205de5b4

@ -68,7 +68,6 @@ public class WhiteLabelManagementServiceImpl implements WhiteLabelManagementServ
private void initializeWhiteLabelThemes() throws MetadataManagementException {
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true);
WhiteLabelTheme defaultTheme = getDefaultWhiteLabelTheme();
try {
Metadata whiteLabelMetadata = getWhiteLabelMetaData(tenantId);
if (whiteLabelMetadata != null) {
WhiteLabelTheme whiteLabelTheme = new Gson().fromJson(whiteLabelMetadata.getMetaValue(),
@ -84,25 +83,25 @@ public class WhiteLabelManagementServiceImpl implements WhiteLabelManagementServ
log.debug("WhiteLabel theme's DocUrl was missing and has been updated to the default value " +
"for tenant: " + tenantId);
}
} catch (TransactionManagementException e) {
MetadataManagementDAOFactory.rollbackTransaction();
String transactionErrorMsg = "Transaction failed while updating white label theme for tenant: "
+ tenantId;
log.error(transactionErrorMsg, e);
throw new MetadataManagementException(transactionErrorMsg, e);
}
}
} else {
addDefaultWhiteLabelThemeIfNotExist(tenantId);
}
} catch (MetadataManagementDAOException e) {
catch (MetadataManagementDAOException e) {
MetadataManagementDAOFactory.rollbackTransaction();
String msg = "Error occurred while fetching white label metadata for tenant: " + tenantId;
log.error(msg, e);
throw new MetadataManagementException(msg, e);
} catch (TransactionManagementException e) {
String msg = "Transaction failed while updating white label theme for tenant: "
+ tenantId;
log.error(msg, e);
throw new MetadataManagementException(msg, e);
} finally {
MetadataManagementDAOFactory.closeConnection();
}
}
} else {
addDefaultWhiteLabelThemeIfNotExist(tenantId);
}
}
@Override
public FileResponse getWhiteLabelFavicon(String tenantDomain) throws MetadataManagementException, NotFoundException {

Loading…
Cancel
Save