Fixing issues in resolving the configuration resolving.

feature/appm-store/pbac
sinthuja 8 years ago
parent fd18ab711c
commit 8d6e4cfa01

@ -94,9 +94,9 @@ public class ApplicationManagementUtil {
private static <T> T getInstance(Extension extension, Class<T> cls) throws InvalidConfigurationException { private static <T> T getInstance(Extension extension, Class<T> cls) throws InvalidConfigurationException {
try { try {
Class theClass = Class.forName(extension.getClassName()); Class theClass = Class.forName(extension.getClassName());
Class[] types = new Class[extension.getParameters().size()];
Object[] paramValues = new String[extension.getParameters().size()];
if (extension.getParameters() != null && extension.getParameters().size() > 0) { if (extension.getParameters() != null && extension.getParameters().size() > 0) {
Class[] types = new Class[extension.getParameters().size()];
Object[] paramValues = new String[extension.getParameters().size()];
for (int i = 0; i < extension.getParameters().size(); i++) { for (int i = 0; i < extension.getParameters().size(); i++) {
types[i] = String.class; types[i] = String.class;
paramValues[i] = extension.getParameters().get(i).getValue(); paramValues[i] = extension.getParameters().get(i).getValue();
@ -104,7 +104,7 @@ public class ApplicationManagementUtil {
Constructor<T> constructor = theClass.getConstructor(types); Constructor<T> constructor = theClass.getConstructor(types);
return constructor.newInstance(paramValues); return constructor.newInstance(paramValues);
} else { } else {
Constructor<T> constructor = theClass.getConstructor(types); Constructor<T> constructor = theClass.getConstructor();
return constructor.newInstance(); return constructor.newInstance();
} }
} catch (Exception e) { } catch (Exception e) {

@ -49,11 +49,6 @@
<artifactId>org.wso2.carbon.device.application.mgt.api.feature</artifactId> <artifactId>org.wso2.carbon.device.application.mgt.api.feature</artifactId>
<type>zip</type> <type>zip</type>
</dependency> </dependency>
<dependency>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.device.application.mgt.extensions.feature</artifactId>
<type>zip</type>
</dependency>
</dependencies> </dependencies>
<build> <build>
@ -105,7 +100,6 @@
</adviceFile> </adviceFile>
<includedFeatures> <includedFeatures>
<includedFeatureDef>org.wso2.carbon.devicemgt:org.wso2.carbon.device.application.mgt.api.feature:${carbon.device.mgt.version}</includedFeatureDef> <includedFeatureDef>org.wso2.carbon.devicemgt:org.wso2.carbon.device.application.mgt.api.feature:${carbon.device.mgt.version}</includedFeatureDef>
<includedFeatureDef>org.wso2.carbon.devicemgt:org.wso2.carbon.device.application.mgt.extensions.feature:${carbon.device.mgt.version}</includedFeatureDef>
</includedFeatures> </includedFeatures>
<bundles> <bundles>
<bundleDef> <bundleDef>

@ -27,7 +27,6 @@
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>application-mgt-feature</artifactId> <artifactId>application-mgt-feature</artifactId>
<version>2.0.63-SNAPSHOT</version> <version>2.0.63-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
@ -38,7 +37,7 @@
<module>org.wso2.carbon.device.application.mgt.api.feature</module> <module>org.wso2.carbon.device.application.mgt.api.feature</module>
<module>org.wso2.carbon.device.application.mgt.ui.feature</module> <module>org.wso2.carbon.device.application.mgt.ui.feature</module>
<module>org.wso2.carbon.device.application.mgt.feature</module> <module>org.wso2.carbon.device.application.mgt.feature</module>
<module>org.wso2.carbon.device.application.mgt.extensions.feature</module> <!--<module>org.wso2.carbon.device.application.mgt.extensions.feature</module>-->
<module>org.wso2.carbon.device.application.mgt.server.feature</module> <module>org.wso2.carbon.device.application.mgt.server.feature</module>
</modules> </modules>
</project> </project>
Loading…
Cancel
Save