forked from community/device-mgt-core
Modify invite-user API to have enrollment steps included in the mail and add OTP token as query param See merge request entgra/carbon-device-mgt!619revert-70ac1926
commit
7f7fbf21b4
@ -0,0 +1,59 @@
|
||||
/* Copyright (c) 2020, 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 org.wso2.carbon.device.mgt.common.invitation.mgt;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@ApiModel(
|
||||
value = "DeviceEnrollmentInvitation",
|
||||
description = "Holds data to send device enrollment invitation to list of existing users.")
|
||||
public class DeviceEnrollmentInvitation implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 6933837278652532052L;
|
||||
|
||||
@ApiModelProperty(
|
||||
name = "usernames",
|
||||
value = "List of usernames of users.",
|
||||
required = true)
|
||||
private List<String> usernames;
|
||||
|
||||
@ApiModelProperty(
|
||||
name = "deviceEnrollmentTypes",
|
||||
value = "List of enrollment types against device types.")
|
||||
private List<DeviceEnrollmentType> deviceEnrollmentTypes;
|
||||
|
||||
public List<String> getUsernames() {
|
||||
return usernames;
|
||||
}
|
||||
|
||||
public void setUsernames(List<String> usernames) {
|
||||
this.usernames = usernames;
|
||||
}
|
||||
|
||||
public List<DeviceEnrollmentType> getDeviceEnrollmentTypes() {
|
||||
return deviceEnrollmentTypes;
|
||||
}
|
||||
|
||||
public void setDeviceEnrollmentTypes(
|
||||
List<DeviceEnrollmentType> deviceEnrollmentTypes) {
|
||||
this.deviceEnrollmentTypes = deviceEnrollmentTypes;
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package org.wso2.carbon.device.mgt.common.invitation.mgt;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import java.util.List;
|
||||
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "DeviceEnrollmentInvitationDetails", propOrder = {
|
||||
"enrollmentDetails"
|
||||
})
|
||||
public class DeviceEnrollmentInvitationDetails {
|
||||
|
||||
@XmlElement(name = "EnrollmentDetails")
|
||||
private List<EnrollmentDetails> enrollmentDetails;
|
||||
|
||||
public List<EnrollmentDetails> getEnrollmentDetails() {
|
||||
return enrollmentDetails;
|
||||
}
|
||||
|
||||
public void setEnrollmentDetails(List<EnrollmentDetails> enrollmentDetails) {
|
||||
this.enrollmentDetails = enrollmentDetails;
|
||||
}
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
/* Copyright (c) 2020, 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 org.wso2.carbon.device.mgt.common.invitation.mgt;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@ApiModel(
|
||||
value = "DeviceEnrollmentType",
|
||||
description = "Holds data of enrollment types against device types.")
|
||||
public class DeviceEnrollmentType implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 6563596191450032613L;
|
||||
|
||||
@ApiModelProperty(
|
||||
name = "deviceType",
|
||||
value = "Device type (i.e: android, ios, windows)",
|
||||
required = true)
|
||||
private String deviceType;
|
||||
|
||||
@ApiModelProperty(
|
||||
name = "enrollmentType",
|
||||
value = "Enrollment type (i.e: BYOD, COPE, COSU)",
|
||||
required = true)
|
||||
private List<String> enrollmentType;
|
||||
|
||||
public String getDeviceType() {
|
||||
return deviceType;
|
||||
}
|
||||
|
||||
public void setDeviceType(String deviceType) {
|
||||
this.deviceType = deviceType;
|
||||
}
|
||||
|
||||
public List<String> getEnrollmentType() {
|
||||
return enrollmentType;
|
||||
}
|
||||
|
||||
public void setEnrollmentType(List<String> enrollmentType) {
|
||||
this.enrollmentType = enrollmentType;
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package org.wso2.carbon.device.mgt.common.invitation.mgt;
|
||||
|
||||
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 = "EnrollmentDetails", propOrder = {
|
||||
"enrollmentType",
|
||||
"enrollmentSteps"
|
||||
})
|
||||
public class EnrollmentDetails {
|
||||
|
||||
@XmlElement(name = "EnrollmentType")
|
||||
private String enrollmentType;
|
||||
|
||||
@XmlElement(name = "EnrollmentSteps")
|
||||
private String enrollmentSteps;
|
||||
|
||||
public String getEnrollmentType() {
|
||||
return enrollmentType;
|
||||
}
|
||||
|
||||
public void setEnrollmentType(String enrollmentType) {
|
||||
this.enrollmentType = enrollmentType;
|
||||
}
|
||||
|
||||
public String getEnrollmentSteps() {
|
||||
return enrollmentSteps;
|
||||
}
|
||||
|
||||
public void setEnrollmentSteps(String enrollmentSteps) {
|
||||
this.enrollmentSteps = enrollmentSteps;
|
||||
}
|
||||
}
|
Loading…
Reference in new issue