From 695373bb62f87ad8de51d72ed8c78c4acc8af3e0 Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Thu, 23 Oct 2014 13:30:31 +0200 Subject: A bit of visual documentation --- doc/diagrams/.gitignore | 1 + doc/diagrams/config.plant | 97 ++++++++++++++++++++++++++++++++++++++++++ doc/diagrams/config.svg | 1 + doc/diagrams/inheritance.plant | 28 ++++++++++++ doc/diagrams/inheritance.svg | 1 + doc/diagrams/main.plant | 48 +++++++++++++++++++++ doc/diagrams/main.svg | 1 + 7 files changed, 177 insertions(+) create mode 100644 doc/diagrams/.gitignore create mode 100644 doc/diagrams/config.plant create mode 100644 doc/diagrams/config.svg create mode 100644 doc/diagrams/inheritance.plant create mode 100644 doc/diagrams/inheritance.svg create mode 100644 doc/diagrams/main.plant create mode 100644 doc/diagrams/main.svg (limited to 'doc/diagrams') diff --git a/doc/diagrams/.gitignore b/doc/diagrams/.gitignore new file mode 100644 index 0000000..f622f85 --- /dev/null +++ b/doc/diagrams/.gitignore @@ -0,0 +1 @@ +/plantuml-dependency.log diff --git a/doc/diagrams/config.plant b/doc/diagrams/config.plant new file mode 100644 index 0000000..24bd135 --- /dev/null +++ b/doc/diagrams/config.plant @@ -0,0 +1,97 @@ +@startuml + +enum DBMSType { +ORACLE +MYSQL +} + +enum ConnectionType { +JDBC +LDAP +} + +class ConfigConnectionBean { +-String id +-String ress +-String host +-int port +-String user +-String bind +-String pass +-String db +} + +class ConfigGlobalsBean { +-int maxExecTime +} + +class ConfigTaskBean { +-String name +-boolean skipReadErrors +-boolean skipEntryDelete +} + +class ConfigOpLimitsBean { + -int insert + -int update + -int delete +} + +enum SourceKind { +FIXED_CSV +FIXED_CSV_SORTED +LDAP +SQL +} + +enum DestKind { +LDAP +} + + +enum MVDataCombineMode { +PRIMARY_SOURCE +MERGE_APPEND +MERGE_REPLACE +OVERRIDE +} + +class ConfigSourceBean { +-String name +-String conn +-String query +-String path +-String attr +-String base +-int lookahead +} + +class ConfigDestBean { +-String name +-String conn +-String attr +-String base +-int lookahead +} + +SSSync *-- "confMain (1)" ConfigRootBean +SSSync *-- "confConn (1)" ConfigConnectionsBean + +ConfigRootBean *-- "globals (1)" ConfigGlobalsBean +ConfigRootBean *-- "tasks (*)" ConfigTaskBean + +ConfigConnectionsBean *-- "connections (1)" ConfigConnectionBean + +ConfigConnectionBean *-- "dbms (1)" DBMSType +ConfigConnectionBean *-- "type (1)" ConnectionType + +ConfigTaskBean *-- "opLimits (1)" ConfigOpLimitsBean +ConfigTaskBean *-- "sources (*)" ConfigSourceBean +ConfigTaskBean *-- "destination (1)" ConfigDestBean + +ConfigSourceBean *-- "kind (1)" SourceKind +ConfigSourceBean *-- "mode (1)" MVDataCombineMode + +ConfigDestBean *-- "kind (1)" DestKind + +@enduml diff --git a/doc/diagrams/config.svg b/doc/diagrams/config.svg new file mode 100644 index 0000000..7554a89 --- /dev/null +++ b/doc/diagrams/config.svg @@ -0,0 +1 @@ +DBMSTypeoraclemysql/*derby*/ConnectionTypejdbcldapConfigConnectionBeanString idString ressString hostint portString userString bindString passString dbConfigGlobalsBeanint maxExecTimeConfigTaskBeanString nameboolean skipReadErrorsboolean skipEntryDeleteConfigOpLimitsBeanint insertint updateint deleteSourceKindcsvldapsorted_csvsqlMVDataCombineModePRIMARY_SOURCEMERGE_APPENDMERGE_REPLACEOVERRIDEConfigSrcOrDestBeanString nameString connString queryString pathString attrString baseSSSyncConfigRootBeanConfigConnectionsBeanconfMain (1)confConn (1)globals (1)tasks (*)connections (1)dbms (1)type (1)opLimits (1)sources (*)destination (1)kind (1)mode (1) \ No newline at end of file diff --git a/doc/diagrams/inheritance.plant b/doc/diagrams/inheritance.plant new file mode 100644 index 0000000..5b763e6 --- /dev/null +++ b/doc/diagrams/inheritance.plant @@ -0,0 +1,28 @@ +@startuml +abstract class data.io.AbstractMVDataReader +abstract class sync.AbstractSyncTask +interface data.io.MVDataReader +interface data.io.MVDataWriter +interface java.io.Closeable +interface java.lang.Comparable +interface java.lang.Iterable +interface java.util.Iterator +interface java.util.concurrent.Callable +data.io.AbstractMVDataReader --|> data.io.MVDataReader +sync.AbstractSyncTask --|> java.util.concurrent.Callable +data.MVDataEntry --|> java.lang.Comparable +data.filters.MVDataCombiner --|> data.io.AbstractMVDataReader +data.io.ConnectionsHolder --|> java.io.Closeable +data.io.SafeDataReader --|> data.io.AbstractMVDataReader +data.io.csv.CSVDataReader --|> data.io.AbstractMVDataReader +data.io.ldap.LDAPConnectionWrapper --|> java.io.Closeable +data.io.ldap.LDAPFlatDataReader --|> data.io.AbstractMVDataReader +data.io.ldap.LDAPFlatDataWriter --|> data.io.MVDataWriter +data.io.sql.SQLConnectionWrapper --|> java.io.Closeable +data.io.sql.SQLRelDataReader --|> data.io.AbstractMVDataReader +data.io.stub.StubDataReader --|> data.io.AbstractMVDataReader +data.io.stub.StubDataWriter --|> data.io.MVDataWriter +sync.BasicSyncTask --|> sync.AbstractSyncTask +data.io.MVDataReader --|> java.lang.Iterable +data.io.MVDataReader --|> java.util.Iterator +@enduml diff --git a/doc/diagrams/inheritance.svg b/doc/diagrams/inheritance.svg new file mode 100644 index 0000000..4004ae8 --- /dev/null +++ b/doc/diagrams/inheritance.svg @@ -0,0 +1 @@ +data.iosyncjava.iojava.langjava.utiljava.util.concurrentdatadata.filtersdata.io.csvdata.io.ldapdata.io.sqldata.io.stubAbstractMVDataReaderMVDataReaderMVDataWriterConnectionsHolderSafeDataReaderAbstractSyncTaskBasicSyncTaskCloseableComparableIterableIteratorCallableMVDataEntryMVDataCombinerCSVDataReaderLDAPConnectionWrapperLDAPFlatDataReaderLDAPFlatDataWriterSQLConnectionWrapperSQLRelDataReaderStubDataReaderStubDataWriter \ No newline at end of file diff --git a/doc/diagrams/main.plant b/doc/diagrams/main.plant new file mode 100644 index 0000000..4429300 --- /dev/null +++ b/doc/diagrams/main.plant @@ -0,0 +1,48 @@ +@startuml +class SSSync { ++void main(String[] args) +} + +class SSSyncConfParser { ++loadMainConfig(String mainConfigFile) ++loadConnConfig(String connConfigFile) +} + +class SSSyncConnectionsFactory { ++setupConnections(ConfigConnectionsBean confConn) +} + +class SSSyncTasksFactory { ++setupTasks(ConnectionsHolder connections, ConfigRootBean confMain) +} + +abstract class AbstractSyncTask { + #String taskName + #boolean dryRun + +Boolean call() +} + +interface "Callable" as Callable_Boolean_ { +} +Callable_Boolean_ <|.. AbstractSyncTask + +class ExecutorService { ++invokeAll(Callable tasks...) +} + +SSSync *-- "1" ConfigRootBean +SSSync *-- "1" ConfigConnectionsBean +SSSync *-- "1" ConnectionsHolder +SSSync *-- "*" AbstractSyncTask + +SSSync "(1)" -up-> SSSyncConfParser +SSSync "(2)" -up-> SSSyncConnectionsFactory +SSSync "(3)" -up-> SSSyncTasksFactory +SSSync "(4)" -> ExecutorService + +ConfigRootBean *-- "1" ConfigGlobalsBean +ConfigRootBean *-- "*" ConfigTaskBean + +ConnectionsHolder *-- "*" LDAPConnectionWrapper +ConnectionsHolder *-- "*" SQLConnectionWrapper +@enduml diff --git a/doc/diagrams/main.svg b/doc/diagrams/main.svg new file mode 100644 index 0000000..a1f032b --- /dev/null +++ b/doc/diagrams/main.svg @@ -0,0 +1 @@ +SSSyncvoid main(String[] args)SSSyncConfParserloadMainConfig(String mainConfigFile)loadConnConfig(String connConfigFile)SSSyncConnectionsFactorysetupConnections(ConfigConnectionsBean confConn)SSSyncTasksFactorysetupTasks(ConnectionsHolder connections, ConfigRootBean confMain)AbstractSyncTaskString taskNameboolean dryRunBoolean call()Callable<Boolean>ExecutorServiceinvokeAll(Callable tasks...)ConfigRootBeanConfigConnectionsBeanConnectionsHolderConfigGlobalsBeanConfigTaskBeanLDAPConnectionWrapperSQLConnectionWrapper111*(1)(2)(3)(4)1*** \ No newline at end of file -- cgit v1.2.3