01 /*
02 * Copyright 2008-2017 the original author or authors.
03 *
04 * Licensed under the Apache License, Version 2.0 (the "License");
05 * you may not use this file except in compliance with the License.
06 * You may obtain a copy of the License at
07 *
08 * http://www.apache.org/licenses/LICENSE-2.0
09 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package griffon.javafx.support;
17
18 import javafx.beans.DefaultProperty;
19
20 import javax.annotation.Nonnull;
21 import java.util.ArrayList;
22 import java.util.List;
23
24 import static griffon.util.GriffonNameUtils.requireNonBlank;
25
26 /**
27 * @author Andres Almiray
28 * @since 2.12.0
29 */
30 @DefaultProperty("mvcArgs")
31 public class MetaComponent {
32 private String mvcType;
33 private String mcvId;
34 private final List<MvcArg> mvcArgs = new ArrayList<>();
35
36 public String getMvcType() {
37 return mvcType;
38 }
39
40 public void setMvcType(String mvcType) {
41 this.mvcType = mvcType;
42 }
43
44 public String getMcvId() {
45 return mcvId;
46 }
47
48 public void setMcvId(String mcvId) {
49 this.mcvId = mcvId;
50 }
51
52 @Nonnull
53 public List<MvcArg> getMvcArgs() {
54 return mvcArgs;
55 }
56
57 public static class MvcArg {
58 private String name;
59 private String value;
60
61 public String getName() {
62 return name;
63 }
64
65 public void setName(@Nonnull String name) {
66 this.name = requireNonBlank(name, "Argument 'name' must not be blank");
67 }
68
69 public String getValue() {
70 return value;
71 }
72
73 public void setValue(String value) {
74 this.value = value;
75 }
76 }
77 }
|