forked from community/device-mgt-core
parent
d6090dd812
commit
eeea1c372f
@ -0,0 +1,59 @@
|
|||||||
|
|
||||||
|
package org.wso2.carbon.device.mgt.extensions.device.type.deployer.config;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
|
import javax.xml.bind.annotation.XmlAttribute;
|
||||||
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
import javax.xml.bind.annotation.XmlValue;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Java class for Attribute complex type.
|
||||||
|
*
|
||||||
|
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* <complexType name="Attribute">
|
||||||
|
* <simpleContent>
|
||||||
|
* <extension base="<http://www.w3.org/2001/XMLSchema>string">
|
||||||
|
* <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||||
|
* </extension>
|
||||||
|
* </simpleContent>
|
||||||
|
* </complexType>
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
|
public class Attribute {
|
||||||
|
|
||||||
|
@XmlValue
|
||||||
|
protected String value;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the value property.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the value property.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setValue(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,69 @@
|
|||||||
|
|
||||||
|
package org.wso2.carbon.device.mgt.extensions.device.type.deployer.config;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Java class for Attributes complex type.
|
||||||
|
*
|
||||||
|
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* <complexType name="Attributes">
|
||||||
|
* <complexContent>
|
||||||
|
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||||
|
* <sequence>
|
||||||
|
* <element name="Attribute" type="{}Attribute" maxOccurs="unbounded" minOccurs="0"/>
|
||||||
|
* </sequence>
|
||||||
|
* </restriction>
|
||||||
|
* </complexContent>
|
||||||
|
* </complexType>
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
|
@XmlType(name = "Attributes", propOrder = {
|
||||||
|
"attribute"
|
||||||
|
})
|
||||||
|
public class Attributes {
|
||||||
|
|
||||||
|
@XmlElement(name = "Attribute")
|
||||||
|
protected List<Attribute> attribute;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the attribute property.
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* This accessor method returns a reference to the live list,
|
||||||
|
* not a snapshot. Therefore any modification you make to the
|
||||||
|
* returned list will be present inside the JAXB object.
|
||||||
|
* This is why there is not a <CODE>set</CODE> method for the attribute property.
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* For example, to add a new item, do as follows:
|
||||||
|
* <pre>
|
||||||
|
* getAttribute().add(newItem);
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* Objects of the following type(s) are allowed in the list
|
||||||
|
* {@link Attribute }
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public List<Attribute> getAttribute() {
|
||||||
|
if (attribute == null) {
|
||||||
|
attribute = new ArrayList<Attribute>();
|
||||||
|
}
|
||||||
|
return this.attribute;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,40 +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.mgt.extensions.device.type.deployer.config;
|
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class for holding device type configuration and parsing with JAXB.
|
|
||||||
*/
|
|
||||||
@XmlRootElement(name = "DataSourceConfiguration")
|
|
||||||
public class DataSourceConfig {
|
|
||||||
|
|
||||||
private JNDILookupDefinition jndiLookupDefinition;
|
|
||||||
|
|
||||||
@XmlElement(name = "JndiLookupDefinition", required = true)
|
|
||||||
public JNDILookupDefinition getJndiLookupDefinition() {
|
|
||||||
return jndiLookupDefinition;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setJndiLookupDefinition(JNDILookupDefinition jndiLookupDefinition) {
|
|
||||||
this.jndiLookupDefinition = jndiLookupDefinition;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -0,0 +1,62 @@
|
|||||||
|
|
||||||
|
package org.wso2.carbon.device.mgt.extensions.device.type.deployer.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;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Java class for DataSourceConfiguration complex type.
|
||||||
|
*
|
||||||
|
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* <complexType name="DataSourceConfiguration">
|
||||||
|
* <complexContent>
|
||||||
|
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||||
|
* <sequence>
|
||||||
|
* <element name="JndiLookupDefinition" type="{}JndiLookupDefinition"/>
|
||||||
|
* </sequence>
|
||||||
|
* </restriction>
|
||||||
|
* </complexContent>
|
||||||
|
* </complexType>
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
|
@XmlType(name = "DataSourceConfiguration", propOrder = {
|
||||||
|
"jndiLookupDefinition"
|
||||||
|
})
|
||||||
|
public class DataSourceConfiguration {
|
||||||
|
|
||||||
|
@XmlElement(name = "JndiLookupDefinition", required = true)
|
||||||
|
protected JndiLookupDefinition jndiLookupDefinition;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the jndiLookupDefinition property.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link JndiLookupDefinition }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public JndiLookupDefinition getJndiLookupDefinition() {
|
||||||
|
return jndiLookupDefinition;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the jndiLookupDefinition property.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link JndiLookupDefinition }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setJndiLookupDefinition(JndiLookupDefinition value) {
|
||||||
|
this.jndiLookupDefinition = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,174 @@
|
|||||||
|
|
||||||
|
package org.wso2.carbon.device.mgt.extensions.device.type.deployer.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;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Java class for DeviceDefinition complex type.
|
||||||
|
*
|
||||||
|
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* <complexType name="DeviceDefinition">
|
||||||
|
* <complexContent>
|
||||||
|
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||||
|
* <sequence>
|
||||||
|
* <element name="TableName" type="{http://www.w3.org/2001/XMLSchema}string"/>
|
||||||
|
* <element name="PrimaryKey" type="{http://www.w3.org/2001/XMLSchema}string"/>
|
||||||
|
* <element name="Attributes" type="{}Attributes"/>
|
||||||
|
* <element name="License" type="{}License"/>
|
||||||
|
* <element name="Features" type="{}Features"/>
|
||||||
|
* </sequence>
|
||||||
|
* </restriction>
|
||||||
|
* </complexContent>
|
||||||
|
* </complexType>
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
|
@XmlType(name = "DeviceDefinition", propOrder = {
|
||||||
|
"tableName",
|
||||||
|
"primaryKey",
|
||||||
|
"attributes",
|
||||||
|
"license",
|
||||||
|
"features"
|
||||||
|
})
|
||||||
|
public class DeviceDefinition {
|
||||||
|
|
||||||
|
@XmlElement(name = "TableName", required = true)
|
||||||
|
protected String tableName;
|
||||||
|
@XmlElement(name = "PrimaryKey", required = true)
|
||||||
|
protected String primaryKey;
|
||||||
|
@XmlElement(name = "Attributes", required = true)
|
||||||
|
protected Attributes attributes;
|
||||||
|
@XmlElement(name = "License", required = true)
|
||||||
|
protected License license;
|
||||||
|
@XmlElement(name = "Features", required = true)
|
||||||
|
protected Features features;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the tableName property.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public String getTableName() {
|
||||||
|
return tableName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the tableName property.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setTableName(String value) {
|
||||||
|
this.tableName = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the primaryKey property.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public String getPrimaryKey() {
|
||||||
|
return primaryKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the primaryKey property.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setPrimaryKey(String value) {
|
||||||
|
this.primaryKey = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the attributes property.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link Attributes }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public Attributes getAttributes() {
|
||||||
|
return attributes;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the attributes property.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link Attributes }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setAttributes(Attributes value) {
|
||||||
|
this.attributes = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the license property.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link License }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public License getLicense() {
|
||||||
|
return license;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the license property.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link License }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setLicense(License value) {
|
||||||
|
this.license = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the features property.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link Features }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public Features getFeatures() {
|
||||||
|
return features;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the features property.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link Features }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setFeatures(Features value) {
|
||||||
|
this.features = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,50 +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.mgt.extensions.device.type.deployer.config;
|
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class for holding management repository data.
|
|
||||||
*/
|
|
||||||
@XmlRootElement(name = "ManagementRepository")
|
|
||||||
public class DeviceManagementConfigRepository {
|
|
||||||
|
|
||||||
private DataSourceConfig dataSourceConfig;
|
|
||||||
private ProvisioningConfig provisioningConfig;
|
|
||||||
|
|
||||||
@XmlElement(name = "DataSourceConfiguration", required = true)
|
|
||||||
public DataSourceConfig getDataSourceConfig() {
|
|
||||||
return dataSourceConfig;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDataSourceConfig(DataSourceConfig dataSourceConfig) {
|
|
||||||
this.dataSourceConfig = dataSourceConfig;
|
|
||||||
}
|
|
||||||
|
|
||||||
@XmlElement(name = "ProvisioningConfig", required = true)
|
|
||||||
public ProvisioningConfig getProvisioningConfig() {
|
|
||||||
return provisioningConfig;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setProvisioningConfig(
|
|
||||||
ProvisioningConfig provisioningConfig) {
|
|
||||||
this.provisioningConfig = provisioningConfig;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,65 +1,120 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2016, 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.mgt.extensions.device.type.deployer.config;
|
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
package org.wso2.carbon.device.mgt.extensions.device.type.deployer.config;
|
||||||
import org.apache.commons.logging.LogFactory;
|
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Java class for DeviceManagementConfiguration complex type.
|
||||||
|
*
|
||||||
|
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* <complexType name="DeviceManagementConfiguration">
|
||||||
|
* <complexContent>
|
||||||
|
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||||
|
* <sequence>
|
||||||
|
* <element name="Device" type="{http://www.w3.org/2001/XMLSchema}string"/>
|
||||||
|
* <element name="ManagementRepository" type="{}ManagementRepository"/>
|
||||||
|
* <element name="PushNotificationConfiguration" type="{}PushNotificationConfiguration"/>
|
||||||
|
* </sequence>
|
||||||
|
* </restriction>
|
||||||
|
* </complexContent>
|
||||||
|
* </complexType>
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
//@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
|
//@XmlType(name = "DeviceManagementConfiguration", propOrder = {
|
||||||
|
// "deviceType",
|
||||||
|
// "managementRepository",
|
||||||
|
// "pushNotificationConfiguration"
|
||||||
|
//})
|
||||||
@XmlRootElement(name = "DeviceManagementConfiguration")
|
@XmlRootElement(name = "DeviceManagementConfiguration")
|
||||||
public class DeviceManagementConfiguration {
|
public class DeviceManagementConfiguration {
|
||||||
|
|
||||||
private DeviceManagementConfigRepository deviceManagementConfigRepository;
|
@XmlElement(name = "DeviceType", required = true)
|
||||||
private PushNotificationConfig pushNotificationConfig;
|
protected String deviceType;
|
||||||
private String deviceType;
|
@XmlElement(name = "ManagementRepository", required = true)
|
||||||
|
protected ManagementRepository managementRepository;
|
||||||
private static final Log log = LogFactory.getLog(DeviceManagementConfiguration.class);
|
@XmlElement(name = "PushNotificationConfiguration", required = true)
|
||||||
|
protected PushNotificationConfiguration pushNotificationConfiguration;
|
||||||
private DeviceManagementConfiguration() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@XmlElement(name = "DeviceType", required = false)
|
/**
|
||||||
|
* Gets the value of the device property.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
public String getDeviceType() {
|
public String getDeviceType() {
|
||||||
return deviceType;
|
return deviceType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDeviceType(String deviceType) {
|
/**
|
||||||
this.deviceType = deviceType;
|
* Sets the value of the device property.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setDeviceType(String value) {
|
||||||
|
this.deviceType = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlElement(name = "ManagementRepository", required = true)
|
/**
|
||||||
public DeviceManagementConfigRepository getDeviceManagementConfigRepository() {
|
* Gets the value of the managementRepository property.
|
||||||
return deviceManagementConfigRepository;
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link ManagementRepository }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public ManagementRepository getManagementRepository() {
|
||||||
|
return managementRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDeviceManagementConfigRepository(DeviceManagementConfigRepository deviceManagementConfigRepository) {
|
/**
|
||||||
this.deviceManagementConfigRepository = deviceManagementConfigRepository;
|
* Sets the value of the managementRepository property.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link ManagementRepository }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setManagementRepository(ManagementRepository value) {
|
||||||
|
this.managementRepository = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@XmlElement(name = "PushNotificationConfiguration", required = false)
|
/**
|
||||||
public PushNotificationConfig getPushNotificationConfig() {
|
* Gets the value of the pushNotificationConfiguration property.
|
||||||
return pushNotificationConfig;
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link PushNotificationConfiguration }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public PushNotificationConfiguration getPushNotificationConfiguration() {
|
||||||
|
return pushNotificationConfiguration;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPushNotificationConfig(PushNotificationConfig pushNotificationConfig) {
|
/**
|
||||||
this.pushNotificationConfig = pushNotificationConfig;
|
* Sets the value of the pushNotificationConfiguration property.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link PushNotificationConfiguration }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setPushNotificationConfiguration(PushNotificationConfiguration value) {
|
||||||
|
this.pushNotificationConfiguration = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,118 @@
|
|||||||
|
|
||||||
|
package org.wso2.carbon.device.mgt.extensions.device.type.deployer.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;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Java class for Feature complex type.
|
||||||
|
*
|
||||||
|
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* <complexType name="Feature">
|
||||||
|
* <complexContent>
|
||||||
|
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||||
|
* <sequence>
|
||||||
|
* <element name="Code" type="{http://www.w3.org/2001/XMLSchema}string"/>
|
||||||
|
* <element name="Name" type="{http://www.w3.org/2001/XMLSchema}string"/>
|
||||||
|
* <element name="Description" type="{http://www.w3.org/2001/XMLSchema}string"/>
|
||||||
|
* </sequence>
|
||||||
|
* </restriction>
|
||||||
|
* </complexContent>
|
||||||
|
* </complexType>
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
|
@XmlType(name = "Feature", propOrder = {
|
||||||
|
"code",
|
||||||
|
"name",
|
||||||
|
"description"
|
||||||
|
})
|
||||||
|
public class Feature {
|
||||||
|
|
||||||
|
@XmlElement(name = "Code", required = true)
|
||||||
|
protected String code;
|
||||||
|
@XmlElement(name = "Name", required = true)
|
||||||
|
protected String name;
|
||||||
|
@XmlElement(name = "Description", required = true)
|
||||||
|
protected String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the code property.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public String getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the code property.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setCode(String value) {
|
||||||
|
this.code = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the name property.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the name property.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setName(String value) {
|
||||||
|
this.name = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the description property.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the description property.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setDescription(String value) {
|
||||||
|
this.description = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,97 @@
|
|||||||
|
|
||||||
|
package org.wso2.carbon.device.mgt.extensions.device.type.deployer.config;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
|
import javax.xml.bind.annotation.XmlAttribute;
|
||||||
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Java class for Features complex type.
|
||||||
|
*
|
||||||
|
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* <complexType name="Features">
|
||||||
|
* <complexContent>
|
||||||
|
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||||
|
* <sequence>
|
||||||
|
* <element name="Feature" type="{}Feature" maxOccurs="unbounded" minOccurs="0"/>
|
||||||
|
* </sequence>
|
||||||
|
* <attribute name="generate" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||||
|
* </restriction>
|
||||||
|
* </complexContent>
|
||||||
|
* </complexType>
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
|
@XmlType(name = "Features", propOrder = {
|
||||||
|
"feature"
|
||||||
|
})
|
||||||
|
public class Features {
|
||||||
|
|
||||||
|
@XmlElement(name = "Feature")
|
||||||
|
protected List<Feature> feature;
|
||||||
|
@XmlAttribute(name = "generate")
|
||||||
|
protected boolean generate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the feature property.
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* This accessor method returns a reference to the live list,
|
||||||
|
* not a snapshot. Therefore any modification you make to the
|
||||||
|
* returned list will be present inside the JAXB object.
|
||||||
|
* This is why there is not a <CODE>set</CODE> method for the feature property.
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* For example, to add a new item, do as follows:
|
||||||
|
* <pre>
|
||||||
|
* getFeature().add(newItem);
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* Objects of the following type(s) are allowed in the list
|
||||||
|
* {@link Feature }
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public List<Feature> getFeature() {
|
||||||
|
if (feature == null) {
|
||||||
|
feature = new ArrayList<Feature>();
|
||||||
|
}
|
||||||
|
return this.feature;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the generate property.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public boolean isGenerate() {
|
||||||
|
return generate;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the generate property.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setGenerate(boolean value) {
|
||||||
|
this.generate = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,83 +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.mgt.extensions.device.type.deployer.config;
|
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
|
||||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
|
||||||
import javax.xml.bind.annotation.XmlValue;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class for hold JndiLookupDefinition parsing with JAXB.
|
|
||||||
*/
|
|
||||||
@XmlRootElement(name = "JndiLookupDefinition")
|
|
||||||
public class JNDILookupDefinition {
|
|
||||||
|
|
||||||
private String jndiName;
|
|
||||||
private List<JNDIProperty> jndiProperties;
|
|
||||||
|
|
||||||
@XmlElement(name = "Name", required = false)
|
|
||||||
public String getJndiName() {
|
|
||||||
return jndiName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setJndiName(String jndiName) {
|
|
||||||
this.jndiName = jndiName;
|
|
||||||
}
|
|
||||||
|
|
||||||
@XmlElementWrapper(name = "Environment", required = false)
|
|
||||||
@XmlElement(name = "Property", nillable = false)
|
|
||||||
public List<JNDIProperty> getJndiProperties() {
|
|
||||||
return jndiProperties;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setJndiProperties(List<JNDIProperty> jndiProperties) {
|
|
||||||
this.jndiProperties = jndiProperties;
|
|
||||||
}
|
|
||||||
|
|
||||||
@XmlRootElement(name = "Property")
|
|
||||||
public static class JNDIProperty {
|
|
||||||
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
private String value;
|
|
||||||
|
|
||||||
@XmlAttribute(name = "Name")
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setName(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
@XmlValue
|
|
||||||
public String getValue() {
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setValue(String value) {
|
|
||||||
this.value = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,62 @@
|
|||||||
|
|
||||||
|
package org.wso2.carbon.device.mgt.extensions.device.type.deployer.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;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Java class for JndiLookupDefinition complex type.
|
||||||
|
*
|
||||||
|
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* <complexType name="JndiLookupDefinition">
|
||||||
|
* <complexContent>
|
||||||
|
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||||
|
* <sequence>
|
||||||
|
* <element name="Name" type="{http://www.w3.org/2001/XMLSchema}string"/>
|
||||||
|
* </sequence>
|
||||||
|
* </restriction>
|
||||||
|
* </complexContent>
|
||||||
|
* </complexType>
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
|
@XmlType(name = "JndiLookupDefinition", propOrder = {
|
||||||
|
"name"
|
||||||
|
})
|
||||||
|
public class JndiLookupDefinition {
|
||||||
|
|
||||||
|
@XmlElement(name = "Name", required = true)
|
||||||
|
protected String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the name property.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the name property.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setName(String value) {
|
||||||
|
this.name = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,118 @@
|
|||||||
|
|
||||||
|
package org.wso2.carbon.device.mgt.extensions.device.type.deployer.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;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Java class for License complex type.
|
||||||
|
*
|
||||||
|
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* <complexType name="License">
|
||||||
|
* <complexContent>
|
||||||
|
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||||
|
* <sequence>
|
||||||
|
* <element name="Language" type="{http://www.w3.org/2001/XMLSchema}string"/>
|
||||||
|
* <element name="Version" type="{http://www.w3.org/2001/XMLSchema}string"/>
|
||||||
|
* <element name="Text" type="{http://www.w3.org/2001/XMLSchema}string"/>
|
||||||
|
* </sequence>
|
||||||
|
* </restriction>
|
||||||
|
* </complexContent>
|
||||||
|
* </complexType>
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
|
@XmlType(name = "License", propOrder = {
|
||||||
|
"language",
|
||||||
|
"version",
|
||||||
|
"text"
|
||||||
|
})
|
||||||
|
public class License {
|
||||||
|
|
||||||
|
@XmlElement(name = "Language", required = true)
|
||||||
|
protected String language;
|
||||||
|
@XmlElement(name = "Version", required = true)
|
||||||
|
protected String version;
|
||||||
|
@XmlElement(name = "Text", required = true)
|
||||||
|
protected String text;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the language property.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public String getLanguage() {
|
||||||
|
return language;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the language property.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setLanguage(String value) {
|
||||||
|
this.language = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the version property.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public String getVersion() {
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the version property.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setVersion(String value) {
|
||||||
|
this.version = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the text property.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public String getText() {
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the text property.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setText(String value) {
|
||||||
|
this.text = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,118 @@
|
|||||||
|
|
||||||
|
package org.wso2.carbon.device.mgt.extensions.device.type.deployer.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;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Java class for ManagementRepository complex type.
|
||||||
|
*
|
||||||
|
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* <complexType name="ManagementRepository">
|
||||||
|
* <complexContent>
|
||||||
|
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||||
|
* <sequence>
|
||||||
|
* <element name="DataSourceConfiguration" type="{}DataSourceConfiguration"/>
|
||||||
|
* <element name="DeviceDefinition" type="{}DeviceDefinition"/>
|
||||||
|
* <element name="ProvisioningConfig" type="{}ProvisioningConfig"/>
|
||||||
|
* </sequence>
|
||||||
|
* </restriction>
|
||||||
|
* </complexContent>
|
||||||
|
* </complexType>
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
|
@XmlType(name = "ManagementRepository", propOrder = {
|
||||||
|
"dataSourceConfiguration",
|
||||||
|
"deviceDefinition",
|
||||||
|
"provisioningConfig"
|
||||||
|
})
|
||||||
|
public class ManagementRepository {
|
||||||
|
|
||||||
|
@XmlElement(name = "DataSourceConfiguration", required = true)
|
||||||
|
protected DataSourceConfiguration dataSourceConfiguration;
|
||||||
|
@XmlElement(name = "DeviceDefinition", required = true)
|
||||||
|
protected DeviceDefinition deviceDefinition;
|
||||||
|
@XmlElement(name = "ProvisioningConfig", required = true)
|
||||||
|
protected ProvisioningConfig provisioningConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the dataSourceConfiguration property.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link DataSourceConfiguration }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public DataSourceConfiguration getDataSourceConfiguration() {
|
||||||
|
return dataSourceConfiguration;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the dataSourceConfiguration property.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link DataSourceConfiguration }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setDataSourceConfiguration(DataSourceConfiguration value) {
|
||||||
|
this.dataSourceConfiguration = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the deviceDefinition property.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link DeviceDefinition }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public DeviceDefinition getDeviceDefinition() {
|
||||||
|
return deviceDefinition;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the deviceDefinition property.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link DeviceDefinition }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setDeviceDefinition(DeviceDefinition value) {
|
||||||
|
this.deviceDefinition = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the provisioningConfig property.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link ProvisioningConfig }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public ProvisioningConfig getProvisioningConfig() {
|
||||||
|
return provisioningConfig;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the provisioningConfig property.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link ProvisioningConfig }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setProvisioningConfig(ProvisioningConfig value) {
|
||||||
|
this.provisioningConfig = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,69 @@
|
|||||||
|
|
||||||
|
package org.wso2.carbon.device.mgt.extensions.device.type.deployer.config;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Java class for Properties complex type.
|
||||||
|
*
|
||||||
|
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* <complexType name="Properties">
|
||||||
|
* <complexContent>
|
||||||
|
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||||
|
* <sequence>
|
||||||
|
* <element name="Property" type="{}Property" maxOccurs="unbounded" minOccurs="0"/>
|
||||||
|
* </sequence>
|
||||||
|
* </restriction>
|
||||||
|
* </complexContent>
|
||||||
|
* </complexType>
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
|
@XmlType(name = "Properties", propOrder = {
|
||||||
|
"property"
|
||||||
|
})
|
||||||
|
public class Properties {
|
||||||
|
|
||||||
|
@XmlElement(name = "Property")
|
||||||
|
protected List<Property> property;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the property property.
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* This accessor method returns a reference to the live list,
|
||||||
|
* not a snapshot. Therefore any modification you make to the
|
||||||
|
* returned list will be present inside the JAXB object.
|
||||||
|
* This is why there is not a <CODE>set</CODE> method for the property property.
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* For example, to add a new item, do as follows:
|
||||||
|
* <pre>
|
||||||
|
* getProperty().add(newItem);
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* Objects of the following type(s) are allowed in the list
|
||||||
|
* {@link Property }
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public List<Property> getProperty() {
|
||||||
|
if (property == null) {
|
||||||
|
property = new ArrayList<Property>();
|
||||||
|
}
|
||||||
|
return this.property;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,87 @@
|
|||||||
|
|
||||||
|
package org.wso2.carbon.device.mgt.extensions.device.type.deployer.config;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
|
import javax.xml.bind.annotation.XmlAttribute;
|
||||||
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
import javax.xml.bind.annotation.XmlValue;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Java class for Property complex type.
|
||||||
|
*
|
||||||
|
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* <complexType name="Property">
|
||||||
|
* <simpleContent>
|
||||||
|
* <extension base="<http://www.w3.org/2001/XMLSchema>string">
|
||||||
|
* <attribute name="Name" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||||
|
* </extension>
|
||||||
|
* </simpleContent>
|
||||||
|
* </complexType>
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
|
@XmlType(name = "Property", propOrder = {
|
||||||
|
"value"
|
||||||
|
})
|
||||||
|
public class Property {
|
||||||
|
|
||||||
|
@XmlValue
|
||||||
|
protected String value;
|
||||||
|
@XmlAttribute(name = "Name")
|
||||||
|
protected String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the value property.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the value property.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setValue(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the name property.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the name property.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setName(String value) {
|
||||||
|
this.name = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,39 +1,62 @@
|
|||||||
/*
|
|
||||||
* 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.mgt.extensions.device.type.deployer.config;
|
package org.wso2.carbon.device.mgt.extensions.device.type.deployer.config;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class for holding device type configuration and parsing with JAXB.
|
* <p>Java class for ProvisioningConfig complex type.
|
||||||
|
*
|
||||||
|
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* <complexType name="ProvisioningConfig">
|
||||||
|
* <complexContent>
|
||||||
|
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||||
|
* <sequence>
|
||||||
|
* <element name="SharedWithAllTenants" type="{http://www.w3.org/2001/XMLSchema}string"/>
|
||||||
|
* </sequence>
|
||||||
|
* </restriction>
|
||||||
|
* </complexContent>
|
||||||
|
* </complexType>
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
@XmlRootElement(name = "ProvisioningConfig")
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
|
@XmlType(name = "ProvisioningConfig", propOrder = {
|
||||||
|
"sharedWithAllTenants"
|
||||||
|
})
|
||||||
public class ProvisioningConfig {
|
public class ProvisioningConfig {
|
||||||
|
|
||||||
private boolean sharedWithAllTenants;
|
@XmlElement(name = "SharedWithAllTenants", required = true)
|
||||||
|
protected boolean sharedWithAllTenants;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the sharedWithAllTenants property.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link boolean }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public boolean isSharedWithAllTenants() {
|
||||||
|
return sharedWithAllTenants;
|
||||||
|
}
|
||||||
|
|
||||||
@XmlElement(name = "SharedWithAllTenants", required = true)
|
/**
|
||||||
public boolean isSharedWithAllTenants() {
|
* Sets the value of the sharedWithAllTenants property.
|
||||||
return sharedWithAllTenants;
|
*
|
||||||
}
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setSharedWithAllTenants(boolean value) {
|
||||||
|
this.sharedWithAllTenants = value;
|
||||||
|
}
|
||||||
|
|
||||||
public void setSharedWithAllTenants(boolean sharedWithAllTenants) {
|
}
|
||||||
this.sharedWithAllTenants = sharedWithAllTenants;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -1,79 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2016, 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.mgt.extensions.device.type.deployer.config;
|
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
|
||||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
|
||||||
import javax.xml.bind.annotation.XmlValue;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@XmlRootElement(name = "PushNotificationConfiguration")
|
|
||||||
public class PushNotificationConfig {
|
|
||||||
|
|
||||||
private String pushNotificationProvider;
|
|
||||||
private List<Property> properties;
|
|
||||||
|
|
||||||
@XmlElementWrapper(name = "Properties", required = true)
|
|
||||||
@XmlElement(name = "Property", required = true)
|
|
||||||
public List<Property> getProperties() {
|
|
||||||
return properties;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setProperties(List<Property> properties) {
|
|
||||||
this.properties = properties;
|
|
||||||
}
|
|
||||||
|
|
||||||
@XmlElement(name = "PushNotificationProvider", required = true)
|
|
||||||
public String getPushNotificationProvider() {
|
|
||||||
return pushNotificationProvider;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPushNotificationProvider(String pushNotificationProvider) {
|
|
||||||
this.pushNotificationProvider = pushNotificationProvider;
|
|
||||||
}
|
|
||||||
|
|
||||||
@XmlRootElement(name = "Property")
|
|
||||||
public static class Property {
|
|
||||||
|
|
||||||
private String name;
|
|
||||||
private String value;
|
|
||||||
|
|
||||||
@XmlAttribute(name = "Name", required = true)
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setName(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
@XmlValue
|
|
||||||
public String getValue() {
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setValue(String value) {
|
|
||||||
this.value = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -0,0 +1,118 @@
|
|||||||
|
|
||||||
|
package org.wso2.carbon.device.mgt.extensions.device.type.deployer.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;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Java class for PushNotificationConfiguration complex type.
|
||||||
|
*
|
||||||
|
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* <complexType name="PushNotificationConfiguration">
|
||||||
|
* <complexContent>
|
||||||
|
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||||
|
* <sequence>
|
||||||
|
* <element name="PushNotificationProvider" type="{http://www.w3.org/2001/XMLSchema}string"/>
|
||||||
|
* <element name="FileBasedProperties" type="{http://www.w3.org/2001/XMLSchema}string"/>
|
||||||
|
* <element name="Properties" type="{}Properties"/>
|
||||||
|
* </sequence>
|
||||||
|
* </restriction>
|
||||||
|
* </complexContent>
|
||||||
|
* </complexType>
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
|
@XmlType(name = "PushNotificationConfiguration", propOrder = {
|
||||||
|
"pushNotificationProvider",
|
||||||
|
"fileBasedProperties",
|
||||||
|
"properties"
|
||||||
|
})
|
||||||
|
public class PushNotificationConfiguration {
|
||||||
|
|
||||||
|
@XmlElement(name = "PushNotificationProvider", required = true)
|
||||||
|
protected String pushNotificationProvider;
|
||||||
|
@XmlElement(name = "FileBasedProperties", required = true)
|
||||||
|
protected boolean fileBasedProperties;
|
||||||
|
@XmlElement(name = "Properties", required = true)
|
||||||
|
protected Properties properties;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the pushNotificationProvider property.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public String getPushNotificationProvider() {
|
||||||
|
return pushNotificationProvider;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the pushNotificationProvider property.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setPushNotificationProvider(String value) {
|
||||||
|
this.pushNotificationProvider = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the fileBasedProperties property.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public boolean isFileBasedProperties() {
|
||||||
|
return fileBasedProperties;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the fileBasedProperties property.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setFileBasedProperties(boolean value) {
|
||||||
|
this.fileBasedProperties = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the properties property.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link Properties }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public Properties getProperties() {
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the properties property.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link Properties }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setProperties(Properties value) {
|
||||||
|
this.properties = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
35
components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/src/main/java/org/wso2/carbon/device/mgt/extensions/device/type/deployer/config/FeaturesConfig.java → components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/src/main/java/org/wso2/carbon/device/mgt/extensions/device/type/deployer/exception/DeviceTypeDeployerFileException.java
35
components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/src/main/java/org/wso2/carbon/device/mgt/extensions/device/type/deployer/config/FeaturesConfig.java → components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/src/main/java/org/wso2/carbon/device/mgt/extensions/device/type/deployer/exception/DeviceTypeDeployerFileException.java
@ -0,0 +1,54 @@
|
|||||||
|
package org.wso2.carbon.device.mgt.extensions.device.type.deployer.template.dao;
|
||||||
|
|
||||||
|
import org.wso2.carbon.device.mgt.extensions.device.type.deployer.config.Attribute;
|
||||||
|
import org.wso2.carbon.device.mgt.extensions.device.type.deployer.config.DeviceDefinition;
|
||||||
|
import org.wso2.carbon.device.mgt.extensions.device.type.deployer.exception.DeviceTypeDeployerFileException;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class DeviceDAODefinition {
|
||||||
|
|
||||||
|
private String deviceTableName;
|
||||||
|
private String primarkey;
|
||||||
|
|
||||||
|
public List<String> getColumnNames() {
|
||||||
|
return columnNames;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<String> columnNames = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
|
public DeviceDAODefinition(DeviceDefinition deviceDefinition) {
|
||||||
|
deviceTableName = deviceDefinition.getTableName();
|
||||||
|
primarkey = deviceDefinition.getPrimaryKey();
|
||||||
|
List<Attribute> attributes = deviceDefinition.getAttributes().getAttribute();
|
||||||
|
if (deviceTableName == null || deviceTableName.isEmpty()) {
|
||||||
|
throw new DeviceTypeDeployerFileException("Missing deviceTableName");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (primarkey == null || primarkey.isEmpty()) {
|
||||||
|
throw new DeviceTypeDeployerFileException("Missing primaryKey ");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (attributes == null || attributes.size() == 0) {
|
||||||
|
throw new DeviceTypeDeployerFileException("Missing Attributes ");
|
||||||
|
}
|
||||||
|
for (Attribute attribute : attributes) {
|
||||||
|
if (attribute.getValue() == null ||attribute.getValue().isEmpty()) {
|
||||||
|
throw new DeviceTypeDeployerFileException("Unsupported attribute format for device definition");
|
||||||
|
}
|
||||||
|
columnNames.add(attribute.getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeviceTableName() {
|
||||||
|
return deviceTableName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPrimarkey() {
|
||||||
|
return primarkey;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in new issue