save
Showing
75 changed files
with
499 additions
and
190 deletions
| ... | @@ -145,40 +145,33 @@ | ... | @@ -145,40 +145,33 @@ |
| 145 | </dependency> | 145 | </dependency> |
| 146 | 146 | ||
| 147 | <dependency> | 147 | <dependency> |
| 148 | <groupId>org.emercit</groupId> | 148 | <groupId>org.emercit</groupId> |
| 149 | <artifactId>ethmanager</artifactId> | 149 | <artifactId>ethmanager</artifactId> |
| 150 | <version>1.3</version> | 150 | <version>1.5</version> |
| 151 | </dependency> | 151 | </dependency> |
| 152 | 152 | ||
| 153 | <dependency> | 153 | <dependency> |
| 154 | <groupId>org.emercit</groupId> | 154 | <groupId>org.emercit</groupId> |
| 155 | <artifactId>dnsmanager</artifactId> | 155 | <artifactId>dnsmanager</artifactId> |
| 156 | <version>1.8</version> | 156 | <version>1.11</version> |
| 157 | </dependency> | 157 | </dependency> |
| 158 | 158 | ||
| 159 | |||
| 160 | <dependency> | 159 | <dependency> |
| 161 | <groupId>org.emercit</groupId> | 160 | <groupId>org.emercit</groupId> |
| 162 | <artifactId>proxymanager</artifactId> | 161 | <artifactId>proxymanager</artifactId> |
| 163 | <version>1.5</version> | 162 | <version>1.11</version> |
| 164 | </dependency> | 163 | </dependency> |
| 165 | 164 | ||
| 166 | |||
| 167 | |||
| 168 | |||
| 169 | |||
| 170 | <dependency> | 165 | <dependency> |
| 171 | <groupId>org.emercit</groupId> | 166 | <groupId>org.emercit</groupId> |
| 172 | <artifactId>remoteservers</artifactId> | 167 | <artifactId>remoteservers</artifactId> |
| 173 | <version>1.3</version> | 168 | <version>1.5</version> |
| 174 | </dependency> | 169 | </dependency> |
| 175 | 170 | ||
| 176 | |||
| 177 | |||
| 178 | <dependency> | 171 | <dependency> |
| 179 | <groupId>org.emercit</groupId> | 172 | <groupId>org.emercit</groupId> |
| 180 | <artifactId>pckutils</artifactId> | 173 | <artifactId>pckutils</artifactId> |
| 181 | <version>1.0</version> | 174 | <version>1.5</version> |
| 182 | </dependency> | 175 | </dependency> |
| 183 | 176 | ||
| 184 | <dependency> | 177 | <dependency> |
| ... | @@ -187,36 +180,27 @@ | ... | @@ -187,36 +180,27 @@ |
| 187 | <version>1.2</version> | 180 | <version>1.2</version> |
| 188 | </dependency> | 181 | </dependency> |
| 189 | 182 | ||
| 190 | |||
| 191 | <dependency> | 183 | <dependency> |
| 192 | <groupId>org.emercit</groupId> | 184 | <groupId>org.emercit</groupId> |
| 193 | <artifactId>gsmmanager</artifactId> | 185 | <artifactId>gsmmanager</artifactId> |
| 194 | <version>1.0</version> | 186 | <version>1.5</version> |
| 195 | </dependency> | 187 | </dependency> |
| 196 | 188 | ||
| 189 | <dependency> | ||
| 190 | <groupId>org.emercit</groupId> | ||
| 191 | <artifactId>xmldbmanager</artifactId> | ||
| 192 | <version>1.5</version> | ||
| 193 | </dependency> | ||
| 197 | 194 | ||
| 198 | 195 | <dependency> | |
| 196 | <groupId>org.emercit</groupId> | ||
| 197 | <artifactId>projecttools</artifactId> | ||
| 198 | <version>1.5</version> | ||
| 199 | </dependency> | ||
| 199 | 200 | ||
| 200 | </dependencies> | 201 | </dependencies> |
| 201 | 202 | ||
| 202 | 203 | ||
| 203 | |||
| 204 | |||
| 205 | |||
| 206 | |||
| 207 | |||
| 208 | |||
| 209 | |||
| 210 | |||
| 211 | |||
| 212 | |||
| 213 | |||
| 214 | |||
| 215 | |||
| 216 | |||
| 217 | |||
| 218 | |||
| 219 | |||
| 220 | <repositories> | 204 | <repositories> |
| 221 | <!-- For testing against latest Spring snapshots --> | 205 | <!-- For testing against latest Spring snapshots --> |
| 222 | <repository> | 206 | <repository> | ... | ... |
No preview for this file type
| 1 | caf9454105e3cbc4ac0b60987090a733 | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | 2ea0b4dad83432842310705dd4c0e3fdbadf9c26 | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" | ||
| 3 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
| 4 | <modelVersion>4.0.0</modelVersion> | ||
| 5 | <groupId>org.emercit</groupId> | ||
| 6 | <artifactId>dnsmanager</artifactId> | ||
| 7 | <version>1.10</version> | ||
| 8 | </project> |
| 1 | ad9eb8fb8152e02706c5107474f1aa59 | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | ead1074571e63ded55814f78d973ef125d7a4901 | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
No preview for this file type
| 1 | 90734e5f904dba36844baf21b38a5480 | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | 692c23945ca97fc63163d562102f5f3605a85fdc | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" | ||
| 3 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
| 4 | <modelVersion>4.0.0</modelVersion> | ||
| 5 | <groupId>org.emercit</groupId> | ||
| 6 | <artifactId>dnsmanager</artifactId> | ||
| 7 | <version>1.11</version> | ||
| 8 | </project> |
| 1 | 10834c90f5a134ed9049c5c5110a52ff | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | d980691e392605e05efc354fa3d97e0176d8e7b7 | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <metadata> | ||
| 3 | <groupId>org.emercit</groupId> | ||
| 4 | <artifactId>dnsmanager</artifactId> | ||
| 5 | <versioning> | ||
| 6 | <release>1.11</release> | ||
| 7 | <versions> | ||
| 8 | <version>1.10</version> | ||
| 9 | <version>1.11</version> | ||
| 10 | </versions> | ||
| 11 | <lastUpdated>20150728122954</lastUpdated> | ||
| 12 | </versioning> | ||
| 13 | </metadata> |
| 1 | cb505f81b58d404ebed1c46305618a9c | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | ac94d91e75c7e6c954681bc1a95f6f14952eeb2d | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
No preview for this file type
| 1 | 4c351e7edbf051e9df3ec3699da1605d | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | 3876f90aa045e45d7e9c0a8ad35bfddd907fe663 | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" | ||
| 3 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
| 4 | <modelVersion>4.0.0</modelVersion> | ||
| 5 | <groupId>org.emercit</groupId> | ||
| 6 | <artifactId>gsmmanager</artifactId> | ||
| 7 | <version>1.5</version> | ||
| 8 | </project> |
| 1 | 514a3d035547f0629266cb8a4a0ddc15 | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | de2047aee213538b5b379d3dd17f3ab5bc86a9c7 | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | afd859b5cb72dfbbfb1db8b441d68eae | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | a0d7234f16a583466f250762f3c712f442d4f7a7 | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
No preview for this file type
| 1 | d64c197c668b6f7b072b593553c50735 | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | 0c2e88c4fb46bfd97edfaeed0454364c07528659 | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" | ||
| 3 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
| 4 | <modelVersion>4.0.0</modelVersion> | ||
| 5 | <groupId>org.emercit</groupId> | ||
| 6 | <artifactId>proxymanager</artifactId> | ||
| 7 | <version>1.10</version> | ||
| 8 | </project> |
| 1 | 8bc0271759b8abdd341a9e4ff8ccaf55 | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | d106165f1cbcc4d8c049c1de6628eb991a857be3 | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
No preview for this file type
| 1 | 5348b5b0ea92ce2f36391f3a95de3e66 | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | 6bb3f471a75406a054b0757cc2f5774d1533220e | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" | ||
| 3 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
| 4 | <modelVersion>4.0.0</modelVersion> | ||
| 5 | <groupId>org.emercit</groupId> | ||
| 6 | <artifactId>proxymanager</artifactId> | ||
| 7 | <version>1.11</version> | ||
| 8 | </project> |
| 1 | ef6b28a8e81af7e6c5fba92ebe2cf1b5 | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | 178dfbe38a2fa2bbbf3afba5b11a40a56e67c5cb | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -3,10 +3,12 @@ | ... | @@ -3,10 +3,12 @@ |
| 3 | <groupId>org.emercit</groupId> | 3 | <groupId>org.emercit</groupId> |
| 4 | <artifactId>proxymanager</artifactId> | 4 | <artifactId>proxymanager</artifactId> |
| 5 | <versioning> | 5 | <versioning> |
| 6 | <release>1.5</release> | 6 | <release>1.11</release> |
| 7 | <versions> | 7 | <versions> |
| 8 | <version>1.5</version> | 8 | <version>1.5</version> |
| 9 | <version>1.10</version> | ||
| 10 | <version>1.11</version> | ||
| 9 | </versions> | 11 | </versions> |
| 10 | <lastUpdated>20150728070304</lastUpdated> | 12 | <lastUpdated>20150728095355</lastUpdated> |
| 11 | </versioning> | 13 | </versioning> |
| 12 | </metadata> | 14 | </metadata> | ... | ... |
No preview for this file type
| 1 | 748e75354f1f427487dce16e6fbbf39b | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | 724c3667292c53a7bb0f16b0bff190877e27e7ba | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" | ||
| 3 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
| 4 | <modelVersion>4.0.0</modelVersion> | ||
| 5 | <groupId>org.emercit</groupId> | ||
| 6 | <artifactId>remoteservers</artifactId> | ||
| 7 | <version>1.5</version> | ||
| 8 | </project> |
| 1 | f47a1a9d847758a0909f9c1f01d5c998 | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | ffe0046a88071dbdd7b423bc96262cc10b0afb00 | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | a18179a5d0b03b4895433c0762186c1d | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | c6b68d1e4f8761bc395df22af34d5d5381d6f3ab | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -69,14 +69,14 @@ public class ProxyController { | ... | @@ -69,14 +69,14 @@ public class ProxyController { |
| 69 | ProxyBean db=new ProxyBean(); | 69 | ProxyBean db=new ProxyBean(); |
| 70 | 70 | ||
| 71 | 71 | ||
| 72 | db.setId(d.getId()); | 72 | //db.setId(d.getId()); |
| 73 | db.setProtocol(d.getProtocol()); | 73 | db.setProtocol(d.getProtocol()); |
| 74 | db.setHost(d.getHost()); | 74 | db.setHost(d.getHost()); |
| 75 | db.setPort(d.getPort()); | 75 | db.setPort(d.getPort()); |
| 76 | db.setLogin(d.getLogin()); | 76 | db.setLogin(d.getLogin()); |
| 77 | db.setPass(d.getPass()); | 77 | db.setPass(d.getPass()); |
| 78 | db.setEnabled(d.getEnabled()); | 78 | db.setEnabled(d.getEnabled()); |
| 79 | db.setAuth(d.getAuth()); | 79 | // db.setAuth(d.getAuth()); |
| 80 | 80 | ||
| 81 | 81 | ||
| 82 | dbs.add(db); | 82 | dbs.add(db); | ... | ... |
| ... | @@ -12,11 +12,11 @@ public enum GSMService { | ... | @@ -12,11 +12,11 @@ public enum GSMService { |
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | public GSMBean getGsm() { | 14 | public GSMBean getGsm() { |
| 15 | return gsm.getGSMInfo(); | 15 | return gsm.get(); |
| 16 | } | 16 | } |
| 17 | 17 | ||
| 18 | public boolean Update(GSMBean m) { | 18 | public boolean Update(GSMBean m) { |
| 19 | 19 | ||
| 20 | return gsm.setGsmModem(m); | 20 | return gsm.set(m); |
| 21 | } | 21 | } |
| 22 | } | 22 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -8,22 +8,26 @@ import java.util.Vector; | ... | @@ -8,22 +8,26 @@ import java.util.Vector; |
| 8 | 8 | ||
| 9 | import org.emercit.proxymanager.model.ProxyBean; | 9 | import org.emercit.proxymanager.model.ProxyBean; |
| 10 | import org.emercit.proxymanager.service.ProxyLinux; | 10 | import org.emercit.proxymanager.service.ProxyLinux; |
| 11 | import org.emercit.proxymanager.service.ProxyDBImpl; | 11 | import org.emercit.xmldbmanager.service.Db; |
| 12 | import org.emercit.projecttools.constants.Paths; | ||
| 13 | |||
| 14 | |||
| 12 | 15 | ||
| 13 | 16 | ||
| 14 | public enum ProxyService { | 17 | public enum ProxyService { |
| 15 | 18 | ||
| 16 | INSTANCE; | 19 | INSTANCE; |
| 17 | 20 | ||
| 18 | private ProxyLinux proxylinux=new ProxyLinux(); | 21 | private ProxyLinux proxy=new ProxyLinux(); |
| 22 | private Db db=new Db(Paths.BEAN_PROXY); | ||
| 19 | 23 | ||
| 20 | private ProxyDBImpl proxydb=new ProxyDBImpl(); | 24 | |
| 21 | 25 | ||
| 22 | private Vector<String> vStr; | 26 | private Vector<String> vStr; |
| 23 | private Vector<ProxyBean> vPb; | 27 | private Vector<ProxyBean> vPb; |
| 24 | 28 | ||
| 25 | public Vector<ProxyBean> getAllProxyBean() { | 29 | public Vector<ProxyBean> getAllProxyBean() { |
| 26 | return proxydb.selectDb(); | 30 | return (Vector<ProxyBean> )db.select(); |
| 27 | 31 | ||
| 28 | } | 32 | } |
| 29 | 33 | ||
| ... | @@ -31,8 +35,8 @@ public enum ProxyService { | ... | @@ -31,8 +35,8 @@ public enum ProxyService { |
| 31 | 35 | ||
| 32 | public boolean Upd(Vector<ProxyBean> beans) { | 36 | public boolean Upd(Vector<ProxyBean> beans) { |
| 33 | 37 | ||
| 34 | return proxylinux.Config(beans); | 38 | // proxy.Config(beans); |
| 35 | 39 | return true; | |
| 36 | } | 40 | } |
| 37 | } | 41 | } |
| 38 | 42 | ... | ... |
| ... | @@ -8,7 +8,7 @@ import java.util.Vector; | ... | @@ -8,7 +8,7 @@ import java.util.Vector; |
| 8 | 8 | ||
| 9 | 9 | ||
| 10 | import org.emercit.remoteservers.model.RemoteServerBean; | 10 | import org.emercit.remoteservers.model.RemoteServerBean; |
| 11 | import org.emercit.remoteserver.service.RemoteServerDB; | 11 | import org.emercit.remoteserver.service.RemSrv; |
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | ||
| ... | @@ -16,20 +16,20 @@ public enum RemoteServerManager { | ... | @@ -16,20 +16,20 @@ public enum RemoteServerManager { |
| 16 | 16 | ||
| 17 | INSTANCE; | 17 | INSTANCE; |
| 18 | 18 | ||
| 19 | private RemoteServerDB store=new RemoteServerDB(); | 19 | private RemSrv store=new RemSrv(); |
| 20 | 20 | ||
| 21 | private Vector<RemoteServerBean> beans; | 21 | private Vector<RemoteServerBean> beans; |
| 22 | 22 | ||
| 23 | 23 | ||
| 24 | public Vector<RemoteServerBean> getAll() { | 24 | public Vector<RemoteServerBean> getAll() { |
| 25 | return store.SelectServers(); | 25 | return store.get(); |
| 26 | 26 | ||
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | 29 | ||
| 30 | public RemoteServerBean getByType(String type) { | 30 | public RemoteServerBean getByType(String type) { |
| 31 | 31 | ||
| 32 | beans=store.SelectServers(); | 32 | beans=store.get(); |
| 33 | 33 | ||
| 34 | for (RemoteServerBean b:beans) { | 34 | for (RemoteServerBean b:beans) { |
| 35 | 35 | ||
| ... | @@ -44,7 +44,7 @@ public enum RemoteServerManager { | ... | @@ -44,7 +44,7 @@ public enum RemoteServerManager { |
| 44 | 44 | ||
| 45 | public boolean Update(RemoteServerBean b) { | 45 | public boolean Update(RemoteServerBean b) { |
| 46 | 46 | ||
| 47 | beans=store.SelectServers(); | 47 | beans=store.get(); |
| 48 | 48 | ||
| 49 | for (RemoteServerBean bean:beans) { | 49 | for (RemoteServerBean bean:beans) { |
| 50 | 50 | ||
| ... | @@ -56,7 +56,7 @@ public enum RemoteServerManager { | ... | @@ -56,7 +56,7 @@ public enum RemoteServerManager { |
| 56 | bean.setIp(b.getIp()); | 56 | bean.setIp(b.getIp()); |
| 57 | bean.setPort(b.getPort()); | 57 | bean.setPort(b.getPort()); |
| 58 | 58 | ||
| 59 | return store.Update(beans); | 59 | return store.set(beans); |
| 60 | 60 | ||
| 61 | } | 61 | } |
| 62 | 62 | ... | ... |
| ... | @@ -12,12 +12,12 @@ | ... | @@ -12,12 +12,12 @@ |
| 12 | <attribute name="maven.pomderived" value="true"/> | 12 | <attribute name="maven.pomderived" value="true"/> |
| 13 | </attributes> | 13 | </attributes> |
| 14 | </classpathentry> | 14 | </classpathentry> |
| 15 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"> | 15 | <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> |
| 16 | <attributes> | 16 | <attributes> |
| 17 | <attribute name="maven.pomderived" value="true"/> | 17 | <attribute name="maven.pomderived" value="true"/> |
| 18 | </attributes> | 18 | </attributes> |
| 19 | </classpathentry> | 19 | </classpathentry> |
| 20 | <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | 20 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"> |
| 21 | <attributes> | 21 | <attributes> |
| 22 | <attribute name="maven.pomderived" value="true"/> | 22 | <attribute name="maven.pomderived" value="true"/> |
| 23 | </attributes> | 23 | </attributes> | ... | ... |
| 1 | eclipse.preferences.version=1 | 1 | eclipse.preferences.version=1 |
| 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 | 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 |
| 3 | org.eclipse.jdt.core.compiler.compliance=1.5 | 3 | org.eclipse.jdt.core.compiler.compliance=1.7 |
| 4 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning | 4 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning |
| 5 | org.eclipse.jdt.core.compiler.source=1.5 | 5 | org.eclipse.jdt.core.compiler.source=1.7 | ... | ... |
| ... | @@ -14,6 +14,28 @@ | ... | @@ -14,6 +14,28 @@ |
| 14 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | 14 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| 15 | <java-version>1.7</java-version> | 15 | <java-version>1.7</java-version> |
| 16 | </properties> | 16 | </properties> |
| 17 | |||
| 18 | |||
| 19 | |||
| 20 | <build> | ||
| 21 | <plugins> | ||
| 22 | <plugin> | ||
| 23 | <groupId>org.apache.maven.plugins</groupId> | ||
| 24 | <artifactId>maven-compiler-plugin</artifactId> | ||
| 25 | <configuration> | ||
| 26 | <source>1.7</source> | ||
| 27 | <target>1.7</target> | ||
| 28 | <showDeprecation>true</showDeprecation> | ||
| 29 | <showWarnings>true</showWarnings> | ||
| 30 | <executable>${env.JAVA_HOME_7}/bin/javac</executable> | ||
| 31 | <fork>true</fork> | ||
| 32 | </configuration> | ||
| 33 | </plugin> | ||
| 34 | </plugins> | ||
| 35 | |||
| 36 | </build> | ||
| 37 | |||
| 38 | |||
| 17 | 39 | ||
| 18 | <dependencies> | 40 | <dependencies> |
| 19 | 41 | ||
| ... | @@ -40,11 +62,51 @@ | ... | @@ -40,11 +62,51 @@ |
| 40 | <artifactId>json-io</artifactId> | 62 | <artifactId>json-io</artifactId> |
| 41 | <version>4.0.0</version> | 63 | <version>4.0.0</version> |
| 42 | </dependency> | 64 | </dependency> |
| 43 | </dependencies> | 65 | |
| 66 | |||
| 67 | |||
| 68 | |||
| 69 | <dependency> | ||
| 70 | <groupId>org.emercit</groupId> | ||
| 71 | <artifactId>projecttools</artifactId> | ||
| 72 | <version>1.5</version> | ||
| 73 | </dependency> | ||
| 74 | |||
| 75 | </dependencies> | ||
| 76 | |||
| 77 | <repositories> | ||
| 78 | <!--other repositories if any--> | ||
| 79 | <repository> | ||
| 80 | <id>project.local</id> | ||
| 81 | <name>project</name> | ||
| 82 | <url>file:/root/git/hardwareconfig/DevTools/repo</url> | ||
| 83 | </repository> | ||
| 84 | </repositories> | ||
| 85 | |||
| 86 | |||
| 87 | |||
| 44 | </project> | 88 | </project> |
| 45 | 89 | ||
| 46 | 90 | ||
| 47 | 91 | ||
| 92 | |||
| 93 | |||
| 94 | |||
| 95 | |||
| 96 | |||
| 97 | |||
| 98 | |||
| 99 | |||
| 100 | |||
| 101 | |||
| 102 | |||
| 103 | |||
| 104 | |||
| 105 | |||
| 106 | |||
| 107 | |||
| 108 | |||
| 109 | |||
| 48 | 110 | ||
| 49 | 111 | ||
| 50 | 112 | ... | ... |
| ... | @@ -70,7 +70,7 @@ | ... | @@ -70,7 +70,7 @@ |
| 70 | <groupId>org.emercit</groupId> | 70 | <groupId>org.emercit</groupId> |
| 71 | <artifactId>projecttools</artifactId> | 71 | <artifactId>projecttools</artifactId> |
| 72 | <version>1.5</version> | 72 | <version>1.5</version> |
| 73 | </dependency> | 73 | </dependency> |
| 74 | 74 | ||
| 75 | </dependencies> | 75 | </dependencies> |
| 76 | 76 | ... | ... |
| ... | @@ -32,7 +32,6 @@ public class ProxyLinux { | ... | @@ -32,7 +32,6 @@ public class ProxyLinux { |
| 32 | private ProxyBean pmp; | 32 | private ProxyBean pmp; |
| 33 | 33 | ||
| 34 | 34 | ||
| 35 | |||
| 36 | private boolean checkProrocol(String value) { | 35 | private boolean checkProrocol(String value) { |
| 37 | 36 | ||
| 38 | if (value.equals("http")|| value.equals("ftp") || value.equals("https")) { | 37 | if (value.equals("http")|| value.equals("ftp") || value.equals("https")) { |
| ... | @@ -43,7 +42,7 @@ public class ProxyLinux { | ... | @@ -43,7 +42,7 @@ public class ProxyLinux { |
| 43 | } | 42 | } |
| 44 | 43 | ||
| 45 | 44 | ||
| 46 | private void Config(Vector<ProxyBean> pbs) { | 45 | public void Config(Vector<ProxyBean> pbs) { |
| 47 | try { | 46 | try { |
| 48 | File file = new File("/etc/environment"); | 47 | File file = new File("/etc/environment"); |
| 49 | 48 | ... | ... |
| ... | @@ -12,12 +12,12 @@ | ... | @@ -12,12 +12,12 @@ |
| 12 | <attribute name="maven.pomderived" value="true"/> | 12 | <attribute name="maven.pomderived" value="true"/> |
| 13 | </attributes> | 13 | </attributes> |
| 14 | </classpathentry> | 14 | </classpathentry> |
| 15 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"> | 15 | <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> |
| 16 | <attributes> | 16 | <attributes> |
| 17 | <attribute name="maven.pomderived" value="true"/> | 17 | <attribute name="maven.pomderived" value="true"/> |
| 18 | </attributes> | 18 | </attributes> |
| 19 | </classpathentry> | 19 | </classpathentry> |
| 20 | <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | 20 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"> |
| 21 | <attributes> | 21 | <attributes> |
| 22 | <attribute name="maven.pomderived" value="true"/> | 22 | <attribute name="maven.pomderived" value="true"/> |
| 23 | </attributes> | 23 | </attributes> | ... | ... |
| 1 | eclipse.preferences.version=1 | 1 | eclipse.preferences.version=1 |
| 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 | 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 |
| 3 | org.eclipse.jdt.core.compiler.compliance=1.5 | 3 | org.eclipse.jdt.core.compiler.compliance=1.7 |
| 4 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning | 4 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning |
| 5 | org.eclipse.jdt.core.compiler.source=1.5 | 5 | org.eclipse.jdt.core.compiler.source=1.7 | ... | ... |
| ... | @@ -13,6 +13,27 @@ | ... | @@ -13,6 +13,27 @@ |
| 13 | <properties> | 13 | <properties> |
| 14 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | 14 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| 15 | </properties> | 15 | </properties> |
| 16 | |||
| 17 | |||
| 18 | <build> | ||
| 19 | <plugins> | ||
| 20 | <plugin> | ||
| 21 | <groupId>org.apache.maven.plugins</groupId> | ||
| 22 | <artifactId>maven-compiler-plugin</artifactId> | ||
| 23 | <configuration> | ||
| 24 | <source>1.7</source> | ||
| 25 | <target>1.7</target> | ||
| 26 | <showDeprecation>true</showDeprecation> | ||
| 27 | <showWarnings>true</showWarnings> | ||
| 28 | <executable>${env.JAVA_HOME_7}/bin/javac</executable> | ||
| 29 | <fork>true</fork> | ||
| 30 | </configuration> | ||
| 31 | </plugin> | ||
| 32 | </plugins> | ||
| 33 | |||
| 34 | </build> | ||
| 35 | |||
| 36 | |||
| 16 | 37 | ||
| 17 | <dependencies> | 38 | <dependencies> |
| 18 | 39 | ||
| ... | @@ -43,9 +64,30 @@ | ... | @@ -43,9 +64,30 @@ |
| 43 | <version>4.0.0</version> | 64 | <version>4.0.0</version> |
| 44 | </dependency> | 65 | </dependency> |
| 45 | 66 | ||
| 46 | 67 | <dependency> | |
| 68 | <groupId>org.emercit</groupId> | ||
| 69 | <artifactId>xmldbmanager</artifactId> | ||
| 70 | <version>1.5</version> | ||
| 71 | </dependency> | ||
| 72 | |||
| 73 | <dependency> | ||
| 74 | <groupId>org.emercit</groupId> | ||
| 75 | <artifactId>projecttools</artifactId> | ||
| 76 | <version>1.5</version> | ||
| 77 | </dependency> | ||
| 47 | 78 | ||
| 48 | 79 | ||
| 49 | 80 | ||
| 50 | </dependencies> | 81 | </dependencies> |
| 82 | |||
| 83 | <repositories> | ||
| 84 | <!--other repositories if any--> | ||
| 85 | <repository> | ||
| 86 | <id>project.local</id> | ||
| 87 | <name>project</name> | ||
| 88 | <url>file:/root/git/hardwareconfig/DevTools/repo</url> | ||
| 89 | </repository> | ||
| 90 | </repositories> | ||
| 91 | |||
| 92 | |||
| 51 | </project> | 93 | </project> | ... | ... |
| ... | @@ -5,14 +5,14 @@ import java.util.Vector; | ... | @@ -5,14 +5,14 @@ import java.util.Vector; |
| 5 | 5 | ||
| 6 | import org.emercit.remoteservers.model.RemoteServerBean; | 6 | import org.emercit.remoteservers.model.RemoteServerBean; |
| 7 | 7 | ||
| 8 | public interface IRemoteServerDB { | 8 | public interface IRemSrv { |
| 9 | 9 | ||
| 10 | 10 | ||
| 11 | public Vector<RemoteServerBean> SelectServers(); | 11 | public Vector<RemoteServerBean> get(); |
| 12 | 12 | ||
| 13 | public boolean Update(Vector<RemoteServerBean> beans); | 13 | public boolean set(Vector<RemoteServerBean> beans); |
| 14 | 14 | ||
| 15 | public boolean CreateDB(); | 15 | public void init(); |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | } | 18 | } | ... | ... |
| 1 | package org.emercit.remoteserver.service; | ||
| 2 | |||
| 3 | import java.util.Vector; | ||
| 4 | import java.beans.XMLEncoder; | ||
| 5 | import java.beans.XMLDecoder; | ||
| 6 | import java.io.BufferedOutputStream; | ||
| 7 | import java.io.BufferedInputStream; | ||
| 8 | import java.io.FileOutputStream; | ||
| 9 | import java.io.FileInputStream; | ||
| 10 | |||
| 11 | import org.apache.log4j.Logger; | ||
| 12 | import org.emercit.remoteserver.service.IRemSrv; | ||
| 13 | import org.emercit.remoteservers.model.RemoteServerBean; | ||
| 14 | |||
| 15 | import org.emercit.xmldbmanager.service.Db; | ||
| 16 | |||
| 17 | import org.emercit.projecttools.constants.Paths; | ||
| 18 | |||
| 19 | public class RemSrv implements IRemSrv { | ||
| 20 | |||
| 21 | private static final Logger log = Logger.getLogger(RemSrv.class); | ||
| 22 | |||
| 23 | private Db db=new Db(Paths.BEAN_REMOTESERVER); | ||
| 24 | |||
| 25 | public boolean set(Vector<RemoteServerBean> beans) { | ||
| 26 | |||
| 27 | return db.create(beans); | ||
| 28 | } | ||
| 29 | |||
| 30 | public Vector<RemoteServerBean> get() { | ||
| 31 | |||
| 32 | return (Vector<RemoteServerBean>)db.select(); | ||
| 33 | |||
| 34 | } | ||
| 35 | |||
| 36 | |||
| 37 | |||
| 38 | public void init() { | ||
| 39 | |||
| 40 | Vector<RemoteServerBean> beans=new Vector<RemoteServerBean>(); | ||
| 41 | |||
| 42 | RemoteServerBean rsb=new RemoteServerBean(); | ||
| 43 | |||
| 44 | rsb.setId(1); | ||
| 45 | rsb.setIp("127.0.0.1"); | ||
| 46 | rsb.setPort(80); | ||
| 47 | rsb.setName(""); | ||
| 48 | rsb.setType("szs"); | ||
| 49 | rsb.setTitle(""); | ||
| 50 | |||
| 51 | beans.add(rsb); | ||
| 52 | |||
| 53 | set(beans); | ||
| 54 | |||
| 55 | |||
| 56 | } | ||
| 57 | |||
| 58 | } | ||
| 59 | |||
| 60 | |||
| 61 | |||
| 62 | |||
| 63 | |||
| 64 | |||
| 65 | |||
| 66 | |||
| 67 |
| 1 | package org.emercit.remoteserver.service; | ||
| 2 | |||
| 3 | import java.util.Vector; | ||
| 4 | import java.beans.XMLEncoder; | ||
| 5 | import java.beans.XMLDecoder; | ||
| 6 | import java.io.BufferedOutputStream; | ||
| 7 | import java.io.BufferedInputStream; | ||
| 8 | import java.io.FileOutputStream; | ||
| 9 | import java.io.FileInputStream; | ||
| 10 | |||
| 11 | import org.apache.log4j.Logger; | ||
| 12 | import org.emercit.remoteserver.service.IRemoteServerDB; | ||
| 13 | import org.emercit.remoteservers.model.RemoteServerBean; | ||
| 14 | |||
| 15 | public class RemoteServerDB implements IRemoteServerDB { | ||
| 16 | |||
| 17 | private static final Logger log = Logger.getLogger(RemoteServerDB.class); | ||
| 18 | |||
| 19 | public boolean Update(Vector<RemoteServerBean> beans) { | ||
| 20 | |||
| 21 | boolean result=true; | ||
| 22 | try { | ||
| 23 | FileOutputStream fos = new FileOutputStream("/opt/devtools/beans/RemoteServerBeans.xml"); | ||
| 24 | BufferedOutputStream bos = new BufferedOutputStream(fos); | ||
| 25 | XMLEncoder xmlEncoder = new XMLEncoder(bos); | ||
| 26 | xmlEncoder.writeObject(beans); | ||
| 27 | xmlEncoder.close(); | ||
| 28 | }catch(Exception e) { | ||
| 29 | log.error(e.getMessage()); | ||
| 30 | result=false; | ||
| 31 | } | ||
| 32 | return result; | ||
| 33 | } | ||
| 34 | |||
| 35 | public Vector<RemoteServerBean> SelectServers() { | ||
| 36 | |||
| 37 | Vector<RemoteServerBean> result=new Vector<RemoteServerBean>(); | ||
| 38 | |||
| 39 | try { | ||
| 40 | XMLDecoder d = new XMLDecoder( | ||
| 41 | |||
| 42 | new BufferedInputStream( | ||
| 43 | new FileInputStream("/opt/devtools/beans/RemoteServerBeans.xml"))); | ||
| 44 | result=(Vector<RemoteServerBean>)d.readObject(); | ||
| 45 | d.close(); | ||
| 46 | }catch(Exception e) { | ||
| 47 | log.error(e.getMessage()); | ||
| 48 | result=null; | ||
| 49 | } | ||
| 50 | return result; | ||
| 51 | } | ||
| 52 | |||
| 53 | |||
| 54 | |||
| 55 | public boolean CreateDB() { | ||
| 56 | |||
| 57 | |||
| 58 | |||
| 59 | boolean result=true; | ||
| 60 | try { | ||
| 61 | |||
| 62 | Vector<RemoteServerBean> beans=new Vector<RemoteServerBean>(); | ||
| 63 | |||
| 64 | RemoteServerBean rsb=new RemoteServerBean(); | ||
| 65 | |||
| 66 | rsb.setId(1); | ||
| 67 | rsb.setIp("127.0.0.1"); | ||
| 68 | rsb.setPort(80); | ||
| 69 | rsb.setName(""); | ||
| 70 | rsb.setType("szs"); | ||
| 71 | rsb.setTitle(""); | ||
| 72 | |||
| 73 | beans.add(rsb); | ||
| 74 | |||
| 75 | |||
| 76 | FileOutputStream fos = new FileOutputStream("/opt/devtools/beans/RemoteServerBeans.xml"); | ||
| 77 | BufferedOutputStream bos = new BufferedOutputStream(fos); | ||
| 78 | XMLEncoder xmlEncoder = new XMLEncoder(bos); | ||
| 79 | xmlEncoder.writeObject(beans); | ||
| 80 | xmlEncoder.close(); | ||
| 81 | }catch(Exception e) { | ||
| 82 | log.error(e.getMessage()); | ||
| 83 | result=false; | ||
| 84 | } | ||
| 85 | return result; | ||
| 86 | } | ||
| 87 | |||
| 88 | |||
| 89 | |||
| 90 | } | ||
| 91 | |||
| 92 | |||
| 93 | |||
| 94 | |||
| 95 | |||
| 96 | |||
| 97 | |||
| 98 | |||
| 99 |
| 1 | package org.emercit.remoteservers; | 1 | package org.emercit.remoteservers; |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | import org.emercit.remoteserver.service.RemoteServerDB; | 4 | import org.emercit.remoteserver.service.RemSrv; |
| 5 | 5 | ||
| 6 | public class App | 6 | public class App |
| 7 | { | 7 | { |
| 8 | public static void main( String[] args ) | 8 | public static void main( String[] args ) |
| 9 | { | 9 | { |
| 10 | 10 | ||
| 11 | RemoteServerDB sv=new RemoteServerDB(); | 11 | RemSrv sv=new RemSrv(); |
| 12 | sv.CreateDB(); | 12 | sv.init(); |
| 13 | } | 13 | } |
| 14 | } | 14 | } | ... | ... |
ServiceManager/.classpath
0 → 100644
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <classpath> | ||
| 3 | <classpathentry kind="src" output="target/classes" path="src/main/java"> | ||
| 4 | <attributes> | ||
| 5 | <attribute name="optional" value="true"/> | ||
| 6 | <attribute name="maven.pomderived" value="true"/> | ||
| 7 | </attributes> | ||
| 8 | </classpathentry> | ||
| 9 | <classpathentry kind="src" output="target/test-classes" path="src/test/java"> | ||
| 10 | <attributes> | ||
| 11 | <attribute name="optional" value="true"/> | ||
| 12 | <attribute name="maven.pomderived" value="true"/> | ||
| 13 | </attributes> | ||
| 14 | </classpathentry> | ||
| 15 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"> | ||
| 16 | <attributes> | ||
| 17 | <attribute name="maven.pomderived" value="true"/> | ||
| 18 | </attributes> | ||
| 19 | </classpathentry> | ||
| 20 | <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | ||
| 21 | <attributes> | ||
| 22 | <attribute name="maven.pomderived" value="true"/> | ||
| 23 | </attributes> | ||
| 24 | </classpathentry> | ||
| 25 | <classpathentry kind="output" path="target/classes"/> | ||
| 26 | </classpath> |
ServiceManager/.gitignore
0 → 100644
| 1 | /target |
ServiceManager/.project
0 → 100644
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <projectDescription> | ||
| 3 | <name>ServiceManager</name> | ||
| 4 | <comment></comment> | ||
| 5 | <projects> | ||
| 6 | </projects> | ||
| 7 | <buildSpec> | ||
| 8 | <buildCommand> | ||
| 9 | <name>org.eclipse.jdt.core.javabuilder</name> | ||
| 10 | <arguments> | ||
| 11 | </arguments> | ||
| 12 | </buildCommand> | ||
| 13 | <buildCommand> | ||
| 14 | <name>org.eclipse.m2e.core.maven2Builder</name> | ||
| 15 | <arguments> | ||
| 16 | </arguments> | ||
| 17 | </buildCommand> | ||
| 18 | </buildSpec> | ||
| 19 | <natures> | ||
| 20 | <nature>org.eclipse.jdt.core.javanature</nature> | ||
| 21 | <nature>org.eclipse.m2e.core.maven2Nature</nature> | ||
| 22 | </natures> | ||
| 23 | </projectDescription> |
ServiceManager/pom.xml
0 → 100644
| 1 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| 2 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| 3 | <modelVersion>4.0.0</modelVersion> | ||
| 4 | |||
| 5 | <groupId>org.emercit</groupId> | ||
| 6 | <artifactId>ServiceManager</artifactId> | ||
| 7 | <version>0.0.1-SNAPSHOT</version> | ||
| 8 | <packaging>jar</packaging> | ||
| 9 | |||
| 10 | <name>ServiceManager</name> | ||
| 11 | <url>http://maven.apache.org</url> | ||
| 12 | |||
| 13 | <properties> | ||
| 14 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
| 15 | </properties> | ||
| 16 | |||
| 17 | <dependencies> | ||
| 18 | <dependency> | ||
| 19 | <groupId>junit</groupId> | ||
| 20 | <artifactId>junit</artifactId> | ||
| 21 | <version>3.8.1</version> | ||
| 22 | <scope>test</scope> | ||
| 23 | </dependency> | ||
| 24 | </dependencies> | ||
| 25 | </project> |
| 1 | package org.emercit.servicemanager; | ||
| 2 | |||
| 3 | import junit.framework.Test; | ||
| 4 | import junit.framework.TestCase; | ||
| 5 | import junit.framework.TestSuite; | ||
| 6 | |||
| 7 | /** | ||
| 8 | * Unit test for simple App. | ||
| 9 | */ | ||
| 10 | public class AppTest | ||
| 11 | extends TestCase | ||
| 12 | { | ||
| 13 | /** | ||
| 14 | * Create the test case | ||
| 15 | * | ||
| 16 | * @param testName name of the test case | ||
| 17 | */ | ||
| 18 | public AppTest( String testName ) | ||
| 19 | { | ||
| 20 | super( testName ); | ||
| 21 | } | ||
| 22 | |||
| 23 | /** | ||
| 24 | * @return the suite of tests being tested | ||
| 25 | */ | ||
| 26 | public static Test suite() | ||
| 27 | { | ||
| 28 | return new TestSuite( AppTest.class ); | ||
| 29 | } | ||
| 30 | |||
| 31 | /** | ||
| 32 | * Rigourous Test :-) | ||
| 33 | */ | ||
| 34 | public void testApp() | ||
| 35 | { | ||
| 36 | assertTrue( true ); | ||
| 37 | } | ||
| 38 | } |
-
Please register or sign in to post a comment