]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc.example/src/main/java/org/argeo/slc/example/ExampleDeployedSystem.java
Introduce SLC example
[gpl/argeo-slc.git] / org.argeo.slc.example / src / main / java / org / argeo / slc / example / ExampleDeployedSystem.java
diff --git a/org.argeo.slc.example/src/main/java/org/argeo/slc/example/ExampleDeployedSystem.java b/org.argeo.slc.example/src/main/java/org/argeo/slc/example/ExampleDeployedSystem.java
new file mode 100644 (file)
index 0000000..24ba414
--- /dev/null
@@ -0,0 +1,33 @@
+package org.argeo.slc.example;\r
+\r
+import org.argeo.slc.core.deploy.DeployedSystem;\r
+import org.argeo.slc.core.deploy.DeployedSystemId;\r
+import org.argeo.slc.example.appli.ExampleAppli;\r
+\r
+/** Example deployed sytem. */\r
+public class ExampleDeployedSystem implements DeployedSystem {\r
+       private DeployedSystemId deployedSystemId;\r
+       private int skipFreq = 2;\r
+\r
+       public DeployedSystemId getDeployedSystemId() {\r
+               return deployedSystemId;\r
+       }\r
+\r
+       /** Sets deployed system id. */\r
+       public void setDeployedSystemId(DeployedSystemId deployedSystemId) {\r
+               this.deployedSystemId = deployedSystemId;\r
+       }\r
+\r
+       /** Creates an instance of the example appli. */\r
+       public ExampleAppli getExampleAppliInstance() {\r
+               ExampleAppli appli = new ExampleAppli();\r
+               appli.setSkipFreq(skipFreq);\r
+               return appli;\r
+       }\r
+\r
+       /** Sets the frequency used to skip lines. */\r
+       public void setSkipFreq(int skipFreq) {\r
+               this.skipFreq = skipFreq;\r
+       }\r
+\r
+}\r