Skip to content

Commit 4514f7d

Browse files
committed
Add shortHand directive + javadoc
1 parent 3ba0843 commit 4514f7d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+331
-19
lines changed

pom.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>io.github.jeemv.springboot.vuejs</groupId>
88
<artifactId>springboot-vuejs</artifactId>
9-
<version>1.0.11</version>
9+
<version>1.0.12</version>
1010

1111
<name>springboot-vuejs</name>
1212
<url>https://github.com/jeeMv/SpringBoot-VueJS</url>
@@ -48,39 +48,39 @@
4848
<dependency>
4949
<groupId>com.fasterxml.jackson.core</groupId>
5050
<artifactId>jackson-core</artifactId>
51-
<version>[2.9.8,)</version>
51+
<version>[2.10.0,)</version>
5252
</dependency>
5353
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
5454
<dependency>
5555
<groupId>com.fasterxml.jackson.core</groupId>
5656
<artifactId>jackson-databind</artifactId>
57-
<version>[2.9.8,)</version>
57+
<version>[2.10.0,)</version>
5858
</dependency>
5959
<!-- https://mvnrepository.com/artifact/org.aspectj/aspectjweaver -->
6060
<dependency>
6161
<groupId>org.aspectj</groupId>
6262
<artifactId>aspectjweaver</artifactId>
63-
<version>1.9.1</version>
63+
<version>1.9.4</version>
6464
</dependency>
6565
<!-- https://mvnrepository.com/artifact/org.springframework/spring-context -->
6666
<dependency>
6767
<groupId>org.springframework</groupId>
6868
<artifactId>spring-context</artifactId>
69-
<version>5.1.0.RELEASE</version>
69+
<version>5.2.0.RELEASE</version>
7070
</dependency>
7171

7272
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web -->
7373
<dependency>
7474
<groupId>org.springframework.boot</groupId>
7575
<artifactId>spring-boot-starter-web</artifactId>
76-
<version>2.1.3.RELEASE</version>
76+
<version>2.1.9.RELEASE</version>
7777
</dependency>
7878

7979
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-configuration-processor -->
8080
<dependency>
8181
<groupId>org.springframework.boot</groupId>
8282
<artifactId>spring-boot-configuration-processor</artifactId>
83-
<version>2.1.3.RELEASE</version>
83+
<version>2.1.9.RELEASE</version>
8484
</dependency>
8585

8686
</dependencies>

src/main/java/io/github/jeemv/springboot/vuejs/AbstractVueJS.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@
1515
import io.github.jeemv.springboot.vuejs.parts.VueWatcher;
1616
import io.github.jeemv.springboot.vuejs.parts.VueWatchers;
1717

