-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #438 from 1c-syntax/feature/forms
Упрощенная реализация хранения содержимого форм
- Loading branch information
Showing
193 changed files
with
82,295 additions
and
231,559 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,5 @@ build/ | |
*.iml | ||
/.idea/workspace.xml | ||
/.idea/sonar* | ||
|
||
/.idea/misc.xml |
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
src/main/java/com/github/_1c_syntax/bsl/mdo/storage/ManagedFormData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* This file is a part of MDClasses. | ||
* | ||
* Copyright (c) 2019 - 2023 | ||
* Tymko Oleg <[email protected]>, Maximov Valery <[email protected]> and contributors | ||
* | ||
* SPDX-License-Identifier: LGPL-3.0-or-later | ||
* | ||
* MDClasses is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 3.0 of the License, or (at your option) any later version. | ||
* | ||
* MDClasses is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with MDClasses. | ||
*/ | ||
package com.github._1c_syntax.bsl.mdo.storage; | ||
|
||
import com.github._1c_syntax.bsl.mdo.storage.form.FormAttribute; | ||
import com.github._1c_syntax.bsl.mdo.storage.form.FormHandler; | ||
import com.github._1c_syntax.bsl.mdo.storage.form.FormItem; | ||
import com.github._1c_syntax.bsl.mdo.support.MultiLanguageString; | ||
import lombok.Builder; | ||
import lombok.Builder.Default; | ||
import lombok.Singular; | ||
import lombok.Value; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Реализация содержимого управляемой формы | ||
*/ | ||
@Value | ||
@Builder | ||
public class ManagedFormData implements FormData { | ||
@Default | ||
MultiLanguageString title = MultiLanguageString.EMPTY; | ||
@Singular("addHandlers") | ||
List<FormHandler> handlers; | ||
@Singular("addItems") | ||
List<FormItem> items; | ||
@Singular("addAttributes") | ||
List<FormAttribute> attributes; | ||
|
||
@Override | ||
public boolean isEmpty() { | ||
return false; | ||
} | ||
} |
53 changes: 53 additions & 0 deletions
53
src/main/java/com/github/_1c_syntax/bsl/mdo/storage/form/FormAttribute.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* This file is a part of MDClasses. | ||
* | ||
* Copyright (c) 2019 - 2023 | ||
* Tymko Oleg <[email protected]>, Maximov Valery <[email protected]> and contributors | ||
* | ||
* SPDX-License-Identifier: LGPL-3.0-or-later | ||
* | ||
* MDClasses is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 3.0 of the License, or (at your option) any later version. | ||
* | ||
* MDClasses is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with MDClasses. | ||
*/ | ||
package com.github._1c_syntax.bsl.mdo.storage.form; | ||
|
||
import com.github._1c_syntax.bsl.mdo.support.MultiLanguageString; | ||
import lombok.Builder; | ||
import lombok.Builder.Default; | ||
import lombok.Value; | ||
|
||
/** | ||
* Хранит описание атрибута формы | ||
*/ | ||
@Value | ||
@Builder | ||
public class FormAttribute { | ||
|
||
/** | ||
* Идентификатор | ||
*/ | ||
@Default | ||
int id = -1; | ||
|
||
/** | ||
* Имя | ||
*/ | ||
@Default | ||
String name = ""; | ||
|
||
/** | ||
* Синоним | ||
*/ | ||
@Default | ||
MultiLanguageString title = MultiLanguageString.EMPTY; | ||
} |
58 changes: 58 additions & 0 deletions
58
src/main/java/com/github/_1c_syntax/bsl/mdo/storage/form/FormDataPath.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* This file is a part of MDClasses. | ||
* | ||
* Copyright (c) 2019 - 2023 | ||
* Tymko Oleg <[email protected]>, Maximov Valery <[email protected]> and contributors | ||
* | ||
* SPDX-License-Identifier: LGPL-3.0-or-later | ||
* | ||
* MDClasses is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 3.0 of the License, or (at your option) any later version. | ||
* | ||
* MDClasses is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with MDClasses. | ||
*/ | ||
package com.github._1c_syntax.bsl.mdo.storage.form; | ||
|
||
import lombok.Getter; | ||
import lombok.Value; | ||
|
||
/** | ||
* Путь к реквизиту атрибута форма | ||
*/ | ||
@Value | ||
public class FormDataPath { | ||
|
||
/** | ||
* ссылка на пустой элемент | ||
*/ | ||
public static final FormDataPath EMPTY = new FormDataPath(); | ||
|
||
/** | ||
* Путь к реквизиту | ||
*/ | ||
String segments; | ||
|
||
/** | ||
* Признак отсутствия пути | ||
*/ | ||
@Getter | ||
boolean empty; | ||
|
||
private FormDataPath() { | ||
segments = ""; | ||
empty = true; | ||
} | ||
|
||
public FormDataPath(String segments) { | ||
this.segments = segments; | ||
this.empty = false; | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
src/main/java/com/github/_1c_syntax/bsl/mdo/storage/form/FormHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* This file is a part of MDClasses. | ||
* | ||
* Copyright (c) 2019 - 2023 | ||
* Tymko Oleg <[email protected]>, Maximov Valery <[email protected]> and contributors | ||
* | ||
* SPDX-License-Identifier: LGPL-3.0-or-later | ||
* | ||
* MDClasses is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 3.0 of the License, or (at your option) any later version. | ||
* | ||
* MDClasses is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with MDClasses. | ||
*/ | ||
package com.github._1c_syntax.bsl.mdo.storage.form; | ||
|
||
/** | ||
* Обработчик события формы | ||
* | ||
* @param event Имя события | ||
* @param name Имя обработчика (метода) формы | ||
*/ | ||
public record FormHandler(String event, String name) { | ||
} |
Oops, something went wrong.