diff --git a/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/pom.xml b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/pom.xml new file mode 100644 index 0000000000..4f6fcd9a54 --- /dev/null +++ b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/pom.xml @@ -0,0 +1,77 @@ + + + + + + + io.entgra.device.mgt.core + cea-mgt + 5.0.38-SNAPSHOT + ../pom.xml + + + 4.0.0 + io.entgra.device.mgt.core.cea.mgt.common + bundle + Entgra IoT - CEA Management Common + Entgra IoT - Conditional Email Access Management Common + + + + + org.apache.felix + maven-scr-plugin + + + org.apache.felix + maven-bundle-plugin + true + + + ${project.artifactId} + ${project.artifactId} + ${io.entgra.device.mgt.core.version} + CEA Management Common Bundle + + org.apache.commons.logging, + io.entgra.device.mgt.core.device.mgt.common.* + + + io.entgra.device.mgt.core.cea.mgt.common.* + + + + + + + + + + io.entgra.device.mgt.core + io.entgra.device.mgt.core.device.mgt.common + + + io.swagger + swagger-annotations + + + \ No newline at end of file diff --git a/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/AccessPolicy.java b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/AccessPolicy.java new file mode 100644 index 0000000000..a874557092 --- /dev/null +++ b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/AccessPolicy.java @@ -0,0 +1,66 @@ +/* + * 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.cea.mgt.common.bean; + +import io.entgra.device.mgt.core.cea.mgt.common.bean.enums.DefaultAccessPolicy; +import io.entgra.device.mgt.core.cea.mgt.common.bean.enums.EmailOutlookAccessPolicy; +import io.entgra.device.mgt.core.cea.mgt.common.bean.enums.POPIMAPAccessPolicy; +import io.entgra.device.mgt.core.cea.mgt.common.bean.enums.WebOutlookAccessPolicy; + +import java.util.Set; + +public class AccessPolicy { + private DefaultAccessPolicy defaultAccessPolicy; + private Set emailOutlookAccessPolicy; + private POPIMAPAccessPolicy POPIMAPAccessPolicy; + private WebOutlookAccessPolicy webOutlookAccessPolicy; + + public DefaultAccessPolicy getDefaultAccessPolicy() { + return defaultAccessPolicy; + } + + public void setDefaultAccessPolicy(DefaultAccessPolicy defaultAccessPolicy) { + this.defaultAccessPolicy = defaultAccessPolicy; + } + + public Set getEmailOutlookAccessPolicy() { + return emailOutlookAccessPolicy; + } + + public void setEmailOutlookAccessPolicy(Set emailOutlookAccessPolicy) { + this.emailOutlookAccessPolicy = emailOutlookAccessPolicy; + } + + public POPIMAPAccessPolicy getPOPIMAPAccessPolicy() { + return POPIMAPAccessPolicy; + } + + public void setPOPIMAPAccessPolicy(POPIMAPAccessPolicy POPIMAPAccessPolicy) { + this.POPIMAPAccessPolicy = POPIMAPAccessPolicy; + } + + public WebOutlookAccessPolicy getWebOutlookAccessPolicy() { + return webOutlookAccessPolicy; + } + + public void setWebOutlookAccessPolicy(WebOutlookAccessPolicy webOutlookAccessPolicy) { + this.webOutlookAccessPolicy = webOutlookAccessPolicy; + } +} diff --git a/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ActiveSyncDevice.java b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ActiveSyncDevice.java new file mode 100644 index 0000000000..12c8987e09 --- /dev/null +++ b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ActiveSyncDevice.java @@ -0,0 +1,84 @@ +/* + * 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.cea.mgt.common.bean; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.util.Date; +import java.util.Objects; + +public class ActiveSyncDevice { + @JsonProperty(value = "DeviceID", required = true) + private String deviceId; + @JsonProperty(value = "FirstSyncTime", required = true) + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss") + private Date firstSyncTime; + @JsonProperty(value = "UserPrincipalName", required = true) + private String userPrincipalName; + @JsonProperty(value = "Identity", required = true) + private String identity; + + public String getDeviceId() { + return deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public Date getFirstSyncTime() { + return firstSyncTime; + } + + public void setFirstSyncTime(Date firstSyncTime) { + this.firstSyncTime = firstSyncTime; + } + + public String getIdentity() { + return identity; + } + + public void setIdentity(String identity) { + this.identity = identity; + } + + public String getUserPrincipalName() { + return userPrincipalName; + } + + public void setUserPrincipalName(String userPrincipalName) { + this.userPrincipalName = userPrincipalName; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof ActiveSyncDevice)) return false; + ActiveSyncDevice that = (ActiveSyncDevice) o; + return Objects.equals(deviceId, that.deviceId) + && Objects.equals(userPrincipalName, that.userPrincipalName); + } + + @Override + public int hashCode() { + return Objects.hash(deviceId, userPrincipalName, identity); + } +} diff --git a/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ActiveSyncServer.java b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ActiveSyncServer.java new file mode 100644 index 0000000000..b4045b4f02 --- /dev/null +++ b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ActiveSyncServer.java @@ -0,0 +1,74 @@ +/* + * 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.cea.mgt.common.bean; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +@ApiModel(value = "ActiveSyncServer", description = "Active sync server properties") +public class ActiveSyncServer { + @JsonProperty(value = "key", required = true) + @ApiModelProperty(name = "key", value = "Key describing the server type according to cea-config.xml", required = true) + private String key; + + @JsonProperty(value = "gatewayUrl", required = true) + @ApiModelProperty(name = "gatewayUrl", value = "Gateway URL of the active sync server", required = true) + private String gatewayUrl; + + @JsonProperty(value = "client", required = true) + @ApiModelProperty(name = "client", value = "Client identifier", required = true) + private String client; + @JsonProperty(value = "secret", required = true) + @ApiModelProperty(name = "secret", value = "Client secret", required = true) + private String secret; + + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public String getGatewayUrl() { + return gatewayUrl; + } + + public void setGatewayUrl(String gatewayUrl) { + this.gatewayUrl = gatewayUrl; + } + + public String getClient() { + return client; + } + + public void setClient(String client) { + this.client = client; + } + + public String getSecret() { + return secret; + } + + public void setSecret(String secret) { + this.secret = secret; + } +} diff --git a/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ActiveSyncServerUIConfiguration.java b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ActiveSyncServerUIConfiguration.java new file mode 100644 index 0000000000..7db46e5d28 --- /dev/null +++ b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ActiveSyncServerUIConfiguration.java @@ -0,0 +1,50 @@ +/* + * 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.cea.mgt.common.bean; + +public class ActiveSyncServerUIConfiguration { + private String name; + private String description; + private String key; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } +} diff --git a/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/AndroidEASIdentifier.java b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/AndroidEASIdentifier.java new file mode 100644 index 0000000000..e38b43cbf9 --- /dev/null +++ b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/AndroidEASIdentifier.java @@ -0,0 +1,32 @@ +/* + * 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.cea.mgt.common.bean; + +public class AndroidEASIdentifier { + private String identifier; + + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(String identifier) { + this.identifier = identifier; + } +} diff --git a/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/CEAPolicy.java b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/CEAPolicy.java new file mode 100644 index 0000000000..33ed04f2c5 --- /dev/null +++ b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/CEAPolicy.java @@ -0,0 +1,99 @@ +/* + * 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.cea.mgt.common.bean; + +import java.io.Serializable; +import java.util.Date; + +public class CEAPolicy implements Serializable { + private static final long serialVersionUID = -4578284769501447L; + private ActiveSyncServer activeSyncServer; + private AccessPolicy accessPolicy; + private GracePeriod gracePeriod; + private Date created; + private Date lastUpdated; + private Date lastSynced; + private boolean isSynced; + private int tenantId; + + public boolean isSynced() { + return isSynced; + } + + public void setSynced(boolean synced) { + isSynced = synced; + } + + public Date getCreated() { + return created; + } + + public void setCreated(Date created) { + this.created = created; + } + + public Date getLastUpdated() { + return lastUpdated; + } + + public void setLastUpdated(Date lastUpdated) { + this.lastUpdated = lastUpdated; + } + + public Date getLastSynced() { + return lastSynced; + } + + public void setLastSynced(Date lastSynced) { + this.lastSynced = lastSynced; + } + + public AccessPolicy getAccessPolicy() { + return accessPolicy; + } + + public void setAccessPolicy(AccessPolicy accessPolicy) { + this.accessPolicy = accessPolicy; + } + + public GracePeriod getGracePeriod() { + return gracePeriod; + } + + public void setGracePeriod(GracePeriod gracePeriod) { + this.gracePeriod = gracePeriod; + } + + public ActiveSyncServer getActiveSyncServer() { + return activeSyncServer; + } + + public void setActiveSyncServer(ActiveSyncServer activeSyncServer) { + this.activeSyncServer = activeSyncServer; + } + + public int getTenantId() { + return tenantId; + } + + public void setTenantId(int tenantId) { + this.tenantId = tenantId; + } +} diff --git a/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/CEAPolicyEASWrapper.java b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/CEAPolicyEASWrapper.java new file mode 100644 index 0000000000..b898ac6cbc --- /dev/null +++ b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/CEAPolicyEASWrapper.java @@ -0,0 +1,43 @@ +/* + * 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.cea.mgt.common.bean; + +import java.util.List; + +public class CEAPolicyEASWrapper { + private List activeSyncDevices; + private CEAPolicy ceaPolicy; + + public List getActiveSyncDevices() { + return activeSyncDevices; + } + + public void setActiveSyncDevices(List activeSyncDevices) { + this.activeSyncDevices = activeSyncDevices; + } + + public CEAPolicy getCeaPolicy() { + return ceaPolicy; + } + + public void setCeaPolicy(CEAPolicy ceaPolicy) { + this.ceaPolicy = ceaPolicy; + } +} diff --git a/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/GracePeriod.java b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/GracePeriod.java new file mode 100644 index 0000000000..51f44fff74 --- /dev/null +++ b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/GracePeriod.java @@ -0,0 +1,43 @@ +/* + * 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.cea.mgt.common.bean; + +import io.entgra.device.mgt.core.cea.mgt.common.bean.enums.GraceAllowedPolicy; + +public class GracePeriod { + private int gracePeriod; + private GraceAllowedPolicy graceAllowedPolicy; + + public int getGracePeriod() { + return gracePeriod; + } + + public void setGracePeriod(int gracePeriod) { + this.gracePeriod = gracePeriod; + } + + public GraceAllowedPolicy getGraceAllowedPolicy() { + return graceAllowedPolicy; + } + + public void setGraceAllowedPolicy(GraceAllowedPolicy graceAllowedPolicy) { + this.graceAllowedPolicy = graceAllowedPolicy; + } +} diff --git a/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/MailboxProfile.java b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/MailboxProfile.java new file mode 100644 index 0000000000..e172009ea1 --- /dev/null +++ b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/MailboxProfile.java @@ -0,0 +1,123 @@ +/* + * 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.cea.mgt.common.bean; + +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; + +public class MailboxProfile { + private final Set activeSyncAllowedEASIdentifiers = new HashSet<>(); + private final Set activeSyncBlockedEASIdentifiers = new HashSet<>(); + private String identity; + + public Set getActiveSyncAllowedEASIdentifiers() { + return activeSyncAllowedEASIdentifiers; + } + + public Set getActiveSyncBlockedEASIdentifiers() { + return activeSyncBlockedEASIdentifiers; + } + + public void addActiveSyncAllowedEASIdentifier(String EASIdentifier) { + activeSyncAllowedEASIdentifiers.add(EASIdentifier); + } + + public void addActiveSyncBlockEASIdentifier(String EASIdentifier) { + activeSyncBlockedEASIdentifiers.add(EASIdentifier); + } + + public String getIdentity() { + return identity; + } + + public void setIdentity(String identity) { + this.identity = identity; + } + + public String getAllowedEASIdentifierString() { + String add = "", remove = ""; + if (!activeSyncAllowedEASIdentifiers.isEmpty()) { + Set processedEASIdentifiers = new HashSet<>(); + for (String activeSyncAllowedEASIdentifier : activeSyncAllowedEASIdentifiers) { + processedEASIdentifiers.add("'" + activeSyncAllowedEASIdentifier + "'"); + } + add = String.join(",", processedEASIdentifiers); + } + + if (!activeSyncBlockedEASIdentifiers.isEmpty()) { + Set processedEASIdentifiers = new HashSet<>(); + for (String activeSyncBlockedEASIdentifier : activeSyncBlockedEASIdentifiers) { + processedEASIdentifiers.add("'" + activeSyncBlockedEASIdentifier + "'"); + } + remove = String.join(",", processedEASIdentifiers); + } + + String begin = "@{", end = "}"; + if (!add.isEmpty()) { + begin = begin + "Add=" + add + ";"; + } + if (!remove.isEmpty()) { + begin = begin + "Remove=" + remove + ";"; + } + return begin + end; + } + + public String getBlockedEASIdentifierString() { + String add = "", remove = ""; + if (!activeSyncAllowedEASIdentifiers.isEmpty()) { + Set processedEASIdentifiers = new HashSet<>(); + for (String activeSyncAllowedEASIdentifier : activeSyncAllowedEASIdentifiers) { + processedEASIdentifiers.add("'" + activeSyncAllowedEASIdentifier + "'"); + } + remove = String.join(",", processedEASIdentifiers); + } + + if (!activeSyncBlockedEASIdentifiers.isEmpty()) { + Set processedEASIdentifiers = new HashSet<>(); + for (String activeSyncBlockedEASIdentifier : activeSyncBlockedEASIdentifiers) { + processedEASIdentifiers.add("'" + activeSyncBlockedEASIdentifier + "'"); + } + add = String.join(",", processedEASIdentifiers); + } + + String begin = "@{", end = "}"; + if (!add.isEmpty()) { + begin = begin + "Add=" + add + ";"; + } + if (!remove.isEmpty()) { + begin = begin + "Remove=" + remove + ";"; + } + return begin + end; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof MailboxProfile)) return false; + MailboxProfile that = (MailboxProfile) o; + return Objects.equals(identity, that.identity); + } + + @Override + public int hashCode() { + return Objects.hash(identity); + } +} diff --git a/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/enums/DefaultAccessPolicy.java b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/enums/DefaultAccessPolicy.java new file mode 100644 index 0000000000..d3a6f8a9f6 --- /dev/null +++ b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/enums/DefaultAccessPolicy.java @@ -0,0 +1,40 @@ +/* + * 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.cea.mgt.common.bean.enums; + +public enum DefaultAccessPolicy { + ALLOW("ALLOW"), + QUARANTINE("QUARANTINE"), + BLOCK("BLOCK"); + + private final String name; + + DefaultAccessPolicy(String name) { + this.name = name; + } + + public boolean equalsName(String thatName) { + return name.equals(thatName); + } + + public String toString() { + return name; + } +} diff --git a/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/enums/EmailOutlookAccessPolicy.java b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/enums/EmailOutlookAccessPolicy.java new file mode 100644 index 0000000000..a9ffb1c88e --- /dev/null +++ b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/enums/EmailOutlookAccessPolicy.java @@ -0,0 +1,42 @@ +/* + * 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.cea.mgt.common.bean.enums; + +public enum EmailOutlookAccessPolicy { + MOBILE_OUTLOOK_BLOCK("MOBILE_OUTLOOK_BLOCK"), + WINDOWS_OUTLOOK_BLOCK("WINDOWS_OUTLOOK_BLOCK"), + MAC_OUTLOOK_BLOCK("MAC_OUTLOOK_BLOCK"), + MAC_OLD_OUTLOOK_BLOCK("MAC_OLD_OUTLOOK_BLOCK"), + NOT_CONFIGURED("NOT_CONFIGURED"); + + private final String name; + + EmailOutlookAccessPolicy(String name) { + this.name = name; + } + + public boolean equalsName(String thatName) { + return name.equals(thatName); + } + + public String toString() { + return name; + } +} diff --git a/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/enums/GraceAllowedPolicy.java b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/enums/GraceAllowedPolicy.java new file mode 100644 index 0000000000..dbcb9668df --- /dev/null +++ b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/enums/GraceAllowedPolicy.java @@ -0,0 +1,41 @@ +/* + * 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.cea.mgt.common.bean.enums; + +public enum GraceAllowedPolicy { + NEW_AND_EXISTING("NEW_AND_EXISTING"), + EXISTING_ONLY("EXISTING_ONLY"), + NEW_ONLY("NEW_ONLY"), + NOT_ALLOWED("NOT_ALLOWED"); + + private final String name; + + GraceAllowedPolicy(String name) { + this.name = name; + } + + public boolean equalsName(String thatName) { + return name.equals(thatName); + } + + public String toString() { + return name; + } +} diff --git a/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/enums/POPIMAPAccessPolicy.java b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/enums/POPIMAPAccessPolicy.java new file mode 100644 index 0000000000..9847c1155a --- /dev/null +++ b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/enums/POPIMAPAccessPolicy.java @@ -0,0 +1,40 @@ +/* + * 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.cea.mgt.common.bean.enums; + +public enum POPIMAPAccessPolicy { + ALLOW("ALLOW"), + BLOCK("BLOCK"), + NOT_CONFIGURED("NOT_CONFIGURED"); + + private final String name; + + POPIMAPAccessPolicy(String name) { + this.name = name; + } + + public boolean equalsName(String thatName) { + return name.equals(thatName); + } + + public String toString() { + return name; + } +} diff --git a/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/enums/WebOutlookAccessPolicy.java b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/enums/WebOutlookAccessPolicy.java new file mode 100644 index 0000000000..660afe6d0d --- /dev/null +++ b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/enums/WebOutlookAccessPolicy.java @@ -0,0 +1,40 @@ +/* + * 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.cea.mgt.common.bean.enums; + +public enum WebOutlookAccessPolicy { + ALLOW("ALLOW"), + BLOCK("BLOCK"), + NOT_CONFIGURED("NOT_CONFIGURED"); + + private final String name; + + WebOutlookAccessPolicy(String name) { + this.name = name; + } + + public boolean equalsName(String thatName) { + return name.equals(thatName); + } + + public String toString() { + return name; + } +} diff --git a/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ui/CEAPolicyUIConfiguration.java b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ui/CEAPolicyUIConfiguration.java new file mode 100644 index 0000000000..84f35b1fdf --- /dev/null +++ b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ui/CEAPolicyUIConfiguration.java @@ -0,0 +1,40 @@ +/* + * 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.cea.mgt.common.bean.ui; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; +import java.util.List; + +@XmlRootElement(name = "CEAPolicyUIConfiguration") +public class CEAPolicyUIConfiguration { + private List serverUIConfigurations; + + public List getServerConfigurations() { + return serverUIConfigurations; + } + + @XmlElementWrapper(name = "ServerUIConfigurations", required = true) + @XmlElement(name = "ServerUIConfiguration") + public void setServerConfigurations(List serverUIConfigurations) { + this.serverUIConfigurations = serverUIConfigurations; + } +} diff --git a/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ui/Checkbox.java b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ui/Checkbox.java new file mode 100644 index 0000000000..111fbd9427 --- /dev/null +++ b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ui/Checkbox.java @@ -0,0 +1,47 @@ +/* + * 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.cea.mgt.common.bean.ui; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement(name = "Checkbox") +public class Checkbox { + private String label; + private String value; + + public String getLabel() { + return label; + } + + @XmlElement(name = "Label", required = true) + public void setLabel(String label) { + this.label = label; + } + + public String getValue() { + return value; + } + + @XmlElement(name = "Value", required = true) + public void setValue(String value) { + this.value = value; + } +} diff --git a/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ui/CheckboxGroup.java b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ui/CheckboxGroup.java new file mode 100644 index 0000000000..478ccc6f01 --- /dev/null +++ b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ui/CheckboxGroup.java @@ -0,0 +1,50 @@ +/* + * 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.cea.mgt.common.bean.ui; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; +import java.util.List; + +@XmlRootElement(name = "CheckboxGroup") +public class CheckboxGroup { + private String name; + private List checkboxes; + + public String getName() { + return name; + } + + @XmlElement(name = "Name", required = true) + public void setName(String name) { + this.name = name; + } + + public List getCheckboxes() { + return checkboxes; + } + + @XmlElementWrapper(name = "Checkboxes", required = true) + @XmlElement(name = "Checkbox") + public void setCheckboxes(List checkboxes) { + this.checkboxes = checkboxes; + } +} diff --git a/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ui/Entry.java b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ui/Entry.java new file mode 100644 index 0000000000..d9ef169086 --- /dev/null +++ b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ui/Entry.java @@ -0,0 +1,137 @@ +/* + * 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.cea.mgt.common.bean.ui; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement(name = "Entry") +public class Entry { + private String code; + private boolean required; + private String label; + private String tooltip; + private boolean hidden; + private Supportability supportability; + private String docLink; + private Input input; + private Select select; + private CheckboxGroup checkboxGroup; + private Switch inputSwitch; + + public String getCode() { + return code; + } + + @XmlElement(name = "Code", required = true) + public void setCode(String code) { + this.code = code; + } + + public boolean isRequired() { + return required; + } + + @XmlElement(name = "Required", defaultValue = "false") + public void setRequired(boolean required) { + this.required = required; + } + + public String getLabel() { + return label; + } + + @XmlElement(name = "Label", required = true) + public void setLabel(String label) { + this.label = label; + } + + public String getTooltip() { + return tooltip; + } + + @XmlElement(name = "Tooltip") + public void setTooltip(String tooltip) { + this.tooltip = tooltip; + } + + public boolean isHidden() { + return hidden; + } + + @XmlElement(name = "Hidden", defaultValue = "false") + public void setHidden(boolean hidden) { + this.hidden = hidden; + } + + public Supportability getSupportability() { + return supportability; + } + + @XmlElement(name = "Supportability") + public void setSupportability(Supportability supportability) { + this.supportability = supportability; + } + + public String getDocLink() { + return docLink; + } + + @XmlElement(name = "DocLink") + public void setDocLink(String docLink) { + this.docLink = docLink; + } + + public Input getInput() { + return input; + } + + @XmlElement(name = "Input", nillable = true) + public void setInput(Input input) { + this.input = input; + } + + public Select getSelect() { + return select; + } + + @XmlElement(name = "Select", nillable = true) + public void setSelect(Select select) { + this.select = select; + } + + public CheckboxGroup getCheckboxGroup() { + return checkboxGroup; + } + + @XmlElement(name = "CheckboxGroup", nillable = true) + public void setCheckboxGroup(CheckboxGroup checkboxGroup) { + this.checkboxGroup = checkboxGroup; + } + + public Switch getInputSwitch() { + return inputSwitch; + } + + @XmlElement(name = "Switch", nillable = true) + public void setInputSwitch(Switch inputSwitch) { + this.inputSwitch = inputSwitch; + } +} diff --git a/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ui/Input.java b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ui/Input.java new file mode 100644 index 0000000000..52c6b30d75 --- /dev/null +++ b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ui/Input.java @@ -0,0 +1,57 @@ +/* + * 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.cea.mgt.common.bean.ui; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement(name = "Input") +public class Input { + private String name; + private String placeholder; + private String type; + + public String getName() { + return name; + } + + @XmlElement(name = "Name", required = true) + public void setName(String name) { + this.name = name; + } + + public String getPlaceholder() { + return placeholder; + } + + @XmlElement(name = "Placeholder", required = true) + public void setPlaceholder(String placeholder) { + this.placeholder = placeholder; + } + + public String getType() { + return type; + } + + @XmlElement(name = "Type", required = true) + public void setType(String type) { + this.type = type; + } +} diff --git a/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ui/Option.java b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ui/Option.java new file mode 100644 index 0000000000..41e5b14a27 --- /dev/null +++ b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ui/Option.java @@ -0,0 +1,47 @@ +/* + * 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.cea.mgt.common.bean.ui; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement(name = "Option") +public class Option { + private String value; + private String label; + + public String getValue() { + return value; + } + + @XmlElement(name = "Value", required = true) + public void setValue(String value) { + this.value = value; + } + + public String getLabel() { + return label; + } + + @XmlElement(name = "Label", required = true) + public void setLabel(String label) { + this.label = label; + } +} diff --git a/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ui/PolicyEntries.java b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ui/PolicyEntries.java new file mode 100644 index 0000000000..a631559ee4 --- /dev/null +++ b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ui/PolicyEntries.java @@ -0,0 +1,62 @@ +/* + * 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.cea.mgt.common.bean.ui; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; +import java.util.List; + +@XmlRootElement(name = "PolicyEntries") +public class PolicyEntries { + private List activeSyncServerEntries; + private List conditionalAccessPolicyEntries; + private List gracePeriodEntries; + + public List getActiveSyncServerEntries() { + return activeSyncServerEntries; + } + + @XmlElementWrapper(name = "ActiveSyncServerEntries", required = true) + @XmlElement(name = "Entry", required = true) + public void setActiveSyncServerEntries(List activeSyncServerEntries) { + this.activeSyncServerEntries = activeSyncServerEntries; + } + + public List getConditionalAccessPolicyEntries() { + return conditionalAccessPolicyEntries; + } + + @XmlElementWrapper(name = "ConditionalAccessPolicyEntries", required = true) + @XmlElement(name = "Entry", required = true) + public void setConditionalAccessPolicyEntries(List conditionalAccessPolicyEntries) { + this.conditionalAccessPolicyEntries = conditionalAccessPolicyEntries; + } + + public List getGracePeriodEntries() { + return gracePeriodEntries; + } + + @XmlElementWrapper(name = "GracePeriodEntries", required = true) + @XmlElement(name = "Entry", required = true) + public void setGracePeriodEntries(List gracePeriodEntries) { + this.gracePeriodEntries = gracePeriodEntries; + } +} diff --git a/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ui/Select.java b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ui/Select.java new file mode 100644 index 0000000000..e51bc4202a --- /dev/null +++ b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/src/main/java/io/entgra/device/mgt/core/cea/mgt/common/bean/ui/Select.java @@ -0,0 +1,60 @@ +/* + * 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.cea.mgt.common.bean.ui; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; +import java.util.List; + +@XmlRootElement(name = "Select") +public class Select { + private String name; + private String placeholder; + private List