mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Refator page tite to app title
This commit is contained in:
parent
78546125bc
commit
eb061f9450
@ -21,7 +21,6 @@ package org.wso2.carbon.device.mgt.jaxrs.service.impl.util;
|
|||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.JsonSyntaxException;
|
import com.google.gson.JsonSyntaxException;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.commons.lang3.EnumUtils;
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.apache.http.HttpStatus;
|
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.DeviceManagementException;
|
||||||
import org.wso2.carbon.device.mgt.common.exceptions.DeviceTypeNotFoundException;
|
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.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.metadata.mgt.WhiteLabelImageRequestPayload;
|
||||||
import org.wso2.carbon.device.mgt.common.notification.mgt.Notification;
|
import org.wso2.carbon.device.mgt.common.notification.mgt.Notification;
|
||||||
import org.wso2.carbon.device.mgt.core.common.util.HttpUtil;
|
import org.wso2.carbon.device.mgt.core.common.util.HttpUtil;
|
||||||
@ -689,7 +687,7 @@ public class RequestValidationUtil {
|
|||||||
new ErrorResponse.ErrorResponseBuilder()
|
new ErrorResponse.ErrorResponseBuilder()
|
||||||
.setCode(HttpStatus.SC_BAD_REQUEST).setMessage(msg).build());
|
.setCode(HttpStatus.SC_BAD_REQUEST).setMessage(msg).build());
|
||||||
}
|
}
|
||||||
if (whiteLabelThemeCreateRequest.getPageTitle() == null) {
|
if (whiteLabelThemeCreateRequest.getAppTitle() == null) {
|
||||||
String msg = "Page title is required to whitelabel";
|
String msg = "Page title is required to whitelabel";
|
||||||
log.error(msg);
|
log.error(msg);
|
||||||
throw new InputValidationException(
|
throw new InputValidationException(
|
||||||
|
|||||||
@ -22,7 +22,7 @@ public class WhiteLabelTheme {
|
|||||||
private WhiteLabelImage faviconImage;
|
private WhiteLabelImage faviconImage;
|
||||||
private WhiteLabelImage logoImage;
|
private WhiteLabelImage logoImage;
|
||||||
private String footerText;
|
private String footerText;
|
||||||
private String pageTitle;
|
private String appTitle;
|
||||||
|
|
||||||
public String getFooterText() {
|
public String getFooterText() {
|
||||||
return footerText;
|
return footerText;
|
||||||
@ -48,11 +48,11 @@ public class WhiteLabelTheme {
|
|||||||
this.logoImage = logoImage;
|
this.logoImage = logoImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPageTitle() {
|
public String getAppTitle() {
|
||||||
return pageTitle;
|
return appTitle;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPageTitle(String pageTitle) {
|
public void setAppTitle(String appTitle) {
|
||||||
this.pageTitle = pageTitle;
|
this.appTitle = appTitle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,7 +22,7 @@ public class WhiteLabelThemeCreateRequest {
|
|||||||
private WhiteLabelImageRequestPayload favicon;
|
private WhiteLabelImageRequestPayload favicon;
|
||||||
private WhiteLabelImageRequestPayload logo;
|
private WhiteLabelImageRequestPayload logo;
|
||||||
private String footerText;
|
private String footerText;
|
||||||
private String pageTitle;
|
private String appTitle;
|
||||||
|
|
||||||
public WhiteLabelImageRequestPayload getFavicon() {
|
public WhiteLabelImageRequestPayload getFavicon() {
|
||||||
return favicon;
|
return favicon;
|
||||||
@ -48,11 +48,11 @@ public class WhiteLabelThemeCreateRequest {
|
|||||||
this.footerText = footerText;
|
this.footerText = footerText;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPageTitle() {
|
public String getAppTitle() {
|
||||||
return pageTitle;
|
return appTitle;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPageTitle(String pageTitle) {
|
public void setAppTitle(String appTitle) {
|
||||||
this.pageTitle = pageTitle;
|
this.appTitle = appTitle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,7 +24,7 @@ import javax.xml.bind.annotation.XmlRootElement;
|
|||||||
@XmlRootElement(name = "WhiteLabelConfiguration")
|
@XmlRootElement(name = "WhiteLabelConfiguration")
|
||||||
public class WhiteLabelConfiguration {
|
public class WhiteLabelConfiguration {
|
||||||
private String footerText;
|
private String footerText;
|
||||||
private String pageTitle;
|
private String appTitle;
|
||||||
private WhiteLabelImages whiteLabelImages;
|
private WhiteLabelImages whiteLabelImages;
|
||||||
|
|
||||||
@XmlElement(name = "FooterText", required = true)
|
@XmlElement(name = "FooterText", required = true)
|
||||||
@ -45,12 +45,12 @@ public class WhiteLabelConfiguration {
|
|||||||
this.whiteLabelImages = whiteLabelImages;
|
this.whiteLabelImages = whiteLabelImages;
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlElement(name = "PageTitle", required = true)
|
@XmlElement(name = "AppTitle", required = true)
|
||||||
public String getPageTitle() {
|
public String getAppTitle() {
|
||||||
return pageTitle;
|
return appTitle;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPageTitle(String pageTitle) {
|
public void setAppTitle(String appTitle) {
|
||||||
this.pageTitle = pageTitle;
|
this.appTitle = appTitle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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.WhiteLabelManagementService;
|
||||||
import org.wso2.carbon.device.mgt.common.metadata.mgt.WhiteLabelTheme;
|
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.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.common.util.HttpUtil;
|
||||||
import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager;
|
import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager;
|
||||||
import org.wso2.carbon.device.mgt.core.config.metadata.mgt.MetaDataConfiguration;
|
import org.wso2.carbon.device.mgt.core.config.metadata.mgt.MetaDataConfiguration;
|
||||||
@ -165,12 +164,12 @@ public class WhiteLabelManagementServiceImpl implements WhiteLabelManagementServ
|
|||||||
*/
|
*/
|
||||||
private WhiteLabelTheme getDefaultWhiteLabelTheme() {
|
private WhiteLabelTheme getDefaultWhiteLabelTheme() {
|
||||||
String footerText = getDefaultFooterText();
|
String footerText = getDefaultFooterText();
|
||||||
String pageTitle = getDefaultPageTitle();
|
String appTitle = getDefaultAppTitle();
|
||||||
WhiteLabelImage favicon = constructDefaultFaviconImage();
|
WhiteLabelImage favicon = constructDefaultFaviconImage();
|
||||||
WhiteLabelImage logo = constructDefaultLogoImage();
|
WhiteLabelImage logo = constructDefaultLogoImage();
|
||||||
WhiteLabelTheme defaultTheme = new WhiteLabelTheme();
|
WhiteLabelTheme defaultTheme = new WhiteLabelTheme();
|
||||||
defaultTheme.setFooterText(footerText);
|
defaultTheme.setFooterText(footerText);
|
||||||
defaultTheme.setPageTitle(pageTitle);
|
defaultTheme.setAppTitle(appTitle);
|
||||||
defaultTheme.setLogoImage(logo);
|
defaultTheme.setLogoImage(logo);
|
||||||
defaultTheme.setFaviconImage(favicon);
|
defaultTheme.setFaviconImage(favicon);
|
||||||
return defaultTheme;
|
return defaultTheme;
|
||||||
@ -179,11 +178,11 @@ public class WhiteLabelManagementServiceImpl implements WhiteLabelManagementServ
|
|||||||
/**
|
/**
|
||||||
* Get default whitelabel label page title from config
|
* Get default whitelabel label page title from config
|
||||||
*/
|
*/
|
||||||
private String getDefaultPageTitle() {
|
private String getDefaultAppTitle() {
|
||||||
MetaDataConfiguration metaDataConfiguration = DeviceConfigurationManager.getInstance().
|
MetaDataConfiguration metaDataConfiguration = DeviceConfigurationManager.getInstance().
|
||||||
getDeviceManagementConfig().getMetaDataConfiguration();
|
getDeviceManagementConfig().getMetaDataConfiguration();
|
||||||
WhiteLabelConfiguration whiteLabelConfiguration = metaDataConfiguration.getWhiteLabelConfiguration();
|
WhiteLabelConfiguration whiteLabelConfiguration = metaDataConfiguration.getWhiteLabelConfiguration();
|
||||||
return whiteLabelConfiguration.getPageTitle();
|
return whiteLabelConfiguration.getAppTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -331,7 +330,7 @@ public class WhiteLabelManagementServiceImpl implements WhiteLabelManagementServ
|
|||||||
whiteLabelTheme.setFaviconImage(faviconImage);
|
whiteLabelTheme.setFaviconImage(faviconImage);
|
||||||
whiteLabelTheme.setLogoImage(logoImage);
|
whiteLabelTheme.setLogoImage(logoImage);
|
||||||
whiteLabelTheme.setFooterText(whiteLabelThemeCreateRequest.getFooterText());
|
whiteLabelTheme.setFooterText(whiteLabelThemeCreateRequest.getFooterText());
|
||||||
whiteLabelTheme.setPageTitle(whiteLabelThemeCreateRequest.getPageTitle());
|
whiteLabelTheme.setAppTitle(whiteLabelThemeCreateRequest.getAppTitle());
|
||||||
return whiteLabelTheme;
|
return whiteLabelTheme;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -187,7 +187,7 @@
|
|||||||
IoT Server 5.0.0 | © 2022
|
IoT Server 5.0.0 | © 2022
|
||||||
, All Rights Reserved.
|
, All Rights Reserved.
|
||||||
</FooterText>
|
</FooterText>
|
||||||
<PageTitle>Entgra Endpoint Management</PageTitle>
|
<AppTitle>Entgra</AppTitle>
|
||||||
<WhiteLabelImages>
|
<WhiteLabelImages>
|
||||||
<StoragePath>repository/resources/whitelabel</StoragePath>
|
<StoragePath>repository/resources/whitelabel</StoragePath>
|
||||||
<DefaultFaviconName>favicon.png</DefaultFaviconName>
|
<DefaultFaviconName>favicon.png</DefaultFaviconName>
|
||||||
|
|||||||
@ -320,7 +320,7 @@
|
|||||||
IoT Server 5.0.0 | © 2022
|
IoT Server 5.0.0 | © 2022
|
||||||
, All Rights Reserved.
|
, All Rights Reserved.
|
||||||
</FooterText>
|
</FooterText>
|
||||||
<PageTitle>Entgra Endpoint Management</PageTitle>
|
<AppTitle>Entgra</AppTitle>
|
||||||
<WhiteLabelImages>
|
<WhiteLabelImages>
|
||||||
<StoragePath>repository/resources/whitelabel</StoragePath>
|
<StoragePath>repository/resources/whitelabel</StoragePath>
|
||||||
<DefaultFaviconName>favicon.png</DefaultFaviconName>
|
<DefaultFaviconName>favicon.png</DefaultFaviconName>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user