diff --git a/stroom-core-shared/src/main/java/stroom/analytics/shared/AnalyticRuleDoc.java b/stroom-core-shared/src/main/java/stroom/analytics/shared/AnalyticRuleDoc.java index dbb269d0ae..da69fac960 100644 --- a/stroom-core-shared/src/main/java/stroom/analytics/shared/AnalyticRuleDoc.java +++ b/stroom-core-shared/src/main/java/stroom/analytics/shared/AnalyticRuleDoc.java @@ -20,10 +20,9 @@ import stroom.docs.shared.Description; import stroom.docstore.shared.Doc; import stroom.docstore.shared.DocumentType; -import stroom.docstore.shared.DocumentTypeGroup; +import stroom.docstore.shared.DocumentTypeRegistry; import stroom.query.api.v2.Param; import stroom.query.api.v2.TimeRange; -import stroom.svg.shared.SvgImage; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; @@ -48,11 +47,7 @@ public class AnalyticRuleDoc extends Doc { public static final String TYPE = "AnalyticRule"; - public static final DocumentType DOCUMENT_TYPE = new DocumentType( - DocumentTypeGroup.SEARCH, - TYPE, - "Analytic Rule", - SvgImage.DOCUMENT_ANALYTIC_RULE); + public static final DocumentType DOCUMENT_TYPE = DocumentTypeRegistry.ANALYTIC_RULE_DOCUMENT_TYPE; @JsonProperty private final String description; diff --git a/stroom-core-shared/src/main/java/stroom/aws/s3/shared/S3ConfigDoc.java b/stroom-core-shared/src/main/java/stroom/aws/s3/shared/S3ConfigDoc.java index 24977f6c25..8d00a82b1c 100644 --- a/stroom-core-shared/src/main/java/stroom/aws/s3/shared/S3ConfigDoc.java +++ b/stroom-core-shared/src/main/java/stroom/aws/s3/shared/S3ConfigDoc.java @@ -20,8 +20,7 @@ import stroom.docs.shared.Description; import stroom.docstore.shared.Doc; import stroom.docstore.shared.DocumentType; -import stroom.docstore.shared.DocumentTypeGroup; -import stroom.svg.shared.SvgImage; +import stroom.docstore.shared.DocumentTypeRegistry; import stroom.util.shared.HasData; import com.fasterxml.jackson.annotation.JsonCreator; @@ -50,11 +49,7 @@ public class S3ConfigDoc extends Doc implements HasData { public static final String TYPE = "S3Config"; - public static final DocumentType DOCUMENT_TYPE = new DocumentType( - DocumentTypeGroup.CONFIGURATION, - TYPE, - "S3 Configuration", - SvgImage.DOCUMENT_S3); + public static final DocumentType DOCUMENT_TYPE = DocumentTypeRegistry.S3_CONFIG_DOCUMENT_TYPE; @JsonProperty private String description = ""; diff --git a/stroom-core-shared/src/main/java/stroom/dashboard/shared/DashboardDoc.java b/stroom-core-shared/src/main/java/stroom/dashboard/shared/DashboardDoc.java index 0f35d87b5e..7b3cc93a75 100644 --- a/stroom-core-shared/src/main/java/stroom/dashboard/shared/DashboardDoc.java +++ b/stroom-core-shared/src/main/java/stroom/dashboard/shared/DashboardDoc.java @@ -20,8 +20,7 @@ import stroom.docs.shared.Description; import stroom.docstore.shared.Doc; import stroom.docstore.shared.DocumentType; -import stroom.docstore.shared.DocumentTypeGroup; -import stroom.svg.shared.SvgImage; +import stroom.docstore.shared.DocumentTypeRegistry; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; @@ -60,11 +59,7 @@ public class DashboardDoc extends Doc { public static final String TYPE = "Dashboard"; - public static final DocumentType DOCUMENT_TYPE = new DocumentType( - DocumentTypeGroup.SEARCH, - TYPE, - TYPE, - SvgImage.DOCUMENT_DASHBOARD); + public static final DocumentType DOCUMENT_TYPE = DocumentTypeRegistry.DASHBOARD_DOCUMENT_TYPE; @JsonProperty private String description; diff --git a/stroom-core-shared/src/main/java/stroom/dictionary/shared/DictionaryDoc.java b/stroom-core-shared/src/main/java/stroom/dictionary/shared/DictionaryDoc.java index ff7b041e20..4297ca0733 100644 --- a/stroom-core-shared/src/main/java/stroom/dictionary/shared/DictionaryDoc.java +++ b/stroom-core-shared/src/main/java/stroom/dictionary/shared/DictionaryDoc.java @@ -20,8 +20,7 @@ import stroom.docs.shared.Description; import stroom.docstore.shared.Doc; import stroom.docstore.shared.DocumentType; -import stroom.docstore.shared.DocumentTypeGroup; -import stroom.svg.shared.SvgImage; +import stroom.docstore.shared.DocumentTypeRegistry; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; @@ -54,11 +53,7 @@ public class DictionaryDoc extends Doc { public static final String TYPE = "Dictionary"; - public static final DocumentType DOCUMENT_TYPE = new DocumentType( - DocumentTypeGroup.CONFIGURATION, - TYPE, - TYPE, - SvgImage.DOCUMENT_DICTIONARY); + public static final DocumentType DOCUMENT_TYPE = DocumentTypeRegistry.DICTIONARY_DOCUMENT_TYPE; @JsonProperty private String description; diff --git a/stroom-core-shared/src/main/java/stroom/docstore/shared/DocumentTypeRegistry.java b/stroom-core-shared/src/main/java/stroom/docstore/shared/DocumentTypeRegistry.java index eed14ec165..916580aec6 100644 --- a/stroom-core-shared/src/main/java/stroom/docstore/shared/DocumentTypeRegistry.java +++ b/stroom-core-shared/src/main/java/stroom/docstore/shared/DocumentTypeRegistry.java @@ -1,31 +1,7 @@ package stroom.docstore.shared; -import stroom.analytics.shared.AnalyticRuleDoc; -import stroom.aws.s3.shared.S3ConfigDoc; -import stroom.dashboard.shared.DashboardDoc; -import stroom.dictionary.shared.DictionaryDoc; -import stroom.documentation.shared.DocumentationDoc; import stroom.explorer.shared.ExplorerConstants; -import stroom.feed.shared.FeedDoc; -import stroom.index.shared.LuceneIndexDoc; -import stroom.kafka.shared.KafkaConfigDoc; -import stroom.pipeline.shared.PipelineDoc; -import stroom.pipeline.shared.TextConverterDoc; -import stroom.pipeline.shared.XsltDoc; -import stroom.query.shared.QueryDoc; -import stroom.receive.rules.shared.ReceiveDataRules; -import stroom.script.shared.ScriptDoc; -import stroom.search.elastic.shared.ElasticClusterDoc; -import stroom.search.elastic.shared.ElasticIndexDoc; -import stroom.search.solr.shared.SolrIndexDoc; -import stroom.state.shared.ScyllaDbDoc; -import stroom.state.shared.StateDoc; -import stroom.statistics.impl.hbase.shared.StroomStatsStoreDoc; -import stroom.statistics.impl.sql.shared.StatisticStoreDoc; import stroom.svg.shared.SvgImage; -import stroom.view.shared.ViewDoc; -import stroom.visualisation.shared.VisualisationDoc; -import stroom.xmlschema.shared.XmlSchemaDoc; import java.util.Collection; import java.util.HashMap; @@ -60,43 +36,163 @@ public class DocumentTypeRegistry { "ProcessorFilter", "Processor Filter", SvgImage.FILTER); + public static final DocumentType ANALYTIC_RULE_DOCUMENT_TYPE = new DocumentType( + DocumentTypeGroup.SEARCH, + "AnalyticRule", + "Analytic Rule", + SvgImage.DOCUMENT_ANALYTIC_RULE); public static final DocumentType ANALYTICS_STORE_DOCUMENT_TYPE = new DocumentType( DocumentTypeGroup.SEARCH, "Analytics", "Analytics", SvgImage.DOCUMENT_SEARCHABLE); + public static final DocumentType DASHBOARD_DOCUMENT_TYPE = new DocumentType( + DocumentTypeGroup.SEARCH, + "Dashboard", + "Dashboard", + SvgImage.DOCUMENT_DASHBOARD); + public static final DocumentType DICTIONARY_DOCUMENT_TYPE = new DocumentType( + DocumentTypeGroup.CONFIGURATION, + "Dictionary", + "Dictionary", + SvgImage.DOCUMENT_DICTIONARY); + public static final DocumentType LUCENE_DOCUMENT_TYPE = new DocumentType( + DocumentTypeGroup.INDEXING, + "Index", + "Lucene Index", + SvgImage.DOCUMENT_INDEX); + public static final DocumentType STROOM_STATS_STORE_DOCUMENT_TYPE = new DocumentType( + DocumentTypeGroup.INDEXING, + "StroomStatsStore", + "Stroom-Stats Store", + SvgImage.DOCUMENT_STROOM_STATS_STORE); + public static final DocumentType XML_SCHEMA_DOCUMENT_TYPE = new DocumentType( + DocumentTypeGroup.TRANSFORMATION, + "XMLSchema", + "XML Schema", + SvgImage.DOCUMENT_XMLSCHEMA); + public static final DocumentType KAFKA_CONFIG_DOCUMENT_TYPE = new DocumentType( + DocumentTypeGroup.CONFIGURATION, + "KafkaConfig", + "Kafka Configuration", + SvgImage.DOCUMENT_KAFKA_CONFIG); + public static final DocumentType SOLR_INDEX_DOCUMENT_TYPE = new DocumentType( + DocumentTypeGroup.INDEXING, + "SolrIndex", + "Solr Index", + SvgImage.DOCUMENT_SOLR_INDEX); + public static final DocumentType SCYLLA_DB_DOCUMENT_TYPE = new DocumentType( + DocumentTypeGroup.CONFIGURATION, + "ScyllaDB", + "Scylla DB", + SvgImage.DOCUMENT_SCYLLA_DB); + public static final DocumentType DOCUMENTATION_DOCUMENT_TYPE = new DocumentType( + DocumentTypeGroup.CONFIGURATION, + "Documentation", + "Documentation", + SvgImage.DOCUMENT_DOCUMENTATION); + public static final DocumentType ELASTIC_CLUSTER_DOCUMENT_TYPE = new DocumentType( + DocumentTypeGroup.CONFIGURATION, + "ElasticCluster", + "Elastic Cluster", + SvgImage.DOCUMENT_ELASTIC_CLUSTER); + public static final DocumentType ELASTIC_INDEX_DOCUMENT_TYPE = new DocumentType( + DocumentTypeGroup.INDEXING, + "ElasticIndex", + "Elastic Index", + SvgImage.DOCUMENT_ELASTIC_INDEX); + public static final DocumentType STATE_STORE_DOCUMENT_TYPE = new DocumentType( + DocumentTypeGroup.INDEXING, + "StateStore", + "State Store", + SvgImage.DOCUMENT_STATE_STORE); + public static final DocumentType STATISTIC_STORE_DOCUMENT_TYPE = new DocumentType( + DocumentTypeGroup.INDEXING, + "StatisticStore", + "Statistic Store", + SvgImage.DOCUMENT_STATISTIC_STORE); + public static final DocumentType FEED_DOCUMENT_TYPE = new DocumentType( + DocumentTypeGroup.DATA_PROCESSING, + "Feed", + "Feed", + SvgImage.DOCUMENT_FEED); + public static final DocumentType PIPELINE_DOCUMENT_TYPE = new DocumentType( + DocumentTypeGroup.DATA_PROCESSING, + "Pipeline", + "Pipeline", + SvgImage.DOCUMENT_PIPELINE); + public static final DocumentType QUERY_DOCUMENT_TYPE = new DocumentType( + DocumentTypeGroup.SEARCH, + "Query", + "Query", + SvgImage.DOCUMENT_QUERY); + public static final DocumentType RECEIVE_DATA_RULESET_DOCUMENT_TYPE = new DocumentType( + DocumentTypeGroup.CONFIGURATION, + "ReceiveDataRuleSet", + "Rule Set", + SvgImage.DOCUMENT_RECEIVE_DATA_RULE_SET); + public static final DocumentType S3_CONFIG_DOCUMENT_TYPE = new DocumentType( + DocumentTypeGroup.CONFIGURATION, + "S3Config", + "S3 Configuration", + SvgImage.DOCUMENT_S3); + public static final DocumentType SCRIPT_DOCUMENT_TYPE = new DocumentType( + DocumentTypeGroup.CONFIGURATION, + "Script", + "Script", + SvgImage.DOCUMENT_SCRIPT); + public static final DocumentType TEXT_CONVERTER_DOCUMENT_TYPE = new DocumentType( + DocumentTypeGroup.TRANSFORMATION, + "TextConverter", + "Text Converter", + SvgImage.DOCUMENT_TEXT_CONVERTER); + public static final DocumentType VIEW_DOCUMENT_TYPE = new DocumentType( + DocumentTypeGroup.SEARCH, + "View", + "View", + SvgImage.DOCUMENT_VIEW); + public static final DocumentType VISUALISATION_DOCUMENT_TYPE = new DocumentType( + DocumentTypeGroup.CONFIGURATION, + "Visualisation", + "Visualisation", + SvgImage.DOCUMENT_VISUALISATION); + public static final DocumentType XSLT_DOCUMENT_TYPE = new DocumentType( + DocumentTypeGroup.TRANSFORMATION, + "XSLT", + "XSL Translation", + SvgImage.DOCUMENT_XSLT); static { put(ANALYTICS_STORE_DOCUMENT_TYPE); - put(AnalyticRuleDoc.DOCUMENT_TYPE); - put(DashboardDoc.DOCUMENT_TYPE); - put(DictionaryDoc.DOCUMENT_TYPE); - put(DocumentationDoc.DOCUMENT_TYPE); - put(ElasticClusterDoc.DOCUMENT_TYPE); - put(ElasticIndexDoc.DOCUMENT_TYPE); + put(ANALYTIC_RULE_DOCUMENT_TYPE); + put(DASHBOARD_DOCUMENT_TYPE); + put(DICTIONARY_DOCUMENT_TYPE); + put(DOCUMENTATION_DOCUMENT_TYPE); + put(ELASTIC_CLUSTER_DOCUMENT_TYPE); + put(ELASTIC_INDEX_DOCUMENT_TYPE); put(FAVOURITES_DOCUMENT_TYPE); + put(FEED_DOCUMENT_TYPE); put(FOLDER_DOCUMENT_TYPE); - put(FeedDoc.DOCUMENT_TYPE); - put(KafkaConfigDoc.DOCUMENT_TYPE); - put(LuceneIndexDoc.DOCUMENT_TYPE); + put(KAFKA_CONFIG_DOCUMENT_TYPE); + put(LUCENE_DOCUMENT_TYPE); + put(PIPELINE_DOCUMENT_TYPE); put(PROCESSOR_DOCUMENT_TYPE); put(PROCESSOR_FILTER_DOCUMENT_TYPE); - put(PipelineDoc.DOCUMENT_TYPE); - put(QueryDoc.DOCUMENT_TYPE); - put(ReceiveDataRules.DOCUMENT_TYPE); - put(S3ConfigDoc.DOCUMENT_TYPE); + put(QUERY_DOCUMENT_TYPE); + put(RECEIVE_DATA_RULESET_DOCUMENT_TYPE); + put(S3_CONFIG_DOCUMENT_TYPE); + put(SCRIPT_DOCUMENT_TYPE); + put(SCYLLA_DB_DOCUMENT_TYPE); + put(SOLR_INDEX_DOCUMENT_TYPE); + put(STATE_STORE_DOCUMENT_TYPE); + put(STATISTIC_STORE_DOCUMENT_TYPE); + put(STROOM_STATS_STORE_DOCUMENT_TYPE); put(SYSTEM_DOCUMENT_TYPE); - put(ScriptDoc.DOCUMENT_TYPE); - put(ScyllaDbDoc.DOCUMENT_TYPE); - put(SolrIndexDoc.DOCUMENT_TYPE); - put(StateDoc.DOCUMENT_TYPE); - put(StatisticStoreDoc.DOCUMENT_TYPE); - put(StroomStatsStoreDoc.DOCUMENT_TYPE); - put(TextConverterDoc.DOCUMENT_TYPE); - put(ViewDoc.DOCUMENT_TYPE); - put(VisualisationDoc.DOCUMENT_TYPE); - put(XmlSchemaDoc.DOCUMENT_TYPE); - put(XsltDoc.DOCUMENT_TYPE); + put(TEXT_CONVERTER_DOCUMENT_TYPE); + put(VIEW_DOCUMENT_TYPE); + put(VISUALISATION_DOCUMENT_TYPE); + put(XML_SCHEMA_DOCUMENT_TYPE); + put(XSLT_DOCUMENT_TYPE); } private static void put(final DocumentType documentType) { diff --git a/stroom-core-shared/src/main/java/stroom/documentation/shared/DocumentationDoc.java b/stroom-core-shared/src/main/java/stroom/documentation/shared/DocumentationDoc.java index 1385b89a0f..15b04d2b24 100644 --- a/stroom-core-shared/src/main/java/stroom/documentation/shared/DocumentationDoc.java +++ b/stroom-core-shared/src/main/java/stroom/documentation/shared/DocumentationDoc.java @@ -4,8 +4,7 @@ import stroom.docs.shared.Description; import stroom.docstore.shared.Doc; import stroom.docstore.shared.DocumentType; -import stroom.docstore.shared.DocumentTypeGroup; -import stroom.svg.shared.SvgImage; +import stroom.docstore.shared.DocumentTypeRegistry; import stroom.util.shared.HasData; import com.fasterxml.jackson.annotation.JsonCreator; @@ -23,11 +22,7 @@ public class DocumentationDoc extends Doc implements HasData { public static final String TYPE = "Documentation"; - public static final DocumentType DOCUMENT_TYPE = new DocumentType( - DocumentTypeGroup.CONFIGURATION, - TYPE, - TYPE, - SvgImage.DOCUMENT_DOCUMENTATION); + public static final DocumentType DOCUMENT_TYPE = DocumentTypeRegistry.DOCUMENTATION_DOCUMENT_TYPE; @JsonProperty private String documentation; diff --git a/stroom-core-shared/src/main/java/stroom/feed/shared/FeedDoc.java b/stroom-core-shared/src/main/java/stroom/feed/shared/FeedDoc.java index 8a17833480..7d8ae76931 100644 --- a/stroom-core-shared/src/main/java/stroom/feed/shared/FeedDoc.java +++ b/stroom-core-shared/src/main/java/stroom/feed/shared/FeedDoc.java @@ -22,8 +22,7 @@ import stroom.docs.shared.Description; import stroom.docstore.shared.Doc; import stroom.docstore.shared.DocumentType; -import stroom.docstore.shared.DocumentTypeGroup; -import stroom.svg.shared.SvgImage; +import stroom.docstore.shared.DocumentTypeRegistry; import stroom.util.shared.HasPrimitiveValue; import stroom.util.shared.PrimitiveValueConverter; @@ -65,11 +64,7 @@ public class FeedDoc extends Doc { public static final String TYPE = "Feed"; - public static final DocumentType DOCUMENT_TYPE = new DocumentType( - DocumentTypeGroup.DATA_PROCESSING, - TYPE, - TYPE, - SvgImage.DOCUMENT_FEED); + public static final DocumentType DOCUMENT_TYPE = DocumentTypeRegistry.FEED_DOCUMENT_TYPE; @JsonProperty private String description; diff --git a/stroom-core-shared/src/main/java/stroom/index/shared/LuceneIndexDoc.java b/stroom-core-shared/src/main/java/stroom/index/shared/LuceneIndexDoc.java index 12ba7aa6d0..a8917c94f5 100644 --- a/stroom-core-shared/src/main/java/stroom/index/shared/LuceneIndexDoc.java +++ b/stroom-core-shared/src/main/java/stroom/index/shared/LuceneIndexDoc.java @@ -21,8 +21,7 @@ import stroom.docs.shared.Description; import stroom.docstore.shared.Doc; import stroom.docstore.shared.DocumentType; -import stroom.docstore.shared.DocumentTypeGroup; -import stroom.svg.shared.SvgImage; +import stroom.docstore.shared.DocumentTypeRegistry; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; @@ -82,11 +81,7 @@ public class LuceneIndexDoc extends Doc { private static final String DEFAULT_TIME_FIELD = "EventTime"; public static final String TYPE = "Index"; - public static final DocumentType DOCUMENT_TYPE = new DocumentType( - DocumentTypeGroup.INDEXING, - TYPE, - "Lucene Index", - SvgImage.DOCUMENT_INDEX); + public static final DocumentType DOCUMENT_TYPE = DocumentTypeRegistry.LUCENE_DOCUMENT_TYPE; @JsonProperty private String description; diff --git a/stroom-core-shared/src/main/java/stroom/kafka/shared/KafkaConfigDoc.java b/stroom-core-shared/src/main/java/stroom/kafka/shared/KafkaConfigDoc.java index abb042ca68..9ada6d1eb5 100644 --- a/stroom-core-shared/src/main/java/stroom/kafka/shared/KafkaConfigDoc.java +++ b/stroom-core-shared/src/main/java/stroom/kafka/shared/KafkaConfigDoc.java @@ -20,8 +20,7 @@ import stroom.docs.shared.Description; import stroom.docstore.shared.Doc; import stroom.docstore.shared.DocumentType; -import stroom.docstore.shared.DocumentTypeGroup; -import stroom.svg.shared.SvgImage; +import stroom.docstore.shared.DocumentTypeRegistry; import stroom.util.shared.HasData; import com.fasterxml.jackson.annotation.JsonCreator; @@ -52,11 +51,7 @@ public class KafkaConfigDoc extends Doc implements HasData { public static final String TYPE = "KafkaConfig"; - public static final DocumentType DOCUMENT_TYPE = new DocumentType( - DocumentTypeGroup.CONFIGURATION, - TYPE, - "Kafka Configuration", - SvgImage.DOCUMENT_KAFKA_CONFIG); + public static final DocumentType DOCUMENT_TYPE = DocumentTypeRegistry.KAFKA_CONFIG_DOCUMENT_TYPE; @JsonProperty private String description = ""; diff --git a/stroom-core-shared/src/main/java/stroom/pipeline/shared/PipelineDoc.java b/stroom-core-shared/src/main/java/stroom/pipeline/shared/PipelineDoc.java index f6bfc603bf..e9d4317181 100644 --- a/stroom-core-shared/src/main/java/stroom/pipeline/shared/PipelineDoc.java +++ b/stroom-core-shared/src/main/java/stroom/pipeline/shared/PipelineDoc.java @@ -20,9 +20,8 @@ import stroom.docs.shared.Description; import stroom.docstore.shared.Doc; import stroom.docstore.shared.DocumentType; -import stroom.docstore.shared.DocumentTypeGroup; +import stroom.docstore.shared.DocumentTypeRegistry; import stroom.pipeline.shared.data.PipelineData; -import stroom.svg.shared.SvgImage; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; @@ -65,11 +64,7 @@ public class PipelineDoc extends Doc { public static final String TYPE = "Pipeline"; - public static final DocumentType DOCUMENT_TYPE = new DocumentType( - DocumentTypeGroup.DATA_PROCESSING, - TYPE, - TYPE, - SvgImage.DOCUMENT_PIPELINE); + public static final DocumentType DOCUMENT_TYPE = DocumentTypeRegistry.PIPELINE_DOCUMENT_TYPE; @JsonProperty private String description; diff --git a/stroom-core-shared/src/main/java/stroom/pipeline/shared/TextConverterDoc.java b/stroom-core-shared/src/main/java/stroom/pipeline/shared/TextConverterDoc.java index 5a4b480621..59f0bbb206 100644 --- a/stroom-core-shared/src/main/java/stroom/pipeline/shared/TextConverterDoc.java +++ b/stroom-core-shared/src/main/java/stroom/pipeline/shared/TextConverterDoc.java @@ -21,8 +21,7 @@ import stroom.docs.shared.Description; import stroom.docstore.shared.Doc; import stroom.docstore.shared.DocumentType; -import stroom.docstore.shared.DocumentTypeGroup; -import stroom.svg.shared.SvgImage; +import stroom.docstore.shared.DocumentTypeRegistry; import stroom.util.shared.HasData; import com.fasterxml.jackson.annotation.JsonCreator; @@ -64,11 +63,7 @@ public class TextConverterDoc extends Doc implements HasData { public static final String TYPE = "TextConverter"; - public static final DocumentType DOCUMENT_TYPE = new DocumentType( - DocumentTypeGroup.TRANSFORMATION, - TYPE, - "Text Converter", - SvgImage.DOCUMENT_TEXT_CONVERTER); + public static final DocumentType DOCUMENT_TYPE = DocumentTypeRegistry.TEXT_CONVERTER_DOCUMENT_TYPE; @JsonProperty private String description; diff --git a/stroom-core-shared/src/main/java/stroom/pipeline/shared/XsltDoc.java b/stroom-core-shared/src/main/java/stroom/pipeline/shared/XsltDoc.java index 0e09a0bf43..611ca6160b 100644 --- a/stroom-core-shared/src/main/java/stroom/pipeline/shared/XsltDoc.java +++ b/stroom-core-shared/src/main/java/stroom/pipeline/shared/XsltDoc.java @@ -20,8 +20,7 @@ import stroom.docs.shared.Description; import stroom.docstore.shared.Doc; import stroom.docstore.shared.DocumentType; -import stroom.docstore.shared.DocumentTypeGroup; -import stroom.svg.shared.SvgImage; +import stroom.docstore.shared.DocumentTypeRegistry; import stroom.util.shared.HasData; import com.fasterxml.jackson.annotation.JsonCreator; @@ -52,11 +51,7 @@ public class XsltDoc extends Doc implements HasData { public static final String TYPE = "XSLT"; - public static final DocumentType DOCUMENT_TYPE = new DocumentType( - DocumentTypeGroup.TRANSFORMATION, - TYPE, - "XSL Translation", - SvgImage.DOCUMENT_XSLT); + public static final DocumentType DOCUMENT_TYPE = DocumentTypeRegistry.XSLT_DOCUMENT_TYPE; @JsonProperty private String description; diff --git a/stroom-core-shared/src/main/java/stroom/query/shared/QueryDoc.java b/stroom-core-shared/src/main/java/stroom/query/shared/QueryDoc.java index f6a3137e20..a01d3c9b6d 100644 --- a/stroom-core-shared/src/main/java/stroom/query/shared/QueryDoc.java +++ b/stroom-core-shared/src/main/java/stroom/query/shared/QueryDoc.java @@ -20,9 +20,8 @@ import stroom.docs.shared.Description; import stroom.docstore.shared.Doc; import stroom.docstore.shared.DocumentType; -import stroom.docstore.shared.DocumentTypeGroup; +import stroom.docstore.shared.DocumentTypeRegistry; import stroom.query.api.v2.TimeRange; -import stroom.svg.shared.SvgImage; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; @@ -56,11 +55,7 @@ public class QueryDoc extends Doc { public static final String TYPE = "Query"; - public static final DocumentType DOCUMENT_TYPE = new DocumentType( - DocumentTypeGroup.SEARCH, - TYPE, - TYPE, - SvgImage.DOCUMENT_QUERY); + public static final DocumentType DOCUMENT_TYPE = DocumentTypeRegistry.QUERY_DOCUMENT_TYPE; @JsonProperty private String description; diff --git a/stroom-core-shared/src/main/java/stroom/receive/rules/shared/ReceiveDataRules.java b/stroom-core-shared/src/main/java/stroom/receive/rules/shared/ReceiveDataRules.java index 92c22858e9..216f9b277d 100644 --- a/stroom-core-shared/src/main/java/stroom/receive/rules/shared/ReceiveDataRules.java +++ b/stroom-core-shared/src/main/java/stroom/receive/rules/shared/ReceiveDataRules.java @@ -21,8 +21,7 @@ import stroom.docref.DocRef; import stroom.docstore.shared.Doc; import stroom.docstore.shared.DocumentType; -import stroom.docstore.shared.DocumentTypeGroup; -import stroom.svg.shared.SvgImage; +import stroom.docstore.shared.DocumentTypeRegistry; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; @@ -49,11 +48,7 @@ public class ReceiveDataRules extends Doc { public static final String TYPE = "ReceiveDataRuleSet"; - public static final DocumentType DOCUMENT_TYPE = new DocumentType( - DocumentTypeGroup.CONFIGURATION, - TYPE, - "Rule Set", - SvgImage.DOCUMENT_RECEIVE_DATA_RULE_SET); + public static final DocumentType DOCUMENT_TYPE = DocumentTypeRegistry.RECEIVE_DATA_RULESET_DOCUMENT_TYPE; @JsonProperty private String description; diff --git a/stroom-core-shared/src/main/java/stroom/script/shared/ScriptDoc.java b/stroom-core-shared/src/main/java/stroom/script/shared/ScriptDoc.java index b879e4020c..a975c24ec4 100644 --- a/stroom-core-shared/src/main/java/stroom/script/shared/ScriptDoc.java +++ b/stroom-core-shared/src/main/java/stroom/script/shared/ScriptDoc.java @@ -20,8 +20,7 @@ import stroom.docs.shared.Description; import stroom.docstore.shared.Doc; import stroom.docstore.shared.DocumentType; -import stroom.docstore.shared.DocumentTypeGroup; -import stroom.svg.shared.SvgImage; +import stroom.docstore.shared.DocumentTypeRegistry; import stroom.util.shared.HasData; import com.fasterxml.jackson.annotation.JsonCreator; @@ -53,11 +52,7 @@ public class ScriptDoc extends Doc implements HasData { public static final String TYPE = "Script"; - public static final DocumentType DOCUMENT_TYPE = new DocumentType( - DocumentTypeGroup.CONFIGURATION, - TYPE, - TYPE, - SvgImage.DOCUMENT_SCRIPT); + public static final DocumentType DOCUMENT_TYPE = DocumentTypeRegistry.SCRIPT_DOCUMENT_TYPE; @JsonProperty private String description; diff --git a/stroom-core-shared/src/main/java/stroom/search/elastic/shared/ElasticClusterDoc.java b/stroom-core-shared/src/main/java/stroom/search/elastic/shared/ElasticClusterDoc.java index b6ccbbce2c..fa916d4e00 100644 --- a/stroom-core-shared/src/main/java/stroom/search/elastic/shared/ElasticClusterDoc.java +++ b/stroom-core-shared/src/main/java/stroom/search/elastic/shared/ElasticClusterDoc.java @@ -20,8 +20,7 @@ import stroom.docs.shared.Description; import stroom.docstore.shared.Doc; import stroom.docstore.shared.DocumentType; -import stroom.docstore.shared.DocumentTypeGroup; -import stroom.svg.shared.SvgImage; +import stroom.docstore.shared.DocumentTypeRegistry; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -50,11 +49,7 @@ public class ElasticClusterDoc extends Doc { public static final String TYPE = "ElasticCluster"; - public static final DocumentType DOCUMENT_TYPE = new DocumentType( - DocumentTypeGroup.CONFIGURATION, - TYPE, - "Elastic Cluster", - SvgImage.DOCUMENT_ELASTIC_CLUSTER); + public static final DocumentType DOCUMENT_TYPE = DocumentTypeRegistry.ELASTIC_CLUSTER_DOCUMENT_TYPE; @JsonProperty private String description; diff --git a/stroom-core-shared/src/main/java/stroom/search/elastic/shared/ElasticIndexDoc.java b/stroom-core-shared/src/main/java/stroom/search/elastic/shared/ElasticIndexDoc.java index 19a144b3e9..2cc1575c52 100644 --- a/stroom-core-shared/src/main/java/stroom/search/elastic/shared/ElasticIndexDoc.java +++ b/stroom-core-shared/src/main/java/stroom/search/elastic/shared/ElasticIndexDoc.java @@ -20,9 +20,8 @@ import stroom.docs.shared.Description; import stroom.docstore.shared.Doc; import stroom.docstore.shared.DocumentType; -import stroom.docstore.shared.DocumentTypeGroup; +import stroom.docstore.shared.DocumentTypeRegistry; import stroom.query.api.v2.ExpressionOperator; -import stroom.svg.shared.SvgImage; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -68,11 +67,7 @@ public class ElasticIndexDoc extends Doc { public static final int DEFAULT_SEARCH_SLICES = 1; public static final int DEFAULT_SEARCH_SCROLL_SIZE = 1000; public static final String TYPE = "ElasticIndex"; - public static final DocumentType DOCUMENT_TYPE = new DocumentType( - DocumentTypeGroup.INDEXING, - TYPE, - "Elastic Index", - SvgImage.DOCUMENT_ELASTIC_INDEX); + public static final DocumentType DOCUMENT_TYPE = DocumentTypeRegistry.ELASTIC_INDEX_DOCUMENT_TYPE; private static final String DEFAULT_TIME_FIELD = "@timestamp"; /** diff --git a/stroom-core-shared/src/main/java/stroom/search/solr/shared/SolrIndexDoc.java b/stroom-core-shared/src/main/java/stroom/search/solr/shared/SolrIndexDoc.java index b4734a280a..8c3273ee6a 100644 --- a/stroom-core-shared/src/main/java/stroom/search/solr/shared/SolrIndexDoc.java +++ b/stroom-core-shared/src/main/java/stroom/search/solr/shared/SolrIndexDoc.java @@ -20,9 +20,8 @@ import stroom.docs.shared.Description; import stroom.docstore.shared.Doc; import stroom.docstore.shared.DocumentType; -import stroom.docstore.shared.DocumentTypeGroup; +import stroom.docstore.shared.DocumentTypeRegistry; import stroom.query.api.v2.ExpressionOperator; -import stroom.svg.shared.SvgImage; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -67,11 +66,7 @@ public class SolrIndexDoc extends Doc { public static final String TYPE = "SolrIndex"; - public static final DocumentType DOCUMENT_TYPE = new DocumentType( - DocumentTypeGroup.INDEXING, - TYPE, - "Solr Index", - SvgImage.DOCUMENT_SOLR_INDEX); + public static final DocumentType DOCUMENT_TYPE = DocumentTypeRegistry.SOLR_INDEX_DOCUMENT_TYPE; private static final String DEFAULT_TIME_FIELD = "EventTime"; diff --git a/stroom-core-shared/src/main/java/stroom/state/shared/ScyllaDbDoc.java b/stroom-core-shared/src/main/java/stroom/state/shared/ScyllaDbDoc.java index b3df851675..39f56cb7af 100644 --- a/stroom-core-shared/src/main/java/stroom/state/shared/ScyllaDbDoc.java +++ b/stroom-core-shared/src/main/java/stroom/state/shared/ScyllaDbDoc.java @@ -20,8 +20,7 @@ import stroom.docs.shared.Description; import stroom.docstore.shared.Doc; import stroom.docstore.shared.DocumentType; -import stroom.docstore.shared.DocumentTypeGroup; -import stroom.svg.shared.SvgImage; +import stroom.docstore.shared.DocumentTypeRegistry; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -52,11 +51,7 @@ public class ScyllaDbDoc extends Doc { public static final String TYPE = "ScyllaDB"; - public static final DocumentType DOCUMENT_TYPE = new DocumentType( - DocumentTypeGroup.CONFIGURATION, - TYPE, - "Scylla DB", - SvgImage.DOCUMENT_SCYLLA_DB); + public static final DocumentType DOCUMENT_TYPE = DocumentTypeRegistry.SCYLLA_DB_DOCUMENT_TYPE; @JsonProperty private String description; diff --git a/stroom-core-shared/src/main/java/stroom/state/shared/StateDoc.java b/stroom-core-shared/src/main/java/stroom/state/shared/StateDoc.java index 7c3daf3c57..29dd48d3e0 100644 --- a/stroom-core-shared/src/main/java/stroom/state/shared/StateDoc.java +++ b/stroom-core-shared/src/main/java/stroom/state/shared/StateDoc.java @@ -20,8 +20,7 @@ import stroom.docs.shared.Description; import stroom.docstore.shared.Doc; import stroom.docstore.shared.DocumentType; -import stroom.docstore.shared.DocumentTypeGroup; -import stroom.svg.shared.SvgImage; +import stroom.docstore.shared.DocumentTypeRegistry; import stroom.util.shared.time.TimeUnit; import com.fasterxml.jackson.annotation.JsonCreator; @@ -58,11 +57,7 @@ public class StateDoc extends Doc { public static final String TYPE = "StateStore"; - public static final DocumentType DOCUMENT_TYPE = new DocumentType( - DocumentTypeGroup.INDEXING, - TYPE, - "State Store", - SvgImage.DOCUMENT_STATE_STORE); + public static final DocumentType DOCUMENT_TYPE = DocumentTypeRegistry.STATE_STORE_DOCUMENT_TYPE; /** * Reference to the `scyllaDb` containing common connection properties diff --git a/stroom-core-shared/src/main/java/stroom/statistics/impl/hbase/shared/StroomStatsStoreDoc.java b/stroom-core-shared/src/main/java/stroom/statistics/impl/hbase/shared/StroomStatsStoreDoc.java index 563b9823be..9348aecc1e 100644 --- a/stroom-core-shared/src/main/java/stroom/statistics/impl/hbase/shared/StroomStatsStoreDoc.java +++ b/stroom-core-shared/src/main/java/stroom/statistics/impl/hbase/shared/StroomStatsStoreDoc.java @@ -20,8 +20,7 @@ import stroom.docs.shared.Description; import stroom.docstore.shared.Doc; import stroom.docstore.shared.DocumentType; -import stroom.docstore.shared.DocumentTypeGroup; -import stroom.svg.shared.SvgImage; +import stroom.docstore.shared.DocumentTypeRegistry; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -57,11 +56,7 @@ public class StroomStatsStoreDoc extends Doc { public static final String TYPE = "StroomStatsStore"; - public static final DocumentType DOCUMENT_TYPE = new DocumentType( - DocumentTypeGroup.INDEXING, - TYPE, - "Stroom-Stats Store", - SvgImage.DOCUMENT_STROOM_STATS_STORE); + public static final DocumentType DOCUMENT_TYPE = DocumentTypeRegistry.STROOM_STATS_STORE_DOCUMENT_TYPE; private static final EventStoreTimeIntervalEnum DEFAULT_PRECISION_INTERVAL = EventStoreTimeIntervalEnum.HOUR; diff --git a/stroom-core-shared/src/main/java/stroom/statistics/impl/sql/shared/StatisticStoreDoc.java b/stroom-core-shared/src/main/java/stroom/statistics/impl/sql/shared/StatisticStoreDoc.java index 07a40dc867..7590bd009b 100644 --- a/stroom-core-shared/src/main/java/stroom/statistics/impl/sql/shared/StatisticStoreDoc.java +++ b/stroom-core-shared/src/main/java/stroom/statistics/impl/sql/shared/StatisticStoreDoc.java @@ -20,8 +20,7 @@ import stroom.docs.shared.Description; import stroom.docstore.shared.Doc; import stroom.docstore.shared.DocumentType; -import stroom.docstore.shared.DocumentTypeGroup; -import stroom.svg.shared.SvgImage; +import stroom.docstore.shared.DocumentTypeRegistry; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -69,11 +68,7 @@ public class StatisticStoreDoc extends Doc implements StatisticStore { public static final String TYPE = "StatisticStore"; - public static final DocumentType DOCUMENT_TYPE = new DocumentType( - DocumentTypeGroup.INDEXING, - TYPE, - "Statistic Store", - SvgImage.DOCUMENT_STATISTIC_STORE); + public static final DocumentType DOCUMENT_TYPE = DocumentTypeRegistry.STATISTIC_STORE_DOCUMENT_TYPE; // IndexFields names public static final String FIELD_NAME_DATE_TIME = "Date Time"; diff --git a/stroom-core-shared/src/main/java/stroom/view/shared/ViewDoc.java b/stroom-core-shared/src/main/java/stroom/view/shared/ViewDoc.java index ef386bdb05..a3d1d2e6a2 100644 --- a/stroom-core-shared/src/main/java/stroom/view/shared/ViewDoc.java +++ b/stroom-core-shared/src/main/java/stroom/view/shared/ViewDoc.java @@ -20,9 +20,8 @@ import stroom.docs.shared.Description; import stroom.docstore.shared.Doc; import stroom.docstore.shared.DocumentType; -import stroom.docstore.shared.DocumentTypeGroup; +import stroom.docstore.shared.DocumentTypeRegistry; import stroom.query.api.v2.ExpressionOperator; -import stroom.svg.shared.SvgImage; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; @@ -55,11 +54,7 @@ public class ViewDoc extends Doc { public static final String TYPE = "View"; - public static final DocumentType DOCUMENT_TYPE = new DocumentType( - DocumentTypeGroup.SEARCH, - TYPE, - TYPE, - SvgImage.DOCUMENT_VIEW); + public static final DocumentType DOCUMENT_TYPE = DocumentTypeRegistry.VIEW_DOCUMENT_TYPE; @JsonProperty private String description; diff --git a/stroom-core-shared/src/main/java/stroom/visualisation/shared/VisualisationDoc.java b/stroom-core-shared/src/main/java/stroom/visualisation/shared/VisualisationDoc.java index bc60069918..20592e1d16 100644 --- a/stroom-core-shared/src/main/java/stroom/visualisation/shared/VisualisationDoc.java +++ b/stroom-core-shared/src/main/java/stroom/visualisation/shared/VisualisationDoc.java @@ -20,8 +20,7 @@ import stroom.docs.shared.Description; import stroom.docstore.shared.Doc; import stroom.docstore.shared.DocumentType; -import stroom.docstore.shared.DocumentTypeGroup; -import stroom.svg.shared.SvgImage; +import stroom.docstore.shared.DocumentTypeRegistry; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; @@ -55,11 +54,7 @@ public class VisualisationDoc extends Doc { public static final String TYPE = "Visualisation"; - public static final DocumentType DOCUMENT_TYPE = new DocumentType( - DocumentTypeGroup.CONFIGURATION, - TYPE, - TYPE, - SvgImage.DOCUMENT_VISUALISATION); + public static final DocumentType DOCUMENT_TYPE = DocumentTypeRegistry.VISUALISATION_DOCUMENT_TYPE; @JsonProperty private String description; diff --git a/stroom-core-shared/src/main/java/stroom/xmlschema/shared/XmlSchemaDoc.java b/stroom-core-shared/src/main/java/stroom/xmlschema/shared/XmlSchemaDoc.java index de911aa59f..7cca6c4ced 100644 --- a/stroom-core-shared/src/main/java/stroom/xmlschema/shared/XmlSchemaDoc.java +++ b/stroom-core-shared/src/main/java/stroom/xmlschema/shared/XmlSchemaDoc.java @@ -20,8 +20,7 @@ import stroom.docs.shared.Description; import stroom.docstore.shared.Doc; import stroom.docstore.shared.DocumentType; -import stroom.docstore.shared.DocumentTypeGroup; -import stroom.svg.shared.SvgImage; +import stroom.docstore.shared.DocumentTypeRegistry; import stroom.util.shared.HasData; import com.fasterxml.jackson.annotation.JsonCreator; @@ -68,11 +67,7 @@ public class XmlSchemaDoc extends Doc implements HasData { public static final String TYPE = "XMLSchema"; - public static final DocumentType DOCUMENT_TYPE = new DocumentType( - DocumentTypeGroup.TRANSFORMATION, - TYPE, - "XML Schema", - SvgImage.DOCUMENT_XMLSCHEMA); + public static final DocumentType DOCUMENT_TYPE = DocumentTypeRegistry.XML_SCHEMA_DOCUMENT_TYPE; @JsonProperty private String description;