Virtual Firealarm - broken pipe issue fixed and removed unwanted buttons

apim420
GDLMadushanka 8 years ago
parent 030b623c16
commit c1ee9f2263

@ -28,15 +28,12 @@ public class AgentConfiguration {
private String deviceOwner; private String deviceOwner;
private String deviceId; private String deviceId;
private String deviceName; private String deviceName;
private String controllerContext;
private String scepContext;
private String HTTPS_ServerEndpoint; private String HTTPS_ServerEndpoint;
private String HTTP_ServerEndpoint; private String HTTP_ServerEndpoint;
private String apimGatewayEndpoint; private String apimGatewayEndpoint;
private String mqttBrokerEndpoint; private String mqttBrokerEndpoint;
private String xmppServerEndpoint; private String xmppServerEndpoint;
private String apiApplicationKey; private String apiApplicationKey;
private String authMethod;
private String authToken; private String authToken;
private String refreshToken; private String refreshToken;
private int dataPushInterval; private int dataPushInterval;
@ -83,14 +80,6 @@ public class AgentConfiguration {
this.deviceName = deviceName; this.deviceName = deviceName;
} }
public String getControllerContext() {
return controllerContext;
}
public void setControllerContext(String controllerContext) {
this.controllerContext = controllerContext;
}
public String getHTTPS_ServerEndpoint() { public String getHTTPS_ServerEndpoint() {
return HTTPS_ServerEndpoint; return HTTPS_ServerEndpoint;
} }
@ -139,14 +128,6 @@ public class AgentConfiguration {
this.apiApplicationKey = apiApplicationKey; this.apiApplicationKey = apiApplicationKey;
} }
public String getAuthMethod() {
return authMethod;
}
public void setAuthMethod(String authMethod) {
this.authMethod = authMethod;
}
public String getAuthToken() { public String getAuthToken() {
return authToken; return authToken;
} }
@ -171,14 +152,6 @@ public class AgentConfiguration {
this.dataPushInterval = dataPushInterval; this.dataPushInterval = dataPushInterval;
} }
public String getScepContext() {
return scepContext;
}
public void setScepContext(String scepContext) {
this.scepContext = scepContext;
}
public String getXmppServerName() { public String getXmppServerName() {
return xmppServerName; return xmppServerName;
} }
@ -186,6 +159,7 @@ public class AgentConfiguration {
public void setXmppServerName(String xmppServerName) { public void setXmppServerName(String xmppServerName) {
this.xmppServerName = xmppServerName; this.xmppServerName = xmppServerName;
} }
} }

@ -73,8 +73,6 @@ public class AgentConstants {
public static final String DEVICE_ID_PROPERTY = "deviceId"; public static final String DEVICE_ID_PROPERTY = "deviceId";
public static final String SERVER_JID_PROPERTY = "server-jid"; public static final String SERVER_JID_PROPERTY = "server-jid";
public static final String DEVICE_NAME_PROPERTY = "device-name"; public static final String DEVICE_NAME_PROPERTY = "device-name";
public static final String DEVICE_CONTROLLER_CONTEXT_PROPERTY = "controller-context";
public static final String DEVICE_SCEP_CONTEXT_PROPERTY = "scep-context";
public static final String SERVER_HTTPS_EP_PROPERTY = "https-ep"; public static final String SERVER_HTTPS_EP_PROPERTY = "https-ep";
public static final String SERVER_HTTP_EP_PROPERTY = "http-ep"; public static final String SERVER_HTTP_EP_PROPERTY = "http-ep";
public static final String APIM_GATEWAY_EP_PROPERTY = "apim-ep"; public static final String APIM_GATEWAY_EP_PROPERTY = "apim-ep";
@ -82,7 +80,6 @@ public class AgentConstants {
public static final String XMPP_SERVER_EP_PROPERTY = "xmpp-ep"; public static final String XMPP_SERVER_EP_PROPERTY = "xmpp-ep";
public static final String XMPP_SERVER_NAME_PROPERTY = "xmpp-server-name"; public static final String XMPP_SERVER_NAME_PROPERTY = "xmpp-server-name";
public static final String API_APPLICATION_KEY = "application-key"; public static final String API_APPLICATION_KEY = "application-key";
public static final String AUTH_METHOD_PROPERTY = "auth-method";
public static final String AUTH_TOKEN_PROPERTY = "auth-token"; public static final String AUTH_TOKEN_PROPERTY = "auth-token";
public static final String REFRESH_TOKEN_PROPERTY = "refresh-token"; public static final String REFRESH_TOKEN_PROPERTY = "refresh-token";
public static final String NETWORK_INTERFACE_PROPERTY = "network-interface"; public static final String NETWORK_INTERFACE_PROPERTY = "network-interface";

@ -96,9 +96,6 @@ public class AgentManager {
AgentConstants.DEVICE_TYPE, AgentConstants.DEVICE_TYPE,
agentConfigs.getDeviceId()); agentConfigs.getDeviceId());
this.deviceMgtAnalyticUrl = agentConfigs.getHTTPS_ServerEndpoint() + analyticsPageContext;
this.deviceMgtControlUrl = agentConfigs.getHTTPS_ServerEndpoint() + controlPageContext;
this.agentStatus = AgentConstants.NOT_REGISTERED; this.agentStatus = AgentConstants.NOT_REGISTERED;
this.deviceName = this.agentConfigs.getDeviceName(); this.deviceName = this.agentConfigs.getDeviceName();

@ -108,10 +108,6 @@ public class AgentUtilOperations {
AgentConstants.SERVER_JID_PROPERTY)); AgentConstants.SERVER_JID_PROPERTY));
iotServerConfigs.setDeviceName(properties.getProperty( iotServerConfigs.setDeviceName(properties.getProperty(
AgentConstants.DEVICE_NAME_PROPERTY)); AgentConstants.DEVICE_NAME_PROPERTY));
iotServerConfigs.setControllerContext(properties.getProperty(
AgentConstants.DEVICE_CONTROLLER_CONTEXT_PROPERTY));
iotServerConfigs.setScepContext(properties.getProperty(
AgentConstants.DEVICE_SCEP_CONTEXT_PROPERTY));
iotServerConfigs.setHTTPS_ServerEndpoint(properties.getProperty( iotServerConfigs.setHTTPS_ServerEndpoint(properties.getProperty(
AgentConstants.SERVER_HTTPS_EP_PROPERTY)); AgentConstants.SERVER_HTTPS_EP_PROPERTY));
iotServerConfigs.setHTTP_ServerEndpoint(properties.getProperty( iotServerConfigs.setHTTP_ServerEndpoint(properties.getProperty(
@ -126,8 +122,6 @@ public class AgentUtilOperations {
AgentConstants.XMPP_SERVER_NAME_PROPERTY)); AgentConstants.XMPP_SERVER_NAME_PROPERTY));
iotServerConfigs.setApiApplicationKey(properties.getProperty( iotServerConfigs.setApiApplicationKey(properties.getProperty(
AgentConstants.API_APPLICATION_KEY)); AgentConstants.API_APPLICATION_KEY));
iotServerConfigs.setAuthMethod(properties.getProperty(
AgentConstants.AUTH_METHOD_PROPERTY));
iotServerConfigs.setAuthToken(properties.getProperty( iotServerConfigs.setAuthToken(properties.getProperty(
AgentConstants.AUTH_TOKEN_PROPERTY)); AgentConstants.AUTH_TOKEN_PROPERTY));
iotServerConfigs.setRefreshToken(properties.getProperty( iotServerConfigs.setRefreshToken(properties.getProperty(
@ -139,11 +133,10 @@ public class AgentUtilOperations {
iotServerConfigs.getTenantDomain()); iotServerConfigs.getTenantDomain());
log.info(AgentConstants.LOG_APPENDER + "Device Owner: " + log.info(AgentConstants.LOG_APPENDER + "Device Owner: " +
iotServerConfigs.getDeviceOwner()); iotServerConfigs.getDeviceOwner());
log.info(AgentConstants.LOG_APPENDER + "Device ID: " + iotServerConfigs.getDeviceId()); log.info(AgentConstants.LOG_APPENDER + "Device ID: " +
iotServerConfigs.getDeviceId());
log.info(AgentConstants.LOG_APPENDER + "Device Name: " + log.info(AgentConstants.LOG_APPENDER + "Device Name: " +
iotServerConfigs.getDeviceName()); iotServerConfigs.getDeviceName());
log.info(AgentConstants.LOG_APPENDER + "Device Controller Context: " +
iotServerConfigs.getControllerContext());
log.info(AgentConstants.LOG_APPENDER + "IoT Server HTTPS EndPoint: " + log.info(AgentConstants.LOG_APPENDER + "IoT Server HTTPS EndPoint: " +
iotServerConfigs.getHTTPS_ServerEndpoint()); iotServerConfigs.getHTTPS_ServerEndpoint());
log.info(AgentConstants.LOG_APPENDER + "IoT Server HTTP EndPoint: " + log.info(AgentConstants.LOG_APPENDER + "IoT Server HTTP EndPoint: " +
@ -154,8 +147,6 @@ public class AgentUtilOperations {
iotServerConfigs.getMqttBrokerEndpoint()); iotServerConfigs.getMqttBrokerEndpoint());
log.info(AgentConstants.LOG_APPENDER + "XMPP Server EndPoint: " + log.info(AgentConstants.LOG_APPENDER + "XMPP Server EndPoint: " +
iotServerConfigs.getXmppServerEndpoint()); iotServerConfigs.getXmppServerEndpoint());
log.info(AgentConstants.LOG_APPENDER + "Authentication Method: " +
iotServerConfigs.getAuthMethod());
log.info(AgentConstants.LOG_APPENDER + "Base64Encoded API Application Key: " + log.info(AgentConstants.LOG_APPENDER + "Base64Encoded API Application Key: " +
iotServerConfigs.getApiApplicationKey()); iotServerConfigs.getApiApplicationKey());
log.info(AgentConstants.LOG_APPENDER + "Authentication Token: " + log.info(AgentConstants.LOG_APPENDER + "Authentication Token: " +
@ -202,8 +193,8 @@ public class AgentUtilOperations {
AgentManager agentManager = AgentManager.getInstance(); AgentManager agentManager = AgentManager.getInstance();
String serverSecureEndpoint = agentManager.getAgentConfigs().getHTTPS_ServerEndpoint(); String serverSecureEndpoint = agentManager.getAgentConfigs().getHTTPS_ServerEndpoint();
String serverUnSecureEndpoint = agentManager.getAgentConfigs().getHTTP_ServerEndpoint(); String serverUnSecureEndpoint = agentManager.getAgentConfigs().getHTTP_ServerEndpoint();
String backEndContext = agentManager.getAgentConfigs().getControllerContext(); String backEndContext = "/virtual_firealarm/device";
String scepBackEndContext = agentManager.getAgentConfigs().getScepContext(); String scepBackEndContext = "/virtual_firealarm_scep";
String deviceControllerAPIEndpoint = serverSecureEndpoint + backEndContext; String deviceControllerAPIEndpoint = serverSecureEndpoint + backEndContext;
@ -312,7 +303,7 @@ public class AgentUtilOperations {
} }
public static String getAuthenticationMethod() { public static String getAuthenticationMethod() {
String authMethod = AgentManager.getInstance().getAgentConfigs().getAuthMethod(); String authMethod = "token";
switch (authMethod) { switch (authMethod) {
case AgentConstants.TOKEN_AUTHENTICATION_METHOD: case AgentConstants.TOKEN_AUTHENTICATION_METHOD:
return AgentConstants.TOKEN_AUTHENTICATION_METHOD; return AgentConstants.TOKEN_AUTHENTICATION_METHOD;

@ -46,8 +46,8 @@ is divided into following sections:
<property file="${user.properties.file}"/> <property file="${user.properties.file}"/>
<!-- The two properties below are usually overridden --> <!-- The two properties below are usually overridden -->
<!-- by the active platform. Just a fallback. --> <!-- by the active platform. Just a fallback. -->
<property name="default.javac.source" value="1.4"/> <property name="default.javac.source" value="1.6"/>
<property name="default.javac.target" value="1.4"/> <property name="default.javac.target" value="1.6"/>
</target> </target>
<target depends="-pre-init,-init-private,-init-user" name="-init-project"> <target depends="-pre-init,-init-private,-init-user" name="-init-project">
<property file="nbproject/configs/${config}.properties"/> <property file="nbproject/configs/${config}.properties"/>
@ -76,7 +76,7 @@ is divided into following sections:
<and> <and>
<isset property="javac.profile"/> <isset property="javac.profile"/>
<length length="0" string="${javac.profile}" when="greater"/> <length length="0" string="${javac.profile}" when="greater"/>
<matches pattern="1\.[89](\..*)?" string="${javac.source}"/> <matches pattern="((1\.[89])|9)(\..*)?" string="${javac.source}"/>
</and> </and>
</condition> </condition>
<condition property="do.archive"> <condition property="do.archive">
@ -156,6 +156,7 @@ is divided into following sections:
<property name="application.args" value=""/> <property name="application.args" value=""/>
<property name="source.encoding" value="${file.encoding}"/> <property name="source.encoding" value="${file.encoding}"/>
<property name="runtime.encoding" value="${source.encoding}"/> <property name="runtime.encoding" value="${source.encoding}"/>
<property name="manifest.encoding" value="${source.encoding}"/>
<condition property="javadoc.encoding.used" value="${javadoc.encoding}"> <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
<and> <and>
<isset property="javadoc.encoding"/> <isset property="javadoc.encoding"/>
@ -191,7 +192,12 @@ is divided into following sections:
</not> </not>
</and> </and>
</condition> </condition>
<property name="javac.fork" value="${jdkBug6558476}"/> <condition else="false" property="javac.fork">
<or>
<istrue value="${jdkBug6558476}"/>
<istrue value="${javac.external.vm}"/>
</or>
</condition>
<property name="jar.index" value="false"/> <property name="jar.index" value="false"/>
<property name="jar.index.metainf" value="${jar.index}"/> <property name="jar.index.metainf" value="${jar.index}"/>
<property name="copylibs.rebase" value="true"/> <property name="copylibs.rebase" value="true"/>
@ -217,6 +223,7 @@ is divided into following sections:
<condition else="" property="testng.debug.mode" value="-mixed"> <condition else="" property="testng.debug.mode" value="-mixed">
<istrue value="${junit+testng.available}"/> <istrue value="${junit+testng.available}"/>
</condition> </condition>
<property name="java.failonerror" value="true"/>
</target> </target>
<target name="-post-init"> <target name="-post-init">
<!-- Empty placeholder for easier customization. --> <!-- Empty placeholder for easier customization. -->
@ -693,7 +700,7 @@ is divided into following sections:
<sequential> <sequential>
<property environment="env"/> <property environment="env"/>
<resolve name="profiler.current.path" value="${profiler.info.pathvar}"/> <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
<java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}"> <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/> <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
<jvmarg value="${profiler.info.jvmargs.agent}"/> <jvmarg value="${profiler.info.jvmargs.agent}"/>
<jvmarg line="${profiler.info.jvmargs}"/> <jvmarg line="${profiler.info.jvmargs}"/>
@ -768,7 +775,7 @@ is divided into following sections:
<attribute default="${debug.classpath}" name="classpath"/> <attribute default="${debug.classpath}" name="classpath"/>
<element name="customize" optional="true"/> <element name="customize" optional="true"/>
<sequential> <sequential>
<java classname="@{classname}" dir="${work.dir}" fork="true"> <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/> <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
<jvmarg line="${debug-args-line}"/> <jvmarg line="${debug-args-line}"/>
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
@ -795,7 +802,7 @@ is divided into following sections:
<attribute default="jvm" name="jvm"/> <attribute default="jvm" name="jvm"/>
<element name="customize" optional="true"/> <element name="customize" optional="true"/>
<sequential> <sequential>
<java classname="@{classname}" dir="${work.dir}" fork="true"> <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/> <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/> <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
@ -834,7 +841,7 @@ is divided into following sections:
</chainedmapper> </chainedmapper>
</pathconvert> </pathconvert>
<taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/> <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
<copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}"> <copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" manifestencoding="UTF-8" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
<fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/> <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
<manifest> <manifest>
<attribute name="Class-Path" value="${jar.classpath}"/> <attribute name="Class-Path" value="${jar.classpath}"/>
@ -846,7 +853,7 @@ is divided into following sections:
</target> </target>
<target name="-init-presetdef-jar"> <target name="-init-presetdef-jar">
<presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1"> <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
<jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}"> <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
<j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/> <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
</jar> </jar>
</presetdef> </presetdef>
@ -969,15 +976,15 @@ is divided into following sections:
</target> </target>
<target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest"> <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
<tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
<copy file="${manifest.file}" tofile="${tmp.manifest.file}"/> <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
</target> </target>
<target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass"> <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
<manifest file="${tmp.manifest.file}" mode="update"> <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
<attribute name="Main-Class" value="${main.class}"/> <attribute name="Main-Class" value="${main.class}"/>
</manifest> </manifest>
</target> </target>
<target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile"> <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
<manifest file="${tmp.manifest.file}" mode="update"> <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
<attribute name="Profile" value="${javac.profile}"/> <attribute name="Profile" value="${javac.profile}"/>
</manifest> </manifest>
</target> </target>
@ -985,7 +992,7 @@ is divided into following sections:
<basename file="${application.splash}" property="splashscreen.basename"/> <basename file="${application.splash}" property="splashscreen.basename"/>
<mkdir dir="${build.classes.dir}/META-INF"/> <mkdir dir="${build.classes.dir}/META-INF"/>
<copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/> <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
<manifest file="${tmp.manifest.file}" mode="update"> <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
<attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/> <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
</manifest> </manifest>
</target> </target>
@ -1180,7 +1187,7 @@ is divided into following sections:
<target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main"> <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
<fail unless="run.class">Must select one file in the IDE or set run.class</fail> <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
<startprofiler/> <startprofiler/>
<antcal target="run-test-with-main"/> <antcall target="run-test-with-main"/>
</target> </target>
<target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent"> <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>

@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=8064a381@1.75.2.48
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=e60df945 nbproject/build-impl.xml.data.CRC32=e60df945
nbproject/build-impl.xml.script.CRC32=4fa004f7 nbproject/build-impl.xml.script.CRC32=18800575
nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48

@ -1,2 +1,2 @@
compile.on.save=true compile.on.save=true
user.properties.file=/home/charitha/.netbeans/8.0.2/build.properties user.properties.file=/home/lahiru/.netbeans/8.2/build.properties

@ -3,7 +3,8 @@
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/> <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2"> <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group> <group>
<file>file:/home/charitha/git/IoT/iot-server-agents/FireAlarmVirtualAgent/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.java</file> <file>file:/home/lahiru/WSO2IOT/carbon-device-mgt-plugins/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/VirtualAgentUI.java</file>
<file>file:/home/lahiru/WSO2IOT/carbon-device-mgt-plugins/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.java</file>
</group> </group>
</open-files> </open-files>
</project-private> </project-private>

@ -364,11 +364,7 @@
<Component id="jLabel20" min="-2" max="-2" attributes="0"/> <Component id="jLabel20" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="lblStatus" max="32767" attributes="0"/> <Component id="lblStatus" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace min="-2" pref="273" max="-2" attributes="0"/>
<Component id="btnControl" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="btnView" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
@ -377,12 +373,8 @@
<Group type="102" alignment="1" attributes="0"> <Group type="102" alignment="1" attributes="0">
<EmptySpace max="32767" attributes="0"/> <EmptySpace max="32767" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0"> <Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="jLabel20" alignment="0" max="32767" attributes="0"/> <Component id="jLabel20" pref="27" max="32767" attributes="0"/>
<Group type="103" alignment="0" groupAlignment="3" attributes="0"> <Component id="lblStatus" max="32767" attributes="0"/>
<Component id="btnView" alignment="3" max="32767" attributes="0"/>
<Component id="btnControl" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="lblStatus" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
</Group> </Group>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
</Group> </Group>
@ -396,22 +388,6 @@
<Property name="verticalTextPosition" type="int" value="1"/> <Property name="verticalTextPosition" type="int" value="1"/>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JButton" name="btnView">
<Properties>
<Property name="text" type="java.lang.String" value="View Device Data"/>
</Properties>
<Events>
<EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="btnViewMouseClicked"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="btnControl">
<Properties>
<Property name="text" type="java.lang.String" value="Control Device"/>
</Properties>
<Events>
<EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="btnControlMouseClicked"/>
</Events>
</Component>
<Component class="javax.swing.JLabel" name="lblStatus"> <Component class="javax.swing.JLabel" name="lblStatus">
<Properties> <Properties>
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">

@ -47,8 +47,6 @@ public class AgentUI extends javax.swing.JFrame {
chkbxTemperatureSmooth = new javax.swing.JCheckBox(); chkbxTemperatureSmooth = new javax.swing.JCheckBox();
jPanel6 = new javax.swing.JPanel(); jPanel6 = new javax.swing.JPanel();
jLabel20 = new javax.swing.JLabel(); jLabel20 = new javax.swing.JLabel();
btnView = new javax.swing.JButton();
btnControl = new javax.swing.JButton();
lblStatus = new javax.swing.JLabel(); lblStatus = new javax.swing.JLabel();
jPanel8 = new javax.swing.JPanel(); jPanel8 = new javax.swing.JPanel();
jLabel23 = new javax.swing.JLabel(); jLabel23 = new javax.swing.JLabel();
@ -272,20 +270,6 @@ public class AgentUI extends javax.swing.JFrame {
jLabel20.setText("Connection Status:"); jLabel20.setText("Connection Status:");
jLabel20.setVerticalTextPosition(javax.swing.SwingConstants.TOP); jLabel20.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
btnView.setText("View Device Data");
btnView.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
btnViewMouseClicked(evt);
}
});
btnControl.setText("Control Device");
btnControl.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
btnControlMouseClicked(evt);
}
});
lblStatus.setFont(new java.awt.Font("Cantarell", 1, 15)); // NOI18N lblStatus.setFont(new java.awt.Font("Cantarell", 1, 15)); // NOI18N
lblStatus.setText("Not Connected"); lblStatus.setText("Not Connected");
@ -298,22 +282,15 @@ public class AgentUI extends javax.swing.JFrame {
.addComponent(jLabel20) .addComponent(jLabel20)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(lblStatus, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lblStatus, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGap(273, 273, 273))
.addComponent(btnControl)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnView)
.addContainerGap())
); );
jPanel6Layout.setVerticalGroup( jPanel6Layout.setVerticalGroup(
jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup() .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jLabel20, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel20, javax.swing.GroupLayout.DEFAULT_SIZE, 27, Short.MAX_VALUE)
.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblStatus, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addComponent(btnView, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(btnControl)
.addComponent(lblStatus)))
.addContainerGap()) .addContainerGap())
); );
@ -463,7 +440,7 @@ public class AgentUI extends javax.swing.JFrame {
jLabel7.setText("Data Push Interval:"); jLabel7.setText("Data Push Interval:");
spinnerInterval.setModel(new javax.swing.SpinnerNumberModel(Integer.valueOf(5), Integer.valueOf(1), null, Integer.valueOf(1))); spinnerInterval.setModel(new javax.swing.SpinnerNumberModel(5, 1, null, 1));
spinnerInterval.addChangeListener(new javax.swing.event.ChangeListener() { spinnerInterval.addChangeListener(new javax.swing.event.ChangeListener() {
public void stateChanged(javax.swing.event.ChangeEvent evt) { public void stateChanged(javax.swing.event.ChangeEvent evt) {
spinnerIntervalStateChanged(evt); spinnerIntervalStateChanged(evt);
@ -615,14 +592,6 @@ public class AgentUI extends javax.swing.JFrame {
pack(); pack();
}// </editor-fold>//GEN-END:initComponents }// </editor-fold>//GEN-END:initComponents
private void btnControlMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnControlMouseClicked
// TODO add your handling code here:
}//GEN-LAST:event_btnControlMouseClicked
private void btnViewMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnViewMouseClicked
// TODO add your handling code here:
}//GEN-LAST:event_btnViewMouseClicked
private void chkbxTemperatureRandomActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkbxTemperatureRandomActionPerformed private void chkbxTemperatureRandomActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkbxTemperatureRandomActionPerformed
// TODO add your handling code here: // TODO add your handling code here:
}//GEN-LAST:event_chkbxTemperatureRandomActionPerformed }//GEN-LAST:event_chkbxTemperatureRandomActionPerformed
@ -692,8 +661,6 @@ public class AgentUI extends javax.swing.JFrame {
}//GEN-LAST:event_chkbxEmulateActionPerformed }//GEN-LAST:event_chkbxEmulateActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables // Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton btnControl;
private javax.swing.JButton btnView;
private javax.swing.JCheckBox chkbxEmulate; private javax.swing.JCheckBox chkbxEmulate;
private javax.swing.JCheckBox chkbxHumidityRandom; private javax.swing.JCheckBox chkbxHumidityRandom;
private javax.swing.JCheckBox chkbxHumiditySmooth; private javax.swing.JCheckBox chkbxHumiditySmooth;

Loading…
Cancel
Save