forked from community/device-mgt-core
Merge pull request #1186 from madawas/application-mgt-new
Enhancing the application install and enterprise install mobile applicationfeature/appm-store/pbac
commit
8b4e3ec051
@ -0,0 +1,71 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
|
||||||
|
*
|
||||||
|
* WSO2 Inc. 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.application.mgt.common;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
|
||||||
|
import org.wso2.carbon.device.mgt.common.operation.mgt.Activity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ApplicationInstallResponse {
|
||||||
|
@ApiModelProperty(
|
||||||
|
name = "successfulDevices",
|
||||||
|
value = "List of successful devices",
|
||||||
|
dataType = "List[org.wso2.carbon.device.mgt.common.DeviceIdentifier]"
|
||||||
|
)
|
||||||
|
private List<DeviceIdentifier> successfulDevices;
|
||||||
|
|
||||||
|
@ApiModelProperty(
|
||||||
|
name = "failedDevices",
|
||||||
|
value = "List of failed devices",
|
||||||
|
dataType = "List[org.wso2.carbon.device.mgt.common.DeviceIdentifier]"
|
||||||
|
)
|
||||||
|
private List<DeviceIdentifier> failedDevices;
|
||||||
|
|
||||||
|
@ApiModelProperty(
|
||||||
|
name = "activity",
|
||||||
|
value = "Activity corresponding to the operation"
|
||||||
|
)
|
||||||
|
private Activity activity;
|
||||||
|
|
||||||
|
public List<DeviceIdentifier> getSuccessfulDevices() {
|
||||||
|
return successfulDevices;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSuccessfulDevices(List<DeviceIdentifier> successfulDevices) {
|
||||||
|
this.successfulDevices = successfulDevices;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<DeviceIdentifier> getFailedDevices() {
|
||||||
|
return failedDevices;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFailedDevices(List<DeviceIdentifier> failedDevices) {
|
||||||
|
this.failedDevices = failedDevices;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Activity getActivity() {
|
||||||
|
return activity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setActivity(Activity activity) {
|
||||||
|
this.activity = activity;
|
||||||
|
}
|
||||||
|
}
|
@ -1,71 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
|
|
||||||
*
|
|
||||||
* WSO2 Inc. 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.application.mgt.common;
|
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
|
|
||||||
|
|
||||||
@ApiModel(value = "DeviceIdentifier", description = "This contains device details that is used to identify a device " +
|
|
||||||
"uniquely.")
|
|
||||||
public class DeviceIdentifier {
|
|
||||||
|
|
||||||
@ApiModelProperty(
|
|
||||||
name = "id",
|
|
||||||
value = "Identity of the device.",
|
|
||||||
required = true,
|
|
||||||
example = "d24f870f390352a4")
|
|
||||||
private String id;
|
|
||||||
|
|
||||||
@ApiModelProperty(
|
|
||||||
name = "type",
|
|
||||||
value = "Type of the device.",
|
|
||||||
required = true,
|
|
||||||
example = "android")
|
|
||||||
private String type;
|
|
||||||
|
|
||||||
public DeviceIdentifier() {}
|
|
||||||
|
|
||||||
public DeviceIdentifier(String id, String type) {
|
|
||||||
this.id = id;
|
|
||||||
this.type = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getType() {
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setType(String type) {
|
|
||||||
this.type = type.trim();
|
|
||||||
}
|
|
||||||
public String getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(String id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "deviceId {" +
|
|
||||||
"id='" + id + '\'' +
|
|
||||||
", type='" + type + '\'' +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,85 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
|
||||||
|
*
|
||||||
|
* WSO2 Inc. 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.application.mgt.common;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class EnterpriseInstallationDetails {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This enum represents the type of entities which an application can be installed on.
|
||||||
|
*
|
||||||
|
* e.g: An application can be installed on all the devices belong to a user or a specific device group.
|
||||||
|
*/
|
||||||
|
@ApiModel
|
||||||
|
public enum EnterpriseEntity {
|
||||||
|
USER, ROLE, DEVICE_GROUP
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiModelProperty(
|
||||||
|
name = "applicationUUID",
|
||||||
|
value = "Application ID",
|
||||||
|
required = true,
|
||||||
|
example = "4354c752-109f-11e8-b642-0ed5f89f718b"
|
||||||
|
)
|
||||||
|
private String applicationUUID;
|
||||||
|
|
||||||
|
@ApiModelProperty(
|
||||||
|
name = "entityType",
|
||||||
|
value = "Enterprise entity type",
|
||||||
|
required = true,
|
||||||
|
example = "USER"
|
||||||
|
)
|
||||||
|
private EnterpriseEntity entityType;
|
||||||
|
|
||||||
|
@ApiModelProperty(
|
||||||
|
name = "entityValueList",
|
||||||
|
value = "List of users/roles or device groups.",
|
||||||
|
required = true,
|
||||||
|
example = "user1,user2, user3"
|
||||||
|
)
|
||||||
|
private List<String> entityValueList;
|
||||||
|
|
||||||
|
public String getApplicationUUID() {
|
||||||
|
return applicationUUID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setApplicationUUID(String applicationUUID) {
|
||||||
|
this.applicationUUID = applicationUUID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterpriseEntity getEntityType() {
|
||||||
|
return entityType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEntityType(EnterpriseEntity entityType) {
|
||||||
|
this.entityType = entityType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getEntityValueList() {
|
||||||
|
return entityValueList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEntityValueList(List<String> entityValueList) {
|
||||||
|
this.entityValueList = entityValueList;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue