Skip to content

Commit 325e5ef

Browse files
committed
Новые классы метаданных и тесты
1 parent 5e23b6b commit 325e5ef

File tree

22 files changed

+1809
-351
lines changed

22 files changed

+1809
-351
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package com.github._1c_syntax.mdclasses.mdo;
2+
3+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4+
import com.fasterxml.jackson.annotation.JsonProperty;
5+
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
6+
import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;
7+
import lombok.EqualsAndHashCode;
8+
import lombok.Value;
9+
import lombok.experimental.SuperBuilder;
10+
11+
import java.util.Map;
12+
13+
@Value
14+
@EqualsAndHashCode(callSuper = true)
15+
@JsonDeserialize(builder = Language.LanguageBuilderImpl.class)
16+
@SuperBuilder
17+
public class Language extends MDObjectBase {
18+
19+
@JsonPOJOBuilder(withPrefix = "")
20+
@JsonIgnoreProperties(ignoreUnknown = true)
21+
static final class LanguageBuilderImpl extends Language.LanguageBuilder<Language, Language.LanguageBuilderImpl> {
22+
23+
@JsonProperty("Properties")
24+
@Override
25+
public Language.LanguageBuilderImpl properties(Map<String, Object> properties) {
26+
super.properties(properties);
27+
return this.self();
28+
}
29+
}
30+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package com.github._1c_syntax.mdclasses.mdo;
2+
3+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4+
import com.fasterxml.jackson.annotation.JsonProperty;
5+
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
6+
import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;
7+
import lombok.EqualsAndHashCode;
8+
import lombok.Value;
9+
import lombok.experimental.SuperBuilder;
10+
11+
import java.util.Map;
12+
13+
@Value
14+
@EqualsAndHashCode(callSuper = true)
15+
@JsonDeserialize(builder = MDOInterface.MDOInterfaceBuilderImpl.class)
16+
@SuperBuilder
17+
public class MDOInterface extends MDObjectBase {
18+
19+
@JsonPOJOBuilder(withPrefix = "")
20+
@JsonIgnoreProperties(ignoreUnknown = true)
21+
static final class MDOInterfaceBuilderImpl extends MDOInterface.MDOInterfaceBuilder<MDOInterface, MDOInterface.MDOInterfaceBuilderImpl> {
22+
23+
@JsonProperty("Properties")
24+
@Override
25+
public MDOInterface.MDOInterfaceBuilderImpl properties(Map<String, Object> properties) {
26+
super.properties(properties);
27+
return this.self();
28+
}
29+
}
30+
}

src/main/java/com/github/_1c_syntax/mdclasses/mdo/MetaDataObject.java

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public class MetaDataObject {
6767
protected EventSubscription eventSubscription;
6868
@JsonProperty("ExchangePlan")
6969
protected ExchangePlan exchangePlan;
70-
// @JsonProperty("ExternalDataProcessor")
70+
// @JsonProperty("ExternalDataProcessor")
7171
// protected ExternalDataProcessor externalDataProcessor;
7272
// @JsonProperty("ExternalDataSource")
7373
// protected ExternalDataSource externalDataSource;
@@ -85,11 +85,11 @@ public class MetaDataObject {
8585
protected HTTPService httpService;
8686
@JsonProperty("InformationRegister")
8787
protected InformationRegister informationRegister;
88-
// @JsonProperty("Interface")
89-
// protected MDOInterface _interface;
90-
// @JsonProperty("Language")
91-
// protected Language language;
92-
// @JsonProperty("Recalculation")
88+
@JsonProperty("Interface")
89+
protected MDOInterface _interface;
90+
@JsonProperty("Language")
91+
protected Language language;
92+
// @JsonProperty("Recalculation")
9393
// protected Recalculation recalculation;
9494
@JsonProperty("Report")
9595
protected Report report;
@@ -109,7 +109,7 @@ public class MetaDataObject {
109109
protected StyleItem styleItem;
110110
@JsonProperty("Subsystem")
111111
protected Subsystem subsystem;
112-
// @JsonProperty("Table")
112+
// @JsonProperty("Table")
113113
// protected Table table;
114114
@JsonProperty("Task")
115115
protected Task task;
@@ -128,6 +128,16 @@ public MDObjectBase getPropertyByType(MDOType type) {
128128
return getConfiguration();
129129
} else if (type == MDOType.ENUM) {
130130
return get_enum();
131+
} else if (type == MDOType.INTERFACE) {
132+
return get_interface();
133+
} else if (type == MDOType.HTTP_SERVICE) {
134+
return getHttpService();
135+
} else if (type == MDOType.WEB_SERVICE) {
136+
return getWebService();
137+
} else if (type == MDOType.WS_REFERENCE) {
138+
return getWsReference();
139+
} else if (type == MDOType.XDTO_PACKAGE) {
140+
return getXdtoPackage();
131141
} else {
132142
String propertyName = type.getShortClassName();
133143
try {

src/main/java/com/github/_1c_syntax/mdclasses/metadata/additional/MDOType.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ public enum MDOType {
3131
FUNCTIONAL_OPTIONS_PARAMETER("FunctionalOptionsParameter", "FunctionalOptionsParameters", false, false),
3232
HTTP_SERVICE("HTTPService", "HTTPServices", false, false),
3333
INFORMATION_REGISTER("InformationRegister", "InformationRegisters", true, true),
34+
INTERFACE("Interface", "Interfaces", true, true),
35+
LANGUAGES("Language", "Languages", false, false),
3436
REPORT("Report", "Reports", true, true),
3537
ROLE("Role", "Roles", false, false),
3638
SCHEDULED_JOB("ScheduledJob", "ScheduledJobs", false, false),

0 commit comments

Comments
 (0)