diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/util/RequestValidationUtil.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/util/RequestValidationUtil.java index d8c4efb7ac..bc41d45848 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/util/RequestValidationUtil.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/util/RequestValidationUtil.java @@ -21,7 +21,6 @@ package org.wso2.carbon.device.mgt.jaxrs.service.impl.util; import com.google.gson.Gson; import com.google.gson.JsonSyntaxException; import org.apache.commons.lang.StringUtils; -import org.apache.commons.lang3.EnumUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.http.HttpStatus; @@ -35,7 +34,6 @@ import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException; import org.wso2.carbon.device.mgt.common.exceptions.DeviceTypeNotFoundException; import org.wso2.carbon.device.mgt.common.metadata.mgt.Metadata; -import org.wso2.carbon.device.mgt.common.metadata.mgt.WhiteLabelImage; import org.wso2.carbon.device.mgt.common.metadata.mgt.WhiteLabelImageRequestPayload; import org.wso2.carbon.device.mgt.common.notification.mgt.Notification; import org.wso2.carbon.device.mgt.core.common.util.HttpUtil; @@ -689,7 +687,7 @@ public class RequestValidationUtil { new ErrorResponse.ErrorResponseBuilder() .setCode(HttpStatus.SC_BAD_REQUEST).setMessage(msg).build()); } - if (whiteLabelThemeCreateRequest.getPageTitle() == null) { + if (whiteLabelThemeCreateRequest.getAppTitle() == null) { String msg = "Page title is required to whitelabel"; log.error(msg); throw new InputValidationException( diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/metadata/mgt/WhiteLabelTheme.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/metadata/mgt/WhiteLabelTheme.java index 5b0dbfaca4..0b71979843 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/metadata/mgt/WhiteLabelTheme.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/metadata/mgt/WhiteLabelTheme.java @@ -22,7 +22,7 @@ public class WhiteLabelTheme { private WhiteLabelImage faviconImage; private WhiteLabelImage logoImage; private String footerText; - private String pageTitle; + private String appTitle; public String getFooterText() { return footerText; @@ -48,11 +48,11 @@ public class WhiteLabelTheme { this.logoImage = logoImage; } - public String getPageTitle() { - return pageTitle; + public String getAppTitle() { + return appTitle; } - public void setPageTitle(String pageTitle) { - this.pageTitle = pageTitle; + public void setAppTitle(String appTitle) { + this.appTitle = appTitle; } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/metadata/mgt/WhiteLabelThemeCreateRequest.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/metadata/mgt/WhiteLabelThemeCreateRequest.java index f1664371d9..4b720eeec4 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/metadata/mgt/WhiteLabelThemeCreateRequest.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/metadata/mgt/WhiteLabelThemeCreateRequest.java @@ -22,7 +22,7 @@ public class WhiteLabelThemeCreateRequest { private WhiteLabelImageRequestPayload favicon; private WhiteLabelImageRequestPayload logo; private String footerText; - private String pageTitle; + private String appTitle; public WhiteLabelImageRequestPayload getFavicon() { return favicon; @@ -48,11 +48,11 @@ public class WhiteLabelThemeCreateRequest { this.footerText = footerText; } - public String getPageTitle() { - return pageTitle; + public String getAppTitle() { + return appTitle; } - public void setPageTitle(String pageTitle) { - this.pageTitle = pageTitle; + public void setAppTitle(String appTitle) { + this.appTitle = appTitle; } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/metadata/mgt/whitelabel/WhiteLabelConfiguration.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/metadata/mgt/whitelabel/WhiteLabelConfiguration.java index 2424768a37..1fa808f5a7 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/metadata/mgt/whitelabel/WhiteLabelConfiguration.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/metadata/mgt/whitelabel/WhiteLabelConfiguration.java @@ -24,7 +24,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement(name = "WhiteLabelConfiguration") public class WhiteLabelConfiguration { private String footerText; - private String pageTitle; + private String appTitle; private WhiteLabelImages whiteLabelImages; @XmlElement(name = "FooterText", required = true) @@ -45,12 +45,12 @@ public class WhiteLabelConfiguration { this.whiteLabelImages = whiteLabelImages; } - @XmlElement(name = "PageTitle", required = true) - public String getPageTitle() { - return pageTitle; + @XmlElement(name = "AppTitle", required = true) + public String getAppTitle() { + return appTitle; } - public void setPageTitle(String pageTitle) { - this.pageTitle = pageTitle; + public void setAppTitle(String appTitle) { + this.appTitle = appTitle; } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/metadata/mgt/WhiteLabelManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/metadata/mgt/WhiteLabelManagementServiceImpl.java index 32008015f5..d816e63291 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/metadata/mgt/WhiteLabelManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/metadata/mgt/WhiteLabelManagementServiceImpl.java @@ -38,7 +38,6 @@ import org.wso2.carbon.device.mgt.common.metadata.mgt.WhiteLabelImageRequestPayl import org.wso2.carbon.device.mgt.common.metadata.mgt.WhiteLabelManagementService; import org.wso2.carbon.device.mgt.common.metadata.mgt.WhiteLabelTheme; import org.wso2.carbon.device.mgt.common.metadata.mgt.WhiteLabelThemeCreateRequest; -import org.wso2.carbon.device.mgt.core.common.util.FileUtil; import org.wso2.carbon.device.mgt.core.common.util.HttpUtil; import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager; import org.wso2.carbon.device.mgt.core.config.metadata.mgt.MetaDataConfiguration; @@ -165,12 +164,12 @@ public class WhiteLabelManagementServiceImpl implements WhiteLabelManagementServ */ private WhiteLabelTheme getDefaultWhiteLabelTheme() { String footerText = getDefaultFooterText(); - String pageTitle = getDefaultPageTitle(); + String appTitle = getDefaultAppTitle(); WhiteLabelImage favicon = constructDefaultFaviconImage(); WhiteLabelImage logo = constructDefaultLogoImage(); WhiteLabelTheme defaultTheme = new WhiteLabelTheme(); defaultTheme.setFooterText(footerText); - defaultTheme.setPageTitle(pageTitle); + defaultTheme.setAppTitle(appTitle); defaultTheme.setLogoImage(logo); defaultTheme.setFaviconImage(favicon); return defaultTheme; @@ -179,11 +178,11 @@ public class WhiteLabelManagementServiceImpl implements WhiteLabelManagementServ /** * Get default whitelabel label page title from config */ - private String getDefaultPageTitle() { + private String getDefaultAppTitle() { MetaDataConfiguration metaDataConfiguration = DeviceConfigurationManager.getInstance(). getDeviceManagementConfig().getMetaDataConfiguration(); WhiteLabelConfiguration whiteLabelConfiguration = metaDataConfiguration.getWhiteLabelConfiguration(); - return whiteLabelConfiguration.getPageTitle(); + return whiteLabelConfiguration.getAppTitle(); } /** @@ -331,7 +330,7 @@ public class WhiteLabelManagementServiceImpl implements WhiteLabelManagementServ whiteLabelTheme.setFaviconImage(faviconImage); whiteLabelTheme.setLogoImage(logoImage); whiteLabelTheme.setFooterText(whiteLabelThemeCreateRequest.getFooterText()); - whiteLabelTheme.setPageTitle(whiteLabelThemeCreateRequest.getPageTitle()); + whiteLabelTheme.setAppTitle(whiteLabelThemeCreateRequest.getAppTitle()); return whiteLabelTheme; } diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/cdm-config.xml b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/cdm-config.xml index f7e815596c..97d152235e 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/cdm-config.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/cdm-config.xml @@ -187,7 +187,7 @@ IoT Server 5.0.0 | © 2022 , All Rights Reserved. - Entgra Endpoint Management + Entgra repository/resources/whitelabel favicon.png diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/cdm-config.xml.j2 b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/cdm-config.xml.j2 index 5190cf1c32..c929882826 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/cdm-config.xml.j2 +++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/cdm-config.xml.j2 @@ -320,7 +320,7 @@ IoT Server 5.0.0 | © 2022 , All Rights Reserved. - Entgra Endpoint Management + Entgra repository/resources/whitelabel favicon.png