Add docUrl into metadata.

Nipuni Kavindya 2 months ago
parent fade158e6d
commit dbd0a04723

@ -65,6 +65,13 @@ public class WhiteLabelManagementServiceImpl implements WhiteLabelManagementServ
initializeWhiteLabelThemes();
}
/**
* Initializes white label themes for a tenant by retrieving white label metadata and updating it if necessary.
* If the white label metadata is found and the "DocUrl" is missing,it updates the metadata with the default value
* for DocUrl.
*
* @throws MetadataManagementException if an error occurs while managing metadata or transactions.
*/
private void initializeWhiteLabelThemes() throws MetadataManagementException {
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true);
WhiteLabelTheme defaultTheme = getDefaultWhiteLabelTheme();
@ -83,8 +90,7 @@ 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 (MetadataManagementDAOException e) {
} catch (MetadataManagementDAOException e) {
MetadataManagementDAOFactory.rollbackTransaction();
String msg = "Error occurred while fetching white label metadata for tenant: " + tenantId;
log.error(msg, e);
@ -528,6 +534,7 @@ public class WhiteLabelManagementServiceImpl implements WhiteLabelManagementServ
/**
* Load White label Meta Data for given tenant Id.
*
* @param tenantId Id of the tenant
* @return {@link Metadata}
* @throws MetadataManagementException if an error occurred while getting Meta-Data info from Database for a

Loading…
Cancel
Save