18+
/**
19+
* AbstractVueJS
20+
* This class is part of springBoot-VueJS
21+
* @author jcheron myaddressmail@gmail.com
22+
* @version 1.0.0
23+
*
24+
*/
1825
public abstract class AbstractVueJS {
1926
protected VueData data;
2027
protected VueMethods methods;
@@ -219,6 +226,16 @@ public VueDirective addDirective(String name) {
219226
return directives.add(name);
220227
}
221228

229+
/**
230+
* Adds a new directive in the vue instance
231+
* @param name The directive name
232+
* @param shortHand Shorthand function for bind and update
233+
* @return The created directive
234+
*/
235+
public VueDirective addDirective(String name,String shortHand) {
236+
return directives.add(name,shortHand);
237+
}
238+
222239
/**
223240
* Adds a new filter in the vue instance
224241
* @param name The filter name

src/main/java/io/github/jeemv/springboot/vuejs/VueJS.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
/**
2626
* VueJS instance
2727
* This class is part of springBoot-VueJS
28-
* @author jc
28+
* @author jcheron myaddressmail@gmail.com
2929
* @version 1.0.3
3030
*
3131
*/

src/main/java/io/github/jeemv/springboot/vuejs/annotations/VueJSInstance.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* This class is part of spring-boot-vuejs
1212
* inject an instance of VueJS initialized from the parameters selector and modelName.
1313
* The annotated method must take the ModelMap and VueJS type parameters at the last position.
14-
* @author jc
14+
* @author jcheron myaddressmail@gmail.com
1515
* @since 1.0.2
1616
*
1717
*/

src/main/java/io/github/jeemv/springboot/vuejs/beans/RawObject.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
/**
55
* RawObject
66
* This class is part of spring-boot-vuejs
7-
* @author jc
7+
* @author jcheron myaddressmail@gmail.com
88
* @version 1.0.0
99
*
1010
*/

src/main/java/io/github/jeemv/springboot/vuejs/components/VueComponent.java

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
/**
3434
* VueJS component class
3535
* This class is part of springBoot-VueJS
36+
* Components are create in src/main/resources/static/
3637
* @author jc
3738
* @version 1.0.1
3839
*
@@ -84,10 +85,18 @@ public String getTemplate() {
8485
return template;
8586
}
8687

88+
/**
89+
* Defines the template string
90+
* @param template
91+
*/
8792
public void setTemplate(String template) {
8893
this.template = template;
8994
}
9095

96+
/**
97+
* Sets a template file
98+
* @param pathFilename
99+
*/
91100
public void setTemplateFile(String pathFilename) {
92101
try {
93102
loadTemplateFile("templates/"+pathFilename);
@@ -97,6 +106,9 @@ public void setTemplateFile(String pathFilename) {
97106
}
98107
}
99108

109+
/**
110+
* Sets the default template file (componentName+".html")
111+
*/
100112
public void setDefaultTemplateFile() {
101113
setTemplateFile(VueConfig.getTemplateComponentFolder()+"/"+name+".html");
102114
}
@@ -105,6 +117,10 @@ public boolean isInternal() {
105117
return internal;
106118
}
107119

120+
/**
121+
* Defines if the component is created in the vue instance or not
122+
* @param internal
123+
*/
108124
public void setInternal(boolean internal) {
109125
this.internal = internal;
110126
}
@@ -113,24 +129,48 @@ public VueProps getProps() {
113129
return props;
114130
}
115131

132+
/**
133+
* Sets the component properties
134+
* @param props
135+
*/
116136
public void setProps(String...props) {
117137
for(String prop:props) {
118138
this.props.add(prop);
119139
}
120140
}
121141

142+
/**
143+
* Adds a new property to the component
144+
* @param name The property name
145+
* @param defaultValue The property default value
146+
* @return
147+
*/
122148
public VueProp addProp(String name,Object defaultValue) {
123149
VueProp prop=this.props.add(name);
124150
prop.setDefaultValue(defaultValue);
125151
return prop;
126152
}
127153

154+
/**
155+
* Adds a new property to the component
156+
* defaultValue is not quoted (because it's a raw property)
157+
* @param name The property name
158+
* @param defaultValue non quoted value
159+
* @return
160+
*/
128161
public VueProp addPropRaw(String name,String defaultValue) {
129162
VueProp prop=this.props.add(name);
130163
prop.setDefaultValue(new RawObject(defaultValue));
131164
return prop;
132165
}
133166

167+
/**
168+
* Adds a required property to the component
169+
* @param name The property name
170+
* @param type The property type
171+
* @param required true if the property is required
172+
* @return
173+
*/
134174
public VueProp addProp(String name,String type,boolean required) {
135175
VueProp prop=this.props.add(name);
136176
prop.setTypes(type);

src/main/java/io/github/jeemv/springboot/vuejs/components/VueProp.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
/**
1313
* Represents a VueJS property for Components
1414
* This class is part of springBoot-VueJS
15-
* @author jc
15+
* @author jcheron myaddressmail@gmail.com
1616
* @version 1.0.0
1717
*
1818
*/

src/main/java/io/github/jeemv/springboot/vuejs/configuration/VueConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/**
66
* VueConfig (Used for components creation)
77
* This class is part of springBoot-VueJS
8-
* @author jc
8+
* @author jcheron myaddressmail@gmail.com
99
* @version 1.0.0
1010
*
1111
*/

src/main/java/io/github/jeemv/springboot/vuejs/console/CommandAction.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
package io.github.jeemv.springboot.vuejs.console;
22

33

4+
/**
5+
* CommandAction
6+
* This class is part of springBoot-VueJS
7+
* @author jcheron myaddressmail@gmail.com
8+
* @version 1.0.0
9+
*
10+
*/
411
public class CommandAction {
512
private Runnable action;
613
private String option;

src/main/java/io/github/jeemv/springboot/vuejs/console/CommandPrompt.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
import java.util.List;
55
import java.util.Scanner;
66

7+
/**
8+
* CommandPrompt
9+
* This class is part of springBoot-VueJS
10+
* @author jcheron myaddressmail@gmail.com
11+
* @version 1.0.0
12+
*
13+
*/
714
public class CommandPrompt {
815
private String prompt;
916
private List<CommandAction> actions;

0 commit comments

Comments
 (0)