forked from community/device-mgt-core
parent
6f139a15d3
commit
bbd42a6a6b
2
components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.api/src/main/java/io.entgra.device.mgt.core.factory.mgt.api/common/GsonMessageBodyHandler.java → components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.api/src/main/java/io.entgra.device.mgt.core.factory.mgt.api/addons/GsonMessageBodyHandler.java
2
components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.api/src/main/java/io.entgra.device.mgt.core.factory.mgt.api/common/GsonMessageBodyHandler.java → components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.api/src/main/java/io.entgra.device.mgt.core.factory.mgt.api/addons/GsonMessageBodyHandler.java
4
components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.api/src/main/java/io.entgra.device.mgt.core.factory.mgt.api/exception/ValidationInterceptor.java → components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.api/src/main/java/io.entgra.device.mgt.core.factory.mgt.api/addons/ValidationInterceptor.java
4
components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.api/src/main/java/io.entgra.device.mgt.core.factory.mgt.api/exception/ValidationInterceptor.java → components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.api/src/main/java/io.entgra.device.mgt.core.factory.mgt.api/addons/ValidationInterceptor.java
@ -1,55 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018 - 2023, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
|
||||
*
|
||||
* Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
|
||||
* Version 2.0 (the "License"); you may not use this file except
|
||||
* in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.entgra.device.mgt.core.factory.mgt.api.exception;
|
||||
|
||||
import io.entgra.device.mgt.core.factory.mgt.api.util.Constants;
|
||||
import io.entgra.device.mgt.core.factory.mgt.api.util.DeviceMgtUtil;
|
||||
|
||||
import javax.validation.ConstraintViolation;
|
||||
import javax.ws.rs.WebApplicationException;
|
||||
import javax.ws.rs.core.Response;
|
||||
import java.util.Set;
|
||||
|
||||
public class ConstraintViolationException extends WebApplicationException {
|
||||
private String message;
|
||||
|
||||
public <T> ConstraintViolationException(Set<ConstraintViolation<T>> violations) {
|
||||
super(Response.status(Response.Status.BAD_REQUEST)
|
||||
.entity(DeviceMgtUtil.getConstraintViolationErrorDTO(violations))
|
||||
.header(Constants.DeviceConstants.HEADER_CONTENT_TYPE, Constants.DeviceConstants.APPLICATION_JSON)
|
||||
.build());
|
||||
|
||||
//Set the error message
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
for (ConstraintViolation violation : violations) {
|
||||
stringBuilder.append(violation.getRootBeanClass().getSimpleName());
|
||||
stringBuilder.append(".");
|
||||
stringBuilder.append(violation.getPropertyPath());
|
||||
stringBuilder.append(": ");
|
||||
stringBuilder.append(violation.getMessage());
|
||||
stringBuilder.append(", ");
|
||||
}
|
||||
message = stringBuilder.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
}
|
@ -1,39 +1,26 @@
|
||||
/*
|
||||
* Copyright (c) 2018 - 2023, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
|
||||
*
|
||||
* Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
|
||||
* Version 2.0 (the "License"); you may not use this file except
|
||||
* in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.entgra.device.mgt.core.factory.mgt.api.util;
|
||||
|
||||
/**
|
||||
* Holds the constants used by DeviceImpl Management Admin web application.
|
||||
* Defines constants used in Factory management REST API bundle.
|
||||
*/
|
||||
public class Constants {
|
||||
public static final String HEADER_CONTENT_TYPE = "Content-Type";
|
||||
public static final String APPLICATION_JSON = "application/json";
|
||||
public static final String SCOPE = "scope";
|
||||
|
||||
public final class ErrorMessages {
|
||||
private ErrorMessages () { throw new AssertionError(); }
|
||||
|
||||
public static final String STATUS_BAD_REQUEST_MESSAGE_DEFAULT = "Bad Request";
|
||||
}
|
||||
|
||||
public final class DeviceConstants {
|
||||
private DeviceConstants () { throw new AssertionError(); }
|
||||
public static final class CSVConstants {
|
||||
public static final String CSV_HEADER_DATE = "date";
|
||||
public static final String CSV_HEADER_TIME = "time";
|
||||
public static final String CSV_HEADER_MACHINE_ID = "machineId";
|
||||
public static final String CSV_HEADER_TARGET = "target";
|
||||
public static final String CSV_HEADER_PRODUCT_ID = "productId";
|
||||
public static final String CSV_FILE_SEPARATOR = ",";
|
||||
}
|
||||
|
||||
public static final String APPLICATION_JSON = "application/json";
|
||||
public static final String HEADER_CONTENT_TYPE = "Content-Type";
|
||||
}
|
||||
public final class DeviceConstants {
|
||||
private DeviceConstants () { throw new AssertionError(); }
|
||||
|
||||
public static final String APPLICATION_JSON = "application/json";
|
||||
public static final String HEADER_CONTENT_TYPE = "Content-Type";
|
||||
}
|
||||
}
|
||||
|
@ -1,19 +0,0 @@
|
||||
package io.entgra.device.mgt.core.factory.mgt.api.util;
|
||||
|
||||
/**
|
||||
* Defines constants used in Factory management REST API bundle.
|
||||
*/
|
||||
public class FactoryManagementAPIConstants {
|
||||
public static final String HEADER_CONTENT_TYPE = "Content-Type";
|
||||
public static final String APPLICATION_JSON = "application/json";
|
||||
public static final String SCOPE = "scope";
|
||||
|
||||
public static final class CSVConstants {
|
||||
public static final String CSV_HEADER_DATE = "date";
|
||||
public static final String CSV_HEADER_TIME = "time";
|
||||
public static final String CSV_HEADER_MACHINE_ID = "machineId";
|
||||
public static final String CSV_HEADER_TARGET = "target";
|
||||
public static final String CSV_HEADER_PRODUCT_ID = "productId";
|
||||
public static final String CSV_FILE_SEPARATOR = ",";
|
||||
}
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<!--
|
||||
~ Copyright (c) 2018 - 2023, 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.
|
||||
-->
|
||||
|
||||
<!--
|
||||
This file defines class loading policy of the whole container. But this behaviour can be overridden by individual webapps by putting this file into the META-INF/ directory.
|
||||
-->
|
||||
<Classloading xmlns="http://wso2.org/projects/as/classloading">
|
||||
|
||||
<!-- Parent-first or child-first. Default behaviour is child-first.-->
|
||||
<ParentFirst>false</ParentFirst>
|
||||
|
||||
<!--
|
||||
Default environments that contains provides to all the webapps. This can be overridden by individual webapps by specifing required environments
|
||||
Tomcat environment is the default and every webapps gets it even if they didn't specify it.
|
||||
e.g. If a webapps requires CXF, they will get both Tomcat and CXF.
|
||||
-->
|
||||
<Environments>CXF3,Carbon</Environments>
|
||||
</Classloading>
|
@ -1,41 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2018 - 2021 Entgra (Pvt) Ltd, Inc - All Rights Reserved.
|
||||
*
|
||||
* Unauthorised copying/redistribution of this file, via any medium is strictly prohibited.
|
||||
*
|
||||
* Licensed under the Entgra Commercial License, Version 1.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://entgra.io/licenses/entgra-commercial/1.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.entgra.device.mgt.core.factory.mgt.core.config.datasource;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
/**
|
||||
* Class for holding data source configuration in factory-mgt-config.xml at 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;
|
||||
}
|
||||
}
|
@ -1,79 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2018 - 2023 Entgra (Pvt) Ltd, Inc - All Rights Reserved.
|
||||
*
|
||||
* Unauthorised copying/redistribution of this file, via any medium is strictly prohibited.
|
||||
*
|
||||
* Licensed under the Entgra Commercial License, Version 1.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://entgra.io/licenses/entgra-commercial/1.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.entgra.device.mgt.core.factory.mgt.core.config.datasource;
|
||||
|
||||
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 = "JndiLookupDefinition")
|
||||
public class JNDILookupDefinition {
|
||||
|
||||
private String jndiName;
|
||||
private List<JNDIProperty> jndiProperties;
|
||||
|
||||
@XmlElement(name = "Name", nillable = false)
|
||||
public String getJndiName() {
|
||||
return jndiName;
|
||||
}
|
||||
|
||||
public void setJndiName(String jndiName) {
|
||||
this.jndiName = jndiName;
|
||||
}
|
||||
|
||||
@XmlElementWrapper(name = "Environment", nillable = 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;
|
||||
}
|
||||
}
|
||||
}
|
22
components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io.entgra.device.mgt.core.factory.mgt.core/config/FactoryConfigurationManager.java → components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io/entgra/device/mgt/core/factory/mgt/core/config/FactoryConfigurationManager.java
22
components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io.entgra.device.mgt.core.factory.mgt.core/config/FactoryConfigurationManager.java → components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io/entgra/device/mgt/core/factory/mgt/core/config/FactoryConfigurationManager.java
17
components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io.entgra.device.mgt.core.factory.mgt.core/config/FactoryMgtConfig.java → components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io/entgra/device/mgt/core/factory/mgt/core/config/FactoryMgtConfig.java
17
components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io.entgra.device.mgt.core.factory.mgt.core/config/FactoryMgtConfig.java → components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io/entgra/device/mgt/core/factory/mgt/core/config/FactoryMgtConfig.java
2
components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io.entgra.device.mgt.core.factory.mgt.core/config/FactoryMgtConfigRepository.java → components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io/entgra/device/mgt/core/factory/mgt/core/config/FactoryMgtRepository.java
2
components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io.entgra.device.mgt.core.factory.mgt.core/config/FactoryMgtConfigRepository.java → components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io/entgra/device/mgt/core/factory/mgt/core/config/FactoryMgtRepository.java
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (c) 2018 - 2023, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
|
||||
*
|
||||
* Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
|
||||
* Version 2.0 (the "License"); you may not use this file except
|
||||
* in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.entgra.device.mgt.core.factory.mgt.core.config.datasource;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
/**
|
||||
* Holding data source configuration in factory-mgt-config.xml at parsing with JAXB
|
||||
*/
|
||||
@XmlRootElement(name = "DataSourceConfiguration")
|
||||
public class DataSourceConfig {
|
||||
|
||||
private JNDILookupDefinition jndiLookupDefinition;
|
||||
|
||||
@XmlElement(name = "JndiLookupDefinition", nillable = true)
|
||||
public JNDILookupDefinition getJndiLookupDefinition() {
|
||||
return jndiLookupDefinition;
|
||||
}
|
||||
|
||||
public void setJndiLookupDefinition(JNDILookupDefinition jndiLookupDefinition) {
|
||||
this.jndiLookupDefinition = jndiLookupDefinition;
|
||||
}
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
/*
|
||||
* Copyright (c) 2018 - 2023, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
|
||||
*
|
||||
* Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
|
||||
* Version 2.0 (the "License"); you may not use this file except
|
||||
* in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package io.entgra.device.mgt.core.factory.mgt.core.config.datasource;
|
||||
|
||||
import javax.xml.bind.annotation.*;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Class for hold JndiLookupDefinition of rss-manager.xml at parsing with JAXB
|
||||
*/
|
||||
@XmlRootElement(name = "JndiLookupDefinition")
|
||||
public class JNDILookupDefinition {
|
||||
|
||||
private String jndiName;
|
||||
private List<JNDIProperty> jndiProperties;
|
||||
|
||||
@XmlElement(name = "Name", nillable = false)
|
||||
public String getJndiName() {
|
||||
return jndiName;
|
||||
}
|
||||
|
||||
public void setJndiName(String jndiName) {
|
||||
this.jndiName = jndiName;
|
||||
}
|
||||
|
||||
@XmlElementWrapper(name = "Environment", nillable = 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
components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io.entgra.device.mgt.core.factory.mgt.core/dao/common/FactoryMgtDAOFactory.java → components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io/entgra/device/mgt/core/factory/mgt/core/dao/common/FactoryMgtDAOFactory.java
0
components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io.entgra.device.mgt.core.factory.mgt.core/dao/common/FactoryMgtDAOFactory.java → components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io/entgra/device/mgt/core/factory/mgt/core/dao/common/FactoryMgtDAOFactory.java
0
components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io.entgra.device.mgt.core.factory.mgt.core/dao/impl/FactoryMgtDAOImpl.java → components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io/entgra/device/mgt/core/factory/mgt/core/dao/impl/FactoryMgtDAOImpl.java
0
components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io.entgra.device.mgt.core.factory.mgt.core/dao/impl/FactoryMgtDAOImpl.java → components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io/entgra/device/mgt/core/factory/mgt/core/dao/impl/FactoryMgtDAOImpl.java
0
components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io.entgra.device.mgt.core.factory.mgt.core/exception/IllegalTransactionStateException.java → components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io/entgra/device/mgt/core/factory/mgt/core/exception/IllegalTransactionStateException.java
0
components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io.entgra.device.mgt.core.factory.mgt.core/exception/IllegalTransactionStateException.java → components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io/entgra/device/mgt/core/factory/mgt/core/exception/IllegalTransactionStateException.java
0
components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io.entgra.device.mgt.core.factory.mgt.core/exception/TransactionManagementException.java → components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io/entgra/device/mgt/core/factory/mgt/core/exception/TransactionManagementException.java
0
components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io.entgra.device.mgt.core.factory.mgt.core/exception/TransactionManagementException.java → components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io/entgra/device/mgt/core/factory/mgt/core/exception/TransactionManagementException.java
0
components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io.entgra.device.mgt.core.factory.mgt.core/exception/UnsupportedDatabaseEngineException.java → components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io/entgra/device/mgt/core/factory/mgt/core/exception/UnsupportedDatabaseEngineException.java
0
components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io.entgra.device.mgt.core.factory.mgt.core/exception/UnsupportedDatabaseEngineException.java → components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io/entgra/device/mgt/core/factory/mgt/core/exception/UnsupportedDatabaseEngineException.java
3
components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io.entgra.device.mgt.core.factory.mgt.core/internal/FactoryMgtDataHolder.java → components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io/entgra/device/mgt/core/factory/mgt/core/internal/FactoryMgtDataHolder.java
3
components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io.entgra.device.mgt.core.factory.mgt.core/internal/FactoryMgtDataHolder.java → components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io/entgra/device/mgt/core/factory/mgt/core/internal/FactoryMgtDataHolder.java
45
components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io.entgra.device.mgt.core.factory.mgt.core/internal/FactoryMgtServiceComponent.java → components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io/entgra/device/mgt/core/factory/mgt/core/internal/FactoryMgtServiceComponent.java
45
components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io.entgra.device.mgt.core.factory.mgt.core/internal/FactoryMgtServiceComponent.java → components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io/entgra/device/mgt/core/factory/mgt/core/internal/FactoryMgtServiceComponent.java
0
components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io.entgra.device.mgt.core.factory.mgt.core/service/impl/ProductionPlanServiceImpl.java → components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io/entgra/device/mgt/core/factory/mgt/core/service/impl/ProductionPlanServiceImpl.java
0
components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io.entgra.device.mgt.core.factory.mgt.core/service/impl/ProductionPlanServiceImpl.java → components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io/entgra/device/mgt/core/factory/mgt/core/service/impl/ProductionPlanServiceImpl.java
0
components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io.entgra.device.mgt.core.factory.mgt.core/util/FactoryMgtDAOUtil.java → components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io/entgra/device/mgt/core/factory/mgt/core/util/FactoryMgtDAOUtil.java
0
components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io.entgra.device.mgt.core.factory.mgt.core/util/FactoryMgtDAOUtil.java → components/factory-mgt/io.entgra.device.mgt.core.factory.mgt.core/src/main/java/io/entgra/device/mgt/core/factory/mgt/core/util/FactoryMgtDAOUtil.java
@ -0,0 +1,119 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2018 - 2023, 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.
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
||||
<parent>
|
||||
<groupId>io.entgra.device.mgt.core</groupId>
|
||||
<artifactId>factory-mgt-feature</artifactId>
|
||||
<version>5.0.27-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>io.entgra.device.mgt.core.factory.mgt.api.feature</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>Entgra - Factory Management API Feature</name>
|
||||
<url>https://entgra.io</url>
|
||||
<description>This feature contains the APIs required for Factory</description>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>factory-mgt-copy</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>io.entgra.device.mgt.core</groupId>
|
||||
<artifactId>io.entgra.device.mgt.core.factory.mgt.api</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>war</type>
|
||||
<overWrite>true</overWrite>
|
||||
<outputDirectory>
|
||||
${project.build.directory}/maven-shared-archive-resources/webapps
|
||||
</outputDirectory>
|
||||
<destFileName>api#factory-mgt#v1.0.war</destFileName>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-resources</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>src/main/resources</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>resources</directory>
|
||||
<includes>
|
||||
<include>build.properties</include>
|
||||
<include>p2.inf</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.wso2.maven</groupId>
|
||||
<artifactId>carbon-p2-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>p2-feature-generation</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>p2-feature-gen</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<id>io.entgra.device.mgt.core.factory.mgt.api</id>
|
||||
<propertiesFile>../../etc/feature.properties
|
||||
</propertiesFile>
|
||||
<adviceFile>
|
||||
<properties>
|
||||
<propertyDef>org.wso2.carbon.p2.category.type:server
|
||||
</propertyDef>
|
||||
<propertyDef>org.eclipse.equinox.p2.type.group:false
|
||||
</propertyDef>
|
||||
</properties>
|
||||
</adviceFile>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@ -0,0 +1,3 @@
|
||||
instructions.configure = \
|
||||
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/webapps/);\
|
||||
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.device.mgt.core.factory.mgt.api_${feature.version}/webapps/api#factory-mgt#v1.0.war,target:${installFolder}/../../deployment/server/webapps/api#factory-mgt#v1.0.war,overwrite:true);\
|
@ -0,0 +1,138 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2018 - 2023, 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.
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
||||
<parent>
|
||||
<groupId>io.entgra.device.mgt.core</groupId>
|
||||
<artifactId>factory-mgt-feature</artifactId>
|
||||
<version>5.0.27-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>io.entgra.device.mgt.core.factory.mgt.server.feature</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>Entgra - Factory Management Server Feature</name>
|
||||
<url>https://entgra.io</url>
|
||||
<description>This feature contains the core bundles required for Back-end Factory Management functionality
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>io.entgra.device.mgt.core</groupId>-->
|
||||
<!-- <artifactId>io.entgra.device.mgt.core.factory.mgt.common</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>io.entgra.device.mgt.core</groupId>
|
||||
<artifactId>io.entgra.device.mgt.core.factory.mgt.core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.googlecode.plist</groupId>
|
||||
<artifactId>dd-plist</artifactId>
|
||||
<version>${googlecode.plist.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-validator</groupId>
|
||||
<artifactId>commons-validator</artifactId>
|
||||
<version>${commons-validator.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.h2database.wso2</groupId>
|
||||
<artifactId>h2-database-engine</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>2.6</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-resources</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>src/main/resources</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>resources</directory>
|
||||
<includes>
|
||||
<include>build.properties</include>
|
||||
<include>p2.inf</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.wso2.maven</groupId>
|
||||
<artifactId>carbon-p2-plugin</artifactId>
|
||||
<version>${carbon.p2.plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>p2-feature-generation</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>p2-feature-gen</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<id>io.entgra.device.mgt.core.factory.mgt.server</id>
|
||||
<propertiesFile>../../etc/feature.properties</propertiesFile>
|
||||
<adviceFile>
|
||||
<properties>
|
||||
<propertyDef>org.wso2.carbon.p2.category.type:server</propertyDef>
|
||||
<propertyDef>org.eclipse.equinox.p2.type.group:false</propertyDef>
|
||||
</properties>
|
||||
</adviceFile>
|
||||
<bundles>
|
||||
<!-- <bundleDef>-->
|
||||
<!-- io.entgra.device.mgt.core:io.entgra.device.mgt.core.factory.mgt.common:${io.entgra.device.mgt.core.version}-->
|
||||
<!-- </bundleDef>-->
|
||||
<bundleDef>
|
||||
io.entgra.device.mgt.core:io.entgra.device.mgt.core.factory.mgt.core:${io.entgra.device.mgt.core.version}
|
||||
</bundleDef>
|
||||
<bundleDef>
|
||||
com.googlecode.plist:dd-plist:${googlecode.plist.version}
|
||||
</bundleDef>
|
||||
<bundleDef>
|
||||
commons-validator:commons-validator:${commons-validator.version}
|
||||
</bundleDef>
|
||||
</bundles>
|
||||
<importBundles>
|
||||
</importBundles>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<properties>
|
||||
<commons-validator.version>1.6</commons-validator.version>
|
||||
</properties>
|
||||
</project>
|
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!--
|
||||
~ Copyright (C) 2018 - 2023 Entgra (Pvt) Ltd, Inc - All Rights Reserved.
|
||||
~
|
||||
~ Unauthorised copying/redistribution of this file, via any medium is strictly prohibited.
|
||||
~
|
||||
~ Licensed under the Entgra Commercial License, Version 1.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ https://entgra.io/licenses/entgra-commercial/1.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.
|
||||
-->
|
||||
<FactoryMgtConfiguration>
|
||||
<ManagementRepository>
|
||||
<DataSourceConfiguration>
|
||||
<JndiLookupDefinition>
|
||||
<Name>jdbc/DM_DS</Name>
|
||||
</JndiLookupDefinition>
|
||||
</DataSourceConfiguration>
|
||||
</ManagementRepository>
|
||||
</FactoryMgtConfiguration>
|
@ -0,0 +1,4 @@
|
||||
instructions.configure = \
|
||||
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.device.mgt.core.factory.mgt.server_${feature.version}/conf/factory-mgt-config.xml,target:${installFolder}/../../conf/factory-mgt-config.xml,overwrite:true);\
|
||||
|
||||
instructions.unconfigure = \
|
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2018 - 2023, 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.
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
||||
<parent>
|
||||
<groupId>io.entgra.device.mgt.core</groupId>
|
||||
<artifactId>io.entgra.device.mgt.core.parent</artifactId>
|
||||
<version>5.0.27-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>factory-mgt-feature</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>Entgra - Factory Management Feature</name>
|
||||
<url>http://entgra.io</url>
|
||||
|
||||
<modules>
|
||||
<module>io.entgra.device.mgt.core.factory.mgt.server.feature</module>
|
||||
<module>io.entgra.device.mgt.core.factory.mgt.api.feature</module>
|
||||
</modules>
|
||||
|
||||
|
||||
</project>
|
Loading…
Reference in new issue