save
Showing
33 changed files
with
312 additions
and
11 deletions
No preview for this file type
| 1 | 3a7c36b54c3b47d30241a72b0c0bb2e0 | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | 3ce1dbb50c1859a996ad64af891ae9d1fb39d67e | ||
| ... | \ 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>projecttools</artifactId> | ||
| 7 | <version>1.5</version> | ||
| 8 | </project> |
| 1 | 54d40448e9dd031e0f85ac5089bd7378 | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | 0ed3336ff2e554a5b56cb10199abaa15ca7904c7 | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -3,10 +3,11 @@ | ... | @@ -3,10 +3,11 @@ |
| 3 | <groupId>org.emercit</groupId> | 3 | <groupId>org.emercit</groupId> |
| 4 | <artifactId>projecttools</artifactId> | 4 | <artifactId>projecttools</artifactId> |
| 5 | <versioning> | 5 | <versioning> |
| 6 | <release>1.0</release> | 6 | <release>1.5</release> |
| 7 | <versions> | 7 | <versions> |
| 8 | <version>1.0</version> | 8 | <version>1.0</version> |
| 9 | <version>1.5</version> | ||
| 9 | </versions> | 10 | </versions> |
| 10 | <lastUpdated>20150727174710</lastUpdated> | 11 | <lastUpdated>20150727175307</lastUpdated> |
| 11 | </versioning> | 12 | </versioning> |
| 12 | </metadata> | 13 | </metadata> | ... | ... |
No preview for this file type
| 1 | 27d71720f5e8b6a7c18f8aec6cc0b7f0 | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | 7a44dae6995fedbafc586ff3552cb62faf989201 | ||
| ... | \ 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>xmldbmanager</artifactId> | ||
| 7 | <version>1.5</version> | ||
| 8 | </project> |
| 1 | 1b8cbe07fbb2f057541b41b2e4fc9d7a | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | ed352e58e6901ec42e9233fb21e10878b971d757 | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | 9d9bd8eeebf7c32026cb5f377d34e6bd | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | 019beb72ec1a4032ad5599472f00603603b9651b | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
GSMManager/.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.m2e.MAVEN2_CLASSPATH_CONTAINER"> | ||
| 16 | <attributes> | ||
| 17 | <attribute name="maven.pomderived" value="true"/> | ||
| 18 | </attributes> | ||
| 19 | </classpathentry> | ||
| 20 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"> | ||
| 21 | <attributes> | ||
| 22 | <attribute name="maven.pomderived" value="true"/> | ||
| 23 | </attributes> | ||
| 24 | </classpathentry> | ||
| 25 | <classpathentry kind="output" path="target/classes"/> | ||
| 26 | </classpath> |
GSMManager/.gitignore
0 → 100644
| 1 | /target |
GSMManager/.project
0 → 100644
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <projectDescription> | ||
| 3 | <name>GSMManager</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> |
GSMManager/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>GsmModemManager</artifactId> | ||
| 7 | <version>0.0.1-SNAPSHOT</version> | ||
| 8 | <packaging>jar</packaging> | ||
| 9 | |||
| 10 | <name>GsmModemManager</name> | ||
| 11 | <url>http://maven.apache.org</url> | ||
| 12 | <properties> | ||
| 13 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
| 14 | </properties> | ||
| 15 | |||
| 16 | |||
| 17 | <build> | ||
| 18 | <plugins> | ||
| 19 | <plugin> | ||
| 20 | <groupId>org.apache.maven.plugins</groupId> | ||
| 21 | <artifactId>maven-compiler-plugin</artifactId> | ||
| 22 | <configuration> | ||
| 23 | <source>1.7</source> | ||
| 24 | <target>1.7</target> | ||
| 25 | <showDeprecation>true</showDeprecation> | ||
| 26 | <showWarnings>true</showWarnings> | ||
| 27 | <executable>${env.JAVA_HOME_7}/bin/javac</executable> | ||
| 28 | <fork>true</fork> | ||
| 29 | </configuration> | ||
| 30 | </plugin> | ||
| 31 | </plugins> | ||
| 32 | |||
| 33 | </build> | ||
| 34 | |||
| 35 | <dependencies> | ||
| 36 | <dependency> | ||
| 37 | <groupId>junit</groupId> | ||
| 38 | <artifactId>junit</artifactId> | ||
| 39 | <version>3.8.1</version> | ||
| 40 | <scope>test</scope> | ||
| 41 | </dependency> | ||
| 42 | |||
| 43 | <dependency> | ||
| 44 | <groupId>org.emercit</groupId> | ||
| 45 | <artifactId>xmldbmanager</artifactId> | ||
| 46 | <version>1.5</version> | ||
| 47 | </dependency> | ||
| 48 | |||
| 49 | <dependency> | ||
| 50 | <groupId>org.emercit</groupId> | ||
| 51 | <artifactId>projecttools</artifactId> | ||
| 52 | <version>1.5</version> | ||
| 53 | </dependency> | ||
| 54 | |||
| 55 | </dependencies> | ||
| 56 | |||
| 57 | |||
| 58 | |||
| 59 | <repositories> | ||
| 60 | <!--other repositories if any--> | ||
| 61 | <repository> | ||
| 62 | <id>project.local</id> | ||
| 63 | <name>project</name> | ||
| 64 | <url>file:/root/git/hardwareconfig/DevTools/repo</url> | ||
| 65 | </repository> | ||
| 66 | </repositories> | ||
| 67 | |||
| 68 | |||
| 69 | |||
| 70 | |||
| 71 | </project> |
| 1 | package org.emercit.gsmmanager.model; | ||
| 2 | |||
| 3 | import java.io.Serializable; | ||
| 4 | import java.util.Vector; | ||
| 5 | |||
| 6 | public class GSMBean implements Serializable { | ||
| 7 | |||
| 8 | private static final long serialVersionUID = 1L; | ||
| 9 | |||
| 10 | private String operator; | ||
| 11 | |||
| 12 | |||
| 13 | public GSMBean() { | ||
| 14 | |||
| 15 | } | ||
| 16 | |||
| 17 | |||
| 18 | public void setOperator(String value) { | ||
| 19 | this.operator=value; | ||
| 20 | } | ||
| 21 | |||
| 22 | public String getOperator() { | ||
| 23 | |||
| 24 | return operator; | ||
| 25 | } | ||
| 26 | |||
| 27 | } | ||
| 28 |
| 1 | package org.emercit.gsmmanager.service; | ||
| 2 | |||
| 3 | import org.emercit.gsmmanager.model.GSMBean; | ||
| 4 | import org.emercit.xmldbmanager.service.Db; | ||
| 5 | |||
| 6 | import org.emercit.projecttools.constants.Paths; | ||
| 7 | |||
| 8 | public class Gsm implements IGsm { | ||
| 9 | |||
| 10 | private Db db=new Db(Paths.BEAN_GSM); | ||
| 11 | |||
| 12 | private GSMBean m; | ||
| 13 | |||
| 14 | public GSMBean get() { | ||
| 15 | return (GSMBean)db.select(); | ||
| 16 | } | ||
| 17 | |||
| 18 | public boolean set(GSMBean m) { | ||
| 19 | return db.create(m); | ||
| 20 | } | ||
| 21 | |||
| 22 | /* | ||
| 23 | * Создание нового файла с параметрами - defaults | ||
| 24 | * @see org.emercit.gsmmanager.service.IGsm#init() | ||
| 25 | */ | ||
| 26 | public void init() { | ||
| 27 | |||
| 28 | m=new GSMBean(); | ||
| 29 | m.setOperator("megafon"); | ||
| 30 | db.create(m); | ||
| 31 | } | ||
| 32 | |||
| 33 | |||
| 34 | } |
| 1 | package org.emercit.GsmModemManager; | ||
| 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 | } |
| ... | @@ -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.m2e.MAVEN2_CLASSPATH_CONTAINER"> | 15 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"> |
| 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.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"> | 20 | <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> |
| 21 | <attributes> | 21 | <attributes> |
| 22 | <attribute name="maven.pomderived" value="true"/> | 22 | <attribute name="maven.pomderived" value="true"/> |
| 23 | </attributes> | 23 | </attributes> | ... | ... |
| ... | @@ -48,7 +48,7 @@ | ... | @@ -48,7 +48,7 @@ |
| 48 | <dependency> | 48 | <dependency> |
| 49 | <groupId>org.emercit</groupId> | 49 | <groupId>org.emercit</groupId> |
| 50 | <artifactId>projecttools</artifactId> | 50 | <artifactId>projecttools</artifactId> |
| 51 | <version>1.0</version> | 51 | <version>1.5</version> |
| 52 | </dependency> | 52 | </dependency> |
| 53 | 53 | ||
| 54 | </dependencies> | 54 | </dependencies> | ... | ... |
| ... | @@ -10,11 +10,9 @@ import java.io.FileOutputStream; | ... | @@ -10,11 +10,9 @@ import java.io.FileOutputStream; |
| 10 | import org.emercit.projecttools.constants.Paths; | 10 | import org.emercit.projecttools.constants.Paths; |
| 11 | 11 | ||
| 12 | public class Db implements IDb { | 12 | public class Db implements IDb { |
| 13 | 13 | ||
| 14 | |||
| 15 | private String pathfile=null; | 14 | private String pathfile=null; |
| 16 | 15 | ||
| 17 | |||
| 18 | public Db(String path) { | 16 | public Db(String path) { |
| 19 | this.pathfile=path; | 17 | this.pathfile=path; |
| 20 | } | 18 | } |
| ... | @@ -24,7 +22,7 @@ public class Db implements IDb { | ... | @@ -24,7 +22,7 @@ public class Db implements IDb { |
| 24 | * @see org.emercit.xmldbmanager.service.IDb#create(java.lang.Object) | 22 | * @see org.emercit.xmldbmanager.service.IDb#create(java.lang.Object) |
| 25 | */ | 23 | */ |
| 26 | public boolean create(Object o) { | 24 | public boolean create(Object o) { |
| 27 | 25 | ||
| 28 | boolean result=true; | 26 | boolean result=true; |
| 29 | try { | 27 | try { |
| 30 | FileOutputStream fos = new FileOutputStream(pathfile); | 28 | FileOutputStream fos = new FileOutputStream(pathfile); | ... | ... |
-
Please register or sign in to post a comment