mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Add special warning message for Factory Reset, Enterprise Wipe, disneroll operations.
This commit is contained in:
parent
00686e75d1
commit
77a521e550
@ -93,6 +93,20 @@ public class Feature implements Serializable {
|
||||
)
|
||||
private List<MetadataEntry> metadataEntries;
|
||||
|
||||
@ApiModelProperty(
|
||||
name = "confirmationTexts",
|
||||
value = "Disenroll delete confirmation modal texts.",
|
||||
required = false
|
||||
)
|
||||
private ConfirmationTexts confirmationTexts;
|
||||
|
||||
@ApiModelProperty(
|
||||
name = "dangerZoneTooltipTexts",
|
||||
value = "Danger zone tooltip texts.",
|
||||
required = false
|
||||
)
|
||||
private DangerZoneTooltipTexts dangerZoneTooltipTexts;
|
||||
|
||||
@XmlElement
|
||||
public int getId() {
|
||||
return id;
|
||||
@ -173,6 +187,24 @@ public class Feature implements Serializable {
|
||||
this.hidden = hidden;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public ConfirmationTexts getConfirmationTexts() {
|
||||
return confirmationTexts;
|
||||
}
|
||||
|
||||
public void setConfirmationTexts(ConfirmationTexts confirmationTexts) {
|
||||
this.confirmationTexts = confirmationTexts;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public DangerZoneTooltipTexts getDangerZoneTooltipTexts() {
|
||||
return dangerZoneTooltipTexts;
|
||||
}
|
||||
|
||||
public void setDangerZoneTooltipTexts(DangerZoneTooltipTexts dangerZoneTooltipTexts) {
|
||||
this.dangerZoneTooltipTexts = dangerZoneTooltipTexts;
|
||||
}
|
||||
|
||||
public static class MetadataEntry implements Serializable {
|
||||
|
||||
private int id;
|
||||
@ -203,4 +235,136 @@ public class Feature implements Serializable {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
|
||||
public static class ConfirmationTexts implements Serializable {
|
||||
private int id;
|
||||
private String deleteConfirmModalTitle;
|
||||
private String deleteConfirmModalText;
|
||||
private String deleteConfirmationTextDescribe;
|
||||
private String deleteConfirmationText;
|
||||
private String cancelText;
|
||||
private String confirmText;
|
||||
private String inputLabel;
|
||||
private String inputRequireMessage;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getCancelText() {
|
||||
return cancelText;
|
||||
}
|
||||
|
||||
public void setCancelText(String cancelText) {
|
||||
this.cancelText = cancelText;
|
||||
}
|
||||
|
||||
public String getConfirmText() {
|
||||
return confirmText;
|
||||
}
|
||||
|
||||
public void setConfirmText(String confirmText) {
|
||||
this.confirmText = confirmText;
|
||||
}
|
||||
|
||||
public String getInputLabel() {
|
||||
return inputLabel;
|
||||
}
|
||||
|
||||
public void setInputLabel(String inputLabel) {
|
||||
this.inputLabel = inputLabel;
|
||||
}
|
||||
|
||||
public String getInputRequireMessage() {
|
||||
return inputRequireMessage;
|
||||
}
|
||||
|
||||
public void setInputRequireMessage(String inputRequireMessage) {
|
||||
this.inputRequireMessage = inputRequireMessage;
|
||||
}
|
||||
|
||||
public String getDeleteConfirmModalTitle() {
|
||||
return deleteConfirmModalTitle;
|
||||
}
|
||||
|
||||
public void setDeleteConfirmModalTitle(String deleteConfirmModalTitle) {
|
||||
this.deleteConfirmModalTitle = deleteConfirmModalTitle;
|
||||
}
|
||||
|
||||
public String getDeleteConfirmModalText() {
|
||||
return deleteConfirmModalText;
|
||||
}
|
||||
|
||||
public void setDeleteConfirmModalText(String deleteConfirmModalText) {
|
||||
this.deleteConfirmModalText = deleteConfirmModalText;
|
||||
}
|
||||
|
||||
public String getDeleteConfirmationTextDescribe() {
|
||||
return deleteConfirmationTextDescribe;
|
||||
}
|
||||
|
||||
public void setDeleteConfirmationTextDescribe(String deleteConfirmationTextDescribe) {
|
||||
this.deleteConfirmationTextDescribe = deleteConfirmationTextDescribe;
|
||||
}
|
||||
|
||||
public String getDeleteConfirmationText() {
|
||||
return deleteConfirmationText;
|
||||
}
|
||||
|
||||
public void setDeleteConfirmationText(String deleteConfirmationText) {
|
||||
this.deleteConfirmationText = deleteConfirmationText;
|
||||
}
|
||||
}
|
||||
|
||||
public static class DangerZoneTooltipTexts implements Serializable {
|
||||
private String toolTipTitle;
|
||||
private String toolTipPopConfirmText;
|
||||
private String confirmText;
|
||||
private String cancelText;
|
||||
private String toolTipAvailable;
|
||||
|
||||
public String getToolTipAvailable() {
|
||||
return toolTipAvailable;
|
||||
}
|
||||
|
||||
public void setToolTipAvailable(String toolTipAvailable) {
|
||||
this.toolTipAvailable = toolTipAvailable;
|
||||
}
|
||||
|
||||
public String getToolTipTitle() {
|
||||
return toolTipTitle;
|
||||
}
|
||||
|
||||
public void setToolTipTitle(String toolTipTitle) {
|
||||
this.toolTipTitle = toolTipTitle;
|
||||
}
|
||||
|
||||
public String getToolTipPopConfirmText() {
|
||||
return toolTipPopConfirmText;
|
||||
}
|
||||
|
||||
public void setToolTipPopConfirmText(String toolTipPopConfirmText) {
|
||||
this.toolTipPopConfirmText = toolTipPopConfirmText;
|
||||
}
|
||||
|
||||
public String getConfirmText() {
|
||||
return confirmText;
|
||||
}
|
||||
|
||||
public void setConfirmText(String confirmText) {
|
||||
this.confirmText = confirmText;
|
||||
}
|
||||
|
||||
public String getCancelText() {
|
||||
return cancelText;
|
||||
}
|
||||
|
||||
public void setCancelText(String cancelText) {
|
||||
this.cancelText = cancelText;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -79,6 +79,29 @@ public class HTTPDeviceTypeManagerService extends DeviceTypeManagerService imple
|
||||
}
|
||||
configFeature.setMetaData(metaValues);
|
||||
}
|
||||
if (feature.getConfirmationTexts() != null) {
|
||||
List<String> confirmationTextValues = new ArrayList<>();
|
||||
Feature.ConfirmationTexts confirmationText = feature.getConfirmationTexts();
|
||||
confirmationTextValues.add(confirmationText.getDeleteConfirmModalTitle());
|
||||
confirmationTextValues.add(confirmationText.getDeleteConfirmModalText());
|
||||
confirmationTextValues.add(confirmationText.getDeleteConfirmationTextDescribe());
|
||||
confirmationTextValues.add(confirmationText.getDeleteConfirmationText());
|
||||
confirmationTextValues.add(confirmationText.getCancelText());
|
||||
confirmationTextValues.add(confirmationText.getConfirmText());
|
||||
confirmationTextValues.add(confirmationText.getInputLabel());
|
||||
confirmationTextValues.add(confirmationText.getInputRequireMessage());
|
||||
configFeature.setConfirmationTexts(confirmationTextValues);
|
||||
}
|
||||
if (feature.getDangerZoneTooltipTexts() != null) {
|
||||
List<String> dangerZoneTextValues = new ArrayList<>();
|
||||
Feature.DangerZoneTooltipTexts dangerZoneText = feature.getDangerZoneTooltipTexts();
|
||||
dangerZoneTextValues.add(dangerZoneText.getToolTipTitle());
|
||||
dangerZoneTextValues.add(dangerZoneText.getToolTipPopConfirmText());
|
||||
dangerZoneTextValues.add(dangerZoneText.getConfirmText());
|
||||
dangerZoneTextValues.add(dangerZoneText.getCancelText());
|
||||
dangerZoneTextValues.add(dangerZoneText.getToolTipAvailable());
|
||||
configFeature.setDangerZoneTooltipTexts(dangerZoneTextValues);
|
||||
}
|
||||
featureList.add(configFeature);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,127 @@
|
||||
/*
|
||||
* Copyright (c) 2018 - 2024, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
|
||||
*
|
||||
* Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
|
||||
* Version 2.0 (the "License"); you may not use this file except
|
||||
* in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.entgra.device.mgt.core.device.mgt.extensions.device.type.template.config;
|
||||
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "confirmationTexts", propOrder = {
|
||||
"deleteConfirmModalTitle",
|
||||
"deleteConfirmModalText",
|
||||
"deleteConfirmationTextDescribe",
|
||||
"deleteConfirmationText",
|
||||
"cancelText",
|
||||
"confirmText",
|
||||
"inputLabel",
|
||||
"inputRequireMessage"
|
||||
})
|
||||
public class ConfirmationTexts {
|
||||
|
||||
@XmlElement(name = "deleteConfirmModalTitle")
|
||||
private String deleteConfirmModalTitle;
|
||||
|
||||
@XmlElement(name = "deleteConfirmModalText")
|
||||
private String deleteConfirmModalText;
|
||||
|
||||
@XmlElement(name = "deleteConfirmationTextDescribe")
|
||||
private String deleteConfirmationTextDescribe;
|
||||
|
||||
@XmlElement(name = "deleteConfirmationText")
|
||||
private String deleteConfirmationText;
|
||||
|
||||
@XmlElement(name = "cancelText")
|
||||
private String cancelText;
|
||||
|
||||
@XmlElement(name = "confirmText")
|
||||
private String confirmText;
|
||||
|
||||
@XmlElement(name = "inputLabel")
|
||||
private String inputLabel;
|
||||
|
||||
@XmlElement(name = "inputRequireMessage")
|
||||
private String inputRequireMessage;
|
||||
|
||||
public String getCancelText() {
|
||||
return cancelText;
|
||||
}
|
||||
|
||||
public void setCancelText(String cancelText) {
|
||||
this.cancelText = cancelText;
|
||||
}
|
||||
|
||||
public String getInputRequireMessage() {
|
||||
return inputRequireMessage;
|
||||
}
|
||||
|
||||
public void setInputRequireMessage(String inputRequireMessage) {
|
||||
this.inputRequireMessage = inputRequireMessage;
|
||||
}
|
||||
|
||||
public String getInputLabel() {
|
||||
return inputLabel;
|
||||
}
|
||||
|
||||
public void setInputLabel(String inputLabel) {
|
||||
this.inputLabel = inputLabel;
|
||||
}
|
||||
|
||||
public String getConfirmText() {
|
||||
return confirmText;
|
||||
}
|
||||
|
||||
public void setConfirmText(String confirmText) {
|
||||
this.confirmText = confirmText;
|
||||
}
|
||||
|
||||
public String getDeleteConfirmModalTitle() {
|
||||
return deleteConfirmModalTitle;
|
||||
}
|
||||
|
||||
public void setDeleteConfirmModalTitle(String deleteConfirmModalTitle) {
|
||||
this.deleteConfirmModalTitle = deleteConfirmModalTitle;
|
||||
}
|
||||
|
||||
public String getDeleteConfirmModalText() {
|
||||
return deleteConfirmModalText;
|
||||
}
|
||||
|
||||
public void setDeleteConfirmModalText(String deleteConfirmModalText) {
|
||||
this.deleteConfirmModalText = deleteConfirmModalText;
|
||||
}
|
||||
|
||||
public String getDeleteConfirmationTextDescribe() {
|
||||
return deleteConfirmationTextDescribe;
|
||||
}
|
||||
|
||||
public void setDeleteConfirmationTextDescribe(String deleteConfirmationTextDescribe) {
|
||||
this.deleteConfirmationTextDescribe = deleteConfirmationTextDescribe;
|
||||
}
|
||||
|
||||
public String getDeleteConfirmationText() {
|
||||
return deleteConfirmationText;
|
||||
}
|
||||
|
||||
public void setDeleteConfirmationText(String deleteConfirmationText) {
|
||||
this.deleteConfirmationText = deleteConfirmationText;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,90 @@
|
||||
/*
|
||||
* Copyright (c) 2018 - 2024, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
|
||||
*
|
||||
* Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
|
||||
* Version 2.0 (the "License"); you may not use this file except
|
||||
* in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.entgra.device.mgt.core.device.mgt.extensions.device.type.template.config;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "dangerZoneTooltipTexts", propOrder = {
|
||||
"toolTipTitle",
|
||||
"toolTipPopConfirmText",
|
||||
"confirmText",
|
||||
"cancelText",
|
||||
"toolTipAvailable"
|
||||
})
|
||||
public class DangerZoneTooltipTexts {
|
||||
|
||||
@XmlElement(name = "toolTipTitle")
|
||||
private String toolTipTitle;
|
||||
|
||||
@XmlElement(name = "toolTipPopConfirmText")
|
||||
private String toolTipPopConfirmText;
|
||||
|
||||
@XmlElement(name = "confirmText")
|
||||
private String confirmText;
|
||||
|
||||
@XmlElement(name = "cancelText")
|
||||
private String cancelText;
|
||||
|
||||
@XmlElement(name = "toolTipAvailable")
|
||||
private String toolTipAvailable;
|
||||
|
||||
public String getToolTipAvailable() {
|
||||
return toolTipAvailable;
|
||||
}
|
||||
|
||||
public void setToolTipAvailable(String toolTipAvailable) {
|
||||
this.toolTipAvailable = toolTipAvailable;
|
||||
}
|
||||
|
||||
public String getToolTipTitle() {
|
||||
return toolTipTitle;
|
||||
}
|
||||
|
||||
public void setToolTipTitle(String toolTipTitle) {
|
||||
this.toolTipTitle = toolTipTitle;
|
||||
}
|
||||
|
||||
public String getToolTipPopConfirmText() {
|
||||
return toolTipPopConfirmText;
|
||||
}
|
||||
|
||||
public void setToolTipPopConfirmText(String toolTipPopConfirmText) {
|
||||
this.toolTipPopConfirmText = toolTipPopConfirmText;
|
||||
}
|
||||
|
||||
public String getConfirmText() {
|
||||
return confirmText;
|
||||
}
|
||||
|
||||
public void setConfirmText(String confirmText) {
|
||||
this.confirmText = confirmText;
|
||||
}
|
||||
|
||||
public String getCancelText() {
|
||||
return cancelText;
|
||||
}
|
||||
|
||||
public void setCancelText(String cancelText) {
|
||||
this.cancelText = cancelText;
|
||||
}
|
||||
}
|
||||
@ -47,7 +47,9 @@ import java.util.List;
|
||||
"description",
|
||||
"tooltip",
|
||||
"operation",
|
||||
"metaData"
|
||||
"metaData",
|
||||
"confirmationTexts",
|
||||
"dangerZoneTooltipTexts"
|
||||
})
|
||||
public class Feature {
|
||||
|
||||
@ -73,6 +75,12 @@ public class Feature {
|
||||
@XmlElement(name = "Property", required = true)
|
||||
private List<String> metaData;
|
||||
|
||||
@XmlElement(name = "ConfirmationTexts", required = false)
|
||||
private List<String> confirmationTexts;
|
||||
|
||||
@XmlElement(name = "DangerZoneTooltipTexts", required = false)
|
||||
private List<String> dangerZoneTooltipTexts;
|
||||
|
||||
/**
|
||||
* Gets the value of the name property.
|
||||
*
|
||||
@ -209,4 +217,20 @@ public class Feature {
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public List<String> getConfirmationTexts() {
|
||||
return confirmationTexts;
|
||||
}
|
||||
|
||||
public void setConfirmationTexts(List<String> confirmationTexts) {
|
||||
this.confirmationTexts = confirmationTexts;
|
||||
}
|
||||
|
||||
public List<String> getDangerZoneTooltipTexts() {
|
||||
return dangerZoneTooltipTexts;
|
||||
}
|
||||
|
||||
public void setDangerZoneTooltipTexts(List<String> dangerZoneTooltipTexts) {
|
||||
this.dangerZoneTooltipTexts = dangerZoneTooltipTexts;
|
||||
}
|
||||
}
|
||||
|
||||
@ -41,8 +41,10 @@ import javax.xml.bind.annotation.*;
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "Operation", propOrder = {
|
||||
"params",
|
||||
"metadata"
|
||||
"params",
|
||||
"metadata",
|
||||
"confirmationTexts",
|
||||
"tooltipTexts"
|
||||
})
|
||||
public class Operation {
|
||||
|
||||
@ -58,6 +60,28 @@ public class Operation {
|
||||
@XmlAttribute(name = "icon")
|
||||
private String icon;
|
||||
|
||||
@XmlElement(name = "tooltipTexts", required = false)
|
||||
private DangerZoneTooltipTexts tooltipTexts;
|
||||
|
||||
@XmlElement(name = "confirmationTexts", required = false)
|
||||
private ConfirmationTexts confirmationTexts;
|
||||
|
||||
public DangerZoneTooltipTexts getTooltipTexts() {
|
||||
return tooltipTexts;
|
||||
}
|
||||
|
||||
public void setTooltipTexts(DangerZoneTooltipTexts tooltipTexts) {
|
||||
this.tooltipTexts = tooltipTexts;
|
||||
}
|
||||
|
||||
public ConfirmationTexts getConfirmationTexts() {
|
||||
return confirmationTexts;
|
||||
}
|
||||
|
||||
public void setConfirmationTexts(ConfirmationTexts confirmationTexts) {
|
||||
this.confirmationTexts = confirmationTexts;
|
||||
}
|
||||
|
||||
public Params getParams() {
|
||||
return params;
|
||||
}
|
||||
|
||||
@ -116,7 +116,32 @@ public class ConfigurationBasedFeatureManager implements FeatureManager {
|
||||
operationMeta.put(UI_PARAMS, uiParams);
|
||||
operationMeta.put(FORM_PARAMS, formParams);
|
||||
}
|
||||
|
||||
if (operation.getConfirmationTexts() != null) {
|
||||
Feature.ConfirmationTexts confirmationTexts = new Feature.ConfirmationTexts();
|
||||
confirmationTexts.setDeleteConfirmModalTitle(
|
||||
operation.getConfirmationTexts().getDeleteConfirmModalTitle());
|
||||
confirmationTexts.setDeleteConfirmModalText(
|
||||
operation.getConfirmationTexts().getDeleteConfirmModalText());
|
||||
confirmationTexts.setDeleteConfirmationTextDescribe(
|
||||
operation.getConfirmationTexts().getDeleteConfirmationTextDescribe());
|
||||
confirmationTexts.setDeleteConfirmationText(
|
||||
operation.getConfirmationTexts().getDeleteConfirmationText());
|
||||
confirmationTexts.setCancelText(operation.getConfirmationTexts().getCancelText());
|
||||
confirmationTexts.setConfirmText(operation.getConfirmationTexts().getConfirmText());
|
||||
confirmationTexts.setInputLabel(operation.getConfirmationTexts().getInputLabel());
|
||||
confirmationTexts.setInputRequireMessage(
|
||||
operation.getConfirmationTexts().getInputRequireMessage());
|
||||
deviceFeature.setConfirmationTexts(confirmationTexts);
|
||||
}
|
||||
if (operation.getTooltipTexts() != null) {
|
||||
Feature.DangerZoneTooltipTexts tooltipTexts = new Feature.DangerZoneTooltipTexts();
|
||||
tooltipTexts.setToolTipTitle(operation.getTooltipTexts().getToolTipTitle());
|
||||
tooltipTexts.setToolTipPopConfirmText(operation.getTooltipTexts().getToolTipPopConfirmText());
|
||||
tooltipTexts.setConfirmText(operation.getTooltipTexts().getConfirmText());
|
||||
tooltipTexts.setCancelText(operation.getTooltipTexts().getCancelText());
|
||||
tooltipTexts.setToolTipAvailable(operation.getTooltipTexts().getToolTipAvailable());
|
||||
deviceFeature.setDangerZoneTooltipTexts(tooltipTexts);
|
||||
}
|
||||
if (metadataEntries == null) {
|
||||
metadataEntries = new ArrayList<>();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user