forked from community/device-mgt-core
Add public app and web clip support for APPM See merge request entgra/carbon-device-mgt!122feature/appm-store/pbac
commit
4829d69733
@ -0,0 +1,124 @@
|
||||
/* Copyright (c) 2019, 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.application.mgt.common.wrapper;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@ApiModel(value = "Public App Release Wrapper", description = "This class holds the details when releasing an Public App"
|
||||
+ " Release to application store")
|
||||
public class PublicAppReleaseWrapper {
|
||||
|
||||
@ApiModelProperty(name = "description",
|
||||
value = "Description of the public app release")
|
||||
@NotNull
|
||||
private String description;
|
||||
|
||||
@ApiModelProperty(name = "releaseType",
|
||||
value = "Release type of the public app release",
|
||||
required = true,
|
||||
example = "alpha, beta etc")
|
||||
@NotNull
|
||||
private String releaseType;
|
||||
|
||||
@ApiModelProperty(name = "price",
|
||||
value = "Price of the public app release",
|
||||
required = true)
|
||||
private Double price;
|
||||
|
||||
@ApiModelProperty(name = "isSharedWithAllTenants",
|
||||
value = "If public app release is shared with all tenants it is equal to 1 otherwise 0",
|
||||
required = true)
|
||||
@NotNull
|
||||
private boolean isSharedWithAllTenants;
|
||||
|
||||
@ApiModelProperty(name = "metaData",
|
||||
value = "Meta data of the public app release",
|
||||
required = true)
|
||||
private String metaData;
|
||||
|
||||
@ApiModelProperty(name = "version",
|
||||
value = "Version of the public app release.",
|
||||
required = true)
|
||||
@NotNull
|
||||
private String version;
|
||||
|
||||
@ApiModelProperty(name = "packageName",
|
||||
value = "Package name of the public app release.",
|
||||
required = true)
|
||||
@NotNull
|
||||
private String packageName;
|
||||
|
||||
@ApiModelProperty(name = "supportedOsVersions",
|
||||
value = "ApplicationDTO release supported OS versions")
|
||||
@NotNull
|
||||
private String supportedOsVersions;
|
||||
|
||||
public String getReleaseType() {
|
||||
return releaseType;
|
||||
}
|
||||
|
||||
public void setReleaseType(String releaseType) {
|
||||
this.releaseType = releaseType;
|
||||
}
|
||||
|
||||
public void setIsSharedWithAllTenants(boolean isSharedWithAllTenants) {
|
||||
this.isSharedWithAllTenants = isSharedWithAllTenants;
|
||||
}
|
||||
|
||||
public void setMetaData(String metaData) {
|
||||
this.metaData = metaData;
|
||||
}
|
||||
|
||||
public Double getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(Double price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public boolean getIsSharedWithAllTenants() {
|
||||
return isSharedWithAllTenants;
|
||||
}
|
||||
|
||||
public String getMetaData() {
|
||||
return metaData;
|
||||
}
|
||||
|
||||
public String getDescription() { return description; }
|
||||
|
||||
public void setDescription(String description) { this.description = description; }
|
||||
|
||||
public boolean isSharedWithAllTenants() { return isSharedWithAllTenants; }
|
||||
|
||||
public void setSharedWithAllTenants(boolean sharedWithAllTenants) { isSharedWithAllTenants = sharedWithAllTenants; }
|
||||
|
||||
public String getVersion() { return version; }
|
||||
|
||||
public void setVersion(String version) { this.version = version; }
|
||||
|
||||
public String getPackageName() { return packageName; }
|
||||
|
||||
public void setPackageName(String packageName) { this.packageName = packageName; }
|
||||
|
||||
public String getSupportedOsVersions() { return supportedOsVersions; }
|
||||
|
||||
public void setSupportedOsVersions(String supportedOsVersions) { this.supportedOsVersions = supportedOsVersions; }
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
/* Copyright (c) 2019, 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.application.mgt.common.wrapper;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
@ApiModel(value = "PublicAppWrapper", description = "PublicAppWrapper represents an Application in App Store")
|
||||
public class PublicAppWrapper {
|
||||
|
||||
@ApiModelProperty(name = "name",
|
||||
value = "Name of the public app",
|
||||
required = true)
|
||||
@NotNull
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(name = "description",
|
||||
value = "Description of the public app",
|
||||
required = true)
|
||||
@NotNull
|
||||
private String description;
|
||||
|
||||
@ApiModelProperty(name = "categories",
|
||||
value = "List of Categories",
|
||||
required = true,
|
||||
example = "Educational, Gaming, Travel, Entertainment etc")
|
||||
@NotNull
|
||||
private List<String> categories;
|
||||
|
||||
@ApiModelProperty(name = "subType",
|
||||
value = "Subscription method of the public app",
|
||||
required = true,
|
||||
example = "PAID, FREE")
|
||||
@NotNull
|
||||
private String subMethod;
|
||||
|
||||
@ApiModelProperty(name = "deviceType",
|
||||
value = "Related device type of the public app",
|
||||
required = true,
|
||||
example = "IoS, Android, Arduino, RaspberryPi etc")
|
||||
@NotNull
|
||||
private String deviceType;
|
||||
|
||||
@ApiModelProperty(name = "paymentCurrency",
|
||||
value = "Payment currency of the web clip",
|
||||
required = true,
|
||||
example = "$")
|
||||
private String paymentCurrency;
|
||||
|
||||
@ApiModelProperty(name = "tags",
|
||||
value = "List of tags")
|
||||
@NotNull
|
||||
private List<String> tags;
|
||||
|
||||
@ApiModelProperty(name = "unrestrictedRoles",
|
||||
value = "List of roles that users should have to view the public app")
|
||||
@NotNull
|
||||
private List<String> unrestrictedRoles;
|
||||
|
||||
@ApiModelProperty(name = "applicationReleaseWrappers",
|
||||
value = "List of public app releases",
|
||||
required = true)
|
||||
@NotNull
|
||||
private List<PublicAppReleaseWrapper> publicAppReleaseWrappers;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) { this.name = name; }
|
||||
|
||||
public List<String> getTags() { return tags; }
|
||||
|
||||
public void setTags(List<String> tags) { this.tags = tags; }
|
||||
|
||||
public String getDeviceType() { return deviceType; }
|
||||
|
||||
public void setDeviceType(String deviceType) { this.deviceType = deviceType; }
|
||||
|
||||
public String getPaymentCurrency() { return paymentCurrency; }
|
||||
|
||||
public void setPaymentCurrency(String paymentCurrency) { this.paymentCurrency = paymentCurrency; }
|
||||
|
||||
public List<String> getUnrestrictedRoles() { return unrestrictedRoles; }
|
||||
|
||||
public void setUnrestrictedRoles(List<String> unrestrictedRoles) { this.unrestrictedRoles = unrestrictedRoles; }
|
||||
|
||||
public String getDescription() { return description; }
|
||||
|
||||
public void setDescription(String description) { this.description = description; }
|
||||
|
||||
public List<PublicAppReleaseWrapper> getPublicAppReleaseWrappers() { return publicAppReleaseWrappers; }
|
||||
|
||||
public void setPublicAppReleaseWrappers(List<PublicAppReleaseWrapper> publicAppReleaseWrappers) {
|
||||
this.publicAppReleaseWrappers = publicAppReleaseWrappers; }
|
||||
|
||||
public List<String> getCategories() { return categories; }
|
||||
|
||||
public void setCategories(List<String> categories) { this.categories = categories; }
|
||||
|
||||
public String getSubMethod() { return subMethod; }
|
||||
|
||||
public void setSubMethod(String subMethod) { this.subMethod = subMethod; }
|
||||
}
|
@ -0,0 +1,117 @@
|
||||
/* Copyright (c) 2019, 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.application.mgt.common.wrapper;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@ApiModel(value = "ApplicationReleaseDTO", description = "This class holds the details when releasing an ApplicationDTO to application store")
|
||||
public class WebAppReleaseWrapper {
|
||||
|
||||
@ApiModelProperty(name = "description",
|
||||
value = "Description of the web clip release")
|
||||
@NotNull
|
||||
private String description;
|
||||
|
||||
@ApiModelProperty(name = "releaseType",
|
||||
value = "Release type of the web clip release",
|
||||
required = true,
|
||||
example = "alpha, beta etc")
|
||||
@NotNull
|
||||
private String releaseType;
|
||||
|
||||
@ApiModelProperty(name = "price",
|
||||
value = "Price of the web clip release",
|
||||
required = true)
|
||||
private Double price;
|
||||
|
||||
@ApiModelProperty(name = "isSharedWithAllTenants",
|
||||
value = "If web clip release is shared with all tenants it is equal to 1 otherwise 0",
|
||||
required = true)
|
||||
@NotNull
|
||||
private boolean isSharedWithAllTenants;
|
||||
|
||||
@ApiModelProperty(name = "metaData",
|
||||
value = "Meta data of the web clip release",
|
||||
required = true)
|
||||
private String metaData;
|
||||
|
||||
@ApiModelProperty(name = "version",
|
||||
value = "Version of the web app release.",
|
||||
required = true)
|
||||
@NotNull
|
||||
private String version;
|
||||
|
||||
@ApiModelProperty(name = "url",
|
||||
value = "URL which is used for WEB-CLIP")
|
||||
@NotNull
|
||||
private String url;
|
||||
|
||||
public String getReleaseType() {
|
||||
return releaseType;
|
||||
}
|
||||
|
||||
public void setReleaseType(String releaseType) {
|
||||
this.releaseType = releaseType;
|
||||
}
|
||||
|
||||
public void setIsSharedWithAllTenants(boolean isSharedWithAllTenants) {
|
||||
this.isSharedWithAllTenants = isSharedWithAllTenants;
|
||||
}
|
||||
|
||||
public void setMetaData(String metaData) {
|
||||
this.metaData = metaData;
|
||||
}
|
||||
|
||||
public Double getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(Double price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public boolean getIsSharedWithAllTenants() {
|
||||
return isSharedWithAllTenants;
|
||||
}
|
||||
|
||||
public String getMetaData() {
|
||||
return metaData;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public String getDescription() { return description; }
|
||||
|
||||
public void setDescription(String description) { this.description = description; }
|
||||
|
||||
public boolean isSharedWithAllTenants() { return isSharedWithAllTenants; }
|
||||
|
||||
public void setSharedWithAllTenants(boolean sharedWithAllTenants) { isSharedWithAllTenants = sharedWithAllTenants; }
|
||||
|
||||
public String getVersion() { return version; }
|
||||
|
||||
public void setVersion(String version) { this.version = version; }
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
/* Copyright (c) 2019, 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.application.mgt.common.wrapper;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
@ApiModel(value = "WebAppWrapper", description = "WebAppWrapper represents an ApplicationDTO in ApplicationDTO Store")
|
||||
public class WebAppWrapper {
|
||||
|
||||
@ApiModelProperty(name = "name",
|
||||
value = "Name of the web clip",
|
||||
required = true)
|
||||
@NotNull
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(name = "description",
|
||||
value = "Description of the web clip",
|
||||
required = true)
|
||||
@NotNull
|
||||
private String description;
|
||||
|
||||
@ApiModelProperty(name = "categories",
|
||||
value = "List of Categories",
|
||||
required = true,
|
||||
example = "Educational, Gaming, Travel, Entertainment etc")
|
||||
@NotNull
|
||||
private List<String> categories;
|
||||
|
||||
@ApiModelProperty(name = "subType",
|
||||
value = "Subscription method of the web clip",
|
||||
required = true,
|
||||
example = "PAID, FREE")
|
||||
@NotNull
|
||||
private String subMethod;
|
||||
|
||||
@ApiModelProperty(name = "Web App Type",
|
||||
value = "Type of the web app",
|
||||
required = true,
|
||||
example = "WEB_APP, WEB_CLIP")
|
||||
@NotNull
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(name = "paymentCurrency",
|
||||
value = "Payment currency of the web clip",
|
||||
required = true,
|
||||
example = "$")
|
||||
private String paymentCurrency;
|
||||
|
||||
@ApiModelProperty(name = "tags",
|
||||
value = "List of tags")
|
||||
@NotNull
|
||||
private List<String> tags;
|
||||
|
||||
@ApiModelProperty(name = "unrestrictedRoles",
|
||||
value = "List of roles that users should have to view the web clip")
|
||||
@NotNull
|
||||
private List<String> unrestrictedRoles;
|
||||
|
||||
@ApiModelProperty(name = "applicationReleaseWrappers",
|
||||
value = "List of web clip releases",
|
||||
required = true)
|
||||
@NotNull
|
||||
private List<WebAppReleaseWrapper> webAppReleaseWrappers;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) { this.name = name; }
|
||||
|
||||
public List<String> getTags() { return tags; }
|
||||
|
||||
public void setTags(List<String> tags) { this.tags = tags; }
|
||||
|
||||
public String getPaymentCurrency() { return paymentCurrency; }
|
||||
|
||||
public void setPaymentCurrency(String paymentCurrency) { this.paymentCurrency = paymentCurrency; }
|
||||
|
||||
public List<String> getUnrestrictedRoles() { return unrestrictedRoles; }
|
||||
|
||||
public void setUnrestrictedRoles(List<String> unrestrictedRoles) { this.unrestrictedRoles = unrestrictedRoles; }
|
||||
|
||||
public String getDescription() { return description; }
|
||||
|
||||
public void setDescription(String description) { this.description = description; }
|
||||
|
||||
public List<WebAppReleaseWrapper> getWebAppReleaseWrappers() { return webAppReleaseWrappers; }
|
||||
|
||||
public void setWebAppReleaseWrappers(List<WebAppReleaseWrapper> webAppReleaseWrappers) {
|
||||
this.webAppReleaseWrappers = webAppReleaseWrappers; }
|
||||
|
||||
public List<String> getCategories() { return categories; }
|
||||
|
||||
public void setCategories(List<String> categories) { this.categories = categories; }
|
||||
|
||||
public String getSubMethod() { return subMethod; }
|
||||
|
||||
public void setSubMethod(String subMethod) { this.subMethod = subMethod; }
|
||||
|
||||
public String getType() { return type; }
|
||||
|
||||
public void setType(String type) { this.type = type; }
|
||||
}
|
Loading…
Reference in new issue