Skip to content

Commit

Permalink
Merge branch 'release/1.1.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
Yasuyuki Takeo committed Dec 13, 2019
2 parents 78da3e4 + 8e51b4e commit 65d733d
Show file tree
Hide file tree
Showing 17 changed files with 124 additions and 82 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jar {
manifest {
attributes(
"Bundle-SymbolicName": "com.liferay.damascus.cli",
"Bundle-Version": "1.1.3",
"Bundle-Version": "1.1.4",
"Bundle-Description": "Liferay extension tool for scaffolding service builder portlet",
"Main-Class": "com.liferay.damascus.cli.Damascus",
"JPM-Command": "damascus"
Expand Down
Binary file modified latest/damascus.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion src/main/java/com/liferay/damascus/cli/Damascus.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@Slf4j
public class Damascus {

public final static String VERSION = "1.1.3";// + "_" + LocalDateTime.now().toString();
public final static String VERSION = "1.1.4";// + "_" + LocalDateTime.now().toString();

/**
* Main
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ package ${packageName}.constants;
public class ${capFirstModel}PortletKeys {

public static final String ${uppercaseModel} =
"com_liferay_sb_test_web_${capFirstModel}Portlet";
"${packageSnake}_web_${capFirstModel}Portlet";

public static final String ${uppercaseModel}_ADMIN =
"com_liferay_sb_test_web_${capFirstModel}AdminPortlet";
"${packageSnake}_web_${capFirstModel}AdminPortlet";

public static final String ${uppercaseModel}_CONFIG =
"${packageName}.web.portlet.action.${capFirstModel}Configuration";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -694,9 +694,9 @@ public class ${capFirstModel}LocalServiceImpl extends ${capFirstModel}LocalServi
/* </dmsc:sync> */

entry.set${application.asset.assetTitleFieldName?cap_first}(
ParamUtil.getString(request, "${lowercaseModel}TitleName"));
ParamUtil.getString(request, "${application.asset.assetTitleFieldName}"));
entry.set${application.asset.assetSummaryFieldName?cap_first}(
ParamUtil.getString(request, "${lowercaseModel}SummaryName"));
ParamUtil.getString(request, "${application.asset.assetSummaryFieldName}"));

entry.setCompanyId(themeDisplay.getCompanyId());
entry.setGroupId(themeDisplay.getScopeGroupId());
Expand Down
65 changes: 33 additions & 32 deletions src/main/resources/templates/7.2/Portlet_XXXXSVC_default.xml.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<model-resource>
<model-name>${packageName}</model-name>
<portlet-ref>
<portlet-name>com_liferay_sb_test_web_${capFirstModel}Portlet</portlet-name>
<portlet-name>com_liferay_sb_test_web_${capFirstModel}AdminPortlet</portlet-name>
<portlet-name>${packageSnake}_web_${capFirstModel}Portlet</portlet-name>
<portlet-name>${packageSnake}_web_${capFirstModel}AdminPortlet</portlet-name>
</portlet-ref>
<root>true</root>
<weight>1</weight>
Expand Down Expand Up @@ -39,37 +39,38 @@
</permissions>
</model-resource>
<!-- <dmsc:sync id="model-definitions" > -->
<#list damascus.applications as app >
<#list damascus.applications as app >
<#assign capFirstModel = "${app.model?cap_first}">
<model-resource>
<model-name>${packageName}.model.${capFirstModel}</model-name>
<portlet-ref>
<portlet-name>${packageSnake}_web_portlet_${capFirstModel}WebPortlet</portlet-name>
</portlet-ref>
<weight>2</weight>
<permissions>
<supports>
<action-key>ACCESS_IN_CONTROL_PANEL</action-key>
<action-key>ADD_ENTRY</action-key>
<action-key>DELETE</action-key>
<action-key>PERMISSIONS</action-key>
<action-key>UPDATE</action-key>
<action-key>VIEW</action-key>
</supports>
<site-member-defaults>
<action-key>VIEW</action-key>
</site-member-defaults>
<guest-defaults>
<action-key>VIEW</action-key>
</guest-defaults>
<guest-unsupported>
<action-key>ACCESS_IN_CONTROL_PANEL</action-key>
<action-key>ADD_ENTRY</action-key>
<action-key>DELETE</action-key>
<action-key>PERMISSIONS</action-key>
<action-key>UPDATE</action-key>
</guest-unsupported>
</permissions>
<model-resource>
<model-name>${packageName}.model.${capFirstModel}</model-name>
<portlet-ref>
<portlet-name>${packageSnake}_web_${capFirstModel}Portlet</portlet-name>
<portlet-name>${packageSnake}_web_${capFirstModel}AdminPortlet</portlet-name>
</portlet-ref>
<weight>2</weight>
<permissions>
<supports>
<action-key>ACCESS_IN_CONTROL_PANEL</action-key>
<action-key>ADD_ENTRY</action-key>
<action-key>DELETE</action-key>
<action-key>PERMISSIONS</action-key>
<action-key>UPDATE</action-key>
<action-key>VIEW</action-key>
</supports>
<site-member-defaults>
<action-key>VIEW</action-key>
</site-member-defaults>
<guest-defaults>
<action-key>VIEW</action-key>
</guest-defaults>
<guest-unsupported>
<action-key>ACCESS_IN_CONTROL_PANEL</action-key>
<action-key>ADD_ENTRY</action-key>
<action-key>DELETE</action-key>
<action-key>PERMISSIONS</action-key>
<action-key>UPDATE</action-key>
</guest-unsupported>
</permissions>
</model-resource>
</#list>
<!-- </dmsc:sync> -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ SimpleDateFormat dateTimeFormat = new SimpleDateFormat(datetimeFormatVal);
<#assign capFirstValidationModel = "${field.validation.className?cap_first}">
<#assign uncapFirstValidationModel = "${field.validation.className?uncap_first}">
<#assign uppercaseValidationModel = "${field.validation.className?upper_case}">
${capFirstValidationModel}LocalService ${uncapFirstValidationModel}LocalService = (${capFirstValidationModel}LocalService) request
.getAttribute(${capFirstModel}WebKeys.${uppercaseValidationModel}_LOCAL_SERVICE);
${capFirstValidationModel}LocalService ${uncapFirstValidationModel}LocalService = (${capFirstValidationModel}LocalService) request
.getAttribute(${capFirstModel}WebKeys.${uppercaseValidationModel}_LOCAL_SERVICE);
</#if>
</#list>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ String redirect = ParamUtil.getString(request, "redirect");
boolean fromAsset = ParamUtil.getBoolean(request, "fromAsset", false);
portletDisplay.setShowBackIcon(true);
portletDisplay.setURLBack(redirect);

<#list application.fields as field >
<#if field.validation?? && field.validation.className??>
<#assign capFirstValidationModel = "${field.validation.className?cap_first}">
<#assign uncapFirstValidationModel = "${field.validation.className?uncap_first}">
<#assign uppercaseValidationModel = "${field.validation.className?upper_case}">
${capFirstValidationModel}LocalService ${uncapFirstValidationModel}LocalService = (${capFirstValidationModel}LocalService) request
.getAttribute(${capFirstModel}WebKeys.${uppercaseValidationModel}_LOCAL_SERVICE);
</#if>
</#list>
%>

<div class="container-fluid-1280 entry-body">
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/templates/7.2/Portlet_XXXXWEB_view.jsp.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ SimpleDateFormat dateTimeFormat = new SimpleDateFormat(datetimeFormatVal);
<#assign capFirstValidationModel = "${field.validation.className?cap_first}">
<#assign uncapFirstValidationModel = "${field.validation.className?uncap_first}">
<#assign uppercaseValidationModel = "${field.validation.className?upper_case}">
${capFirstValidationModel}LocalService ${uncapFirstValidationModel}LocalService = (${capFirstValidationModel}LocalService) request
.getAttribute(${capFirstModel}WebKeys.${uppercaseValidationModel}_LOCAL_SERVICE);
${capFirstValidationModel}LocalService ${uncapFirstValidationModel}LocalService = (${capFirstValidationModel}LocalService) request
.getAttribute(${capFirstModel}WebKeys.${uppercaseValidationModel}_LOCAL_SERVICE);
</#if>
</#list>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ String redirect = ParamUtil.getString(request, "redirect");
boolean fromAsset = ParamUtil.getBoolean(request, "fromAsset", false);
portletDisplay.setShowBackIcon(true);
portletDisplay.setURLBack(redirect);

<#list application.fields as field >
<#if field.validation?? && field.validation.className??>
<#assign capFirstValidationModel = "${field.validation.className?cap_first}">
<#assign uncapFirstValidationModel = "${field.validation.className?uncap_first}">
<#assign uppercaseValidationModel = "${field.validation.className?upper_case}">
${capFirstValidationModel}LocalService ${uncapFirstValidationModel}LocalService = (${capFirstValidationModel}LocalService) request
.getAttribute(${capFirstModel}WebKeys.${uppercaseValidationModel}_LOCAL_SERVICE);
</#if>
</#list>
%>

<div class="container-fluid-1280">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ package ${packageName}.constants;
public class ${capFirstModel}PortletKeys {

public static final String ${uppercaseModel} =
"com_liferay_sb_test_web_${capFirstModel}Portlet";
"${packageSnake}_web_${capFirstModel}Portlet";

public static final String ${uppercaseModel}_ADMIN =
"com_liferay_sb_test_web_${capFirstModel}AdminPortlet";
"${packageSnake}_web_${capFirstModel}AdminPortlet";

public static final String ${uppercaseModel}_CONFIG =
"${packageName}.web.portlet.action.${capFirstModel}Configuration";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -694,9 +694,9 @@ public class ${capFirstModel}LocalServiceImpl extends ${capFirstModel}LocalServi
/* </dmsc:sync> */

entry.set${application.asset.assetTitleFieldName?cap_first}(
ParamUtil.getString(request, "${lowercaseModel}TitleName"));
ParamUtil.getString(request, "${application.asset.assetTitleFieldName}"));
entry.set${application.asset.assetSummaryFieldName?cap_first}(
ParamUtil.getString(request, "${lowercaseModel}SummaryName"));
ParamUtil.getString(request, "${application.asset.assetSummaryFieldName}"));

entry.setCompanyId(themeDisplay.getCompanyId());
entry.setGroupId(themeDisplay.getScopeGroupId());
Expand Down
65 changes: 33 additions & 32 deletions src/test/resources/templates/7.2/Portlet_XXXXSVC_default.xml.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<model-resource>
<model-name>${packageName}</model-name>
<portlet-ref>
<portlet-name>com_liferay_sb_test_web_${capFirstModel}Portlet</portlet-name>
<portlet-name>com_liferay_sb_test_web_${capFirstModel}AdminPortlet</portlet-name>
<portlet-name>${packageSnake}_web_${capFirstModel}Portlet</portlet-name>
<portlet-name>${packageSnake}_web_${capFirstModel}AdminPortlet</portlet-name>
</portlet-ref>
<root>true</root>
<weight>1</weight>
Expand Down Expand Up @@ -39,37 +39,38 @@
</permissions>
</model-resource>
<!-- <dmsc:sync id="model-definitions" > -->
<#list damascus.applications as app >
<#list damascus.applications as app >
<#assign capFirstModel = "${app.model?cap_first}">
<model-resource>
<model-name>${packageName}.model.${capFirstModel}</model-name>
<portlet-ref>
<portlet-name>${packageSnake}_web_portlet_${capFirstModel}WebPortlet</portlet-name>
</portlet-ref>
<weight>2</weight>
<permissions>
<supports>
<action-key>ACCESS_IN_CONTROL_PANEL</action-key>
<action-key>ADD_ENTRY</action-key>
<action-key>DELETE</action-key>
<action-key>PERMISSIONS</action-key>
<action-key>UPDATE</action-key>
<action-key>VIEW</action-key>
</supports>
<site-member-defaults>
<action-key>VIEW</action-key>
</site-member-defaults>
<guest-defaults>
<action-key>VIEW</action-key>
</guest-defaults>
<guest-unsupported>
<action-key>ACCESS_IN_CONTROL_PANEL</action-key>
<action-key>ADD_ENTRY</action-key>
<action-key>DELETE</action-key>
<action-key>PERMISSIONS</action-key>
<action-key>UPDATE</action-key>
</guest-unsupported>
</permissions>
<model-resource>
<model-name>${packageName}.model.${capFirstModel}</model-name>
<portlet-ref>
<portlet-name>${packageSnake}_web_${capFirstModel}Portlet</portlet-name>
<portlet-name>${packageSnake}_web_${capFirstModel}AdminPortlet</portlet-name>
</portlet-ref>
<weight>2</weight>
<permissions>
<supports>
<action-key>ACCESS_IN_CONTROL_PANEL</action-key>
<action-key>ADD_ENTRY</action-key>
<action-key>DELETE</action-key>
<action-key>PERMISSIONS</action-key>
<action-key>UPDATE</action-key>
<action-key>VIEW</action-key>
</supports>
<site-member-defaults>
<action-key>VIEW</action-key>
</site-member-defaults>
<guest-defaults>
<action-key>VIEW</action-key>
</guest-defaults>
<guest-unsupported>
<action-key>ACCESS_IN_CONTROL_PANEL</action-key>
<action-key>ADD_ENTRY</action-key>
<action-key>DELETE</action-key>
<action-key>PERMISSIONS</action-key>
<action-key>UPDATE</action-key>
</guest-unsupported>
</permissions>
</model-resource>
</#list>
<!-- </dmsc:sync> -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ SimpleDateFormat dateTimeFormat = new SimpleDateFormat(datetimeFormatVal);
<#assign capFirstValidationModel = "${field.validation.className?cap_first}">
<#assign uncapFirstValidationModel = "${field.validation.className?uncap_first}">
<#assign uppercaseValidationModel = "${field.validation.className?upper_case}">
${capFirstValidationModel}LocalService ${uncapFirstValidationModel}LocalService = (${capFirstValidationModel}LocalService) request
.getAttribute(${capFirstModel}WebKeys.${uppercaseValidationModel}_LOCAL_SERVICE);
${capFirstValidationModel}LocalService ${uncapFirstValidationModel}LocalService = (${capFirstValidationModel}LocalService) request
.getAttribute(${capFirstModel}WebKeys.${uppercaseValidationModel}_LOCAL_SERVICE);
</#if>
</#list>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ String redirect = ParamUtil.getString(request, "redirect");
boolean fromAsset = ParamUtil.getBoolean(request, "fromAsset", false);
portletDisplay.setShowBackIcon(true);
portletDisplay.setURLBack(redirect);

<#list application.fields as field >
<#if field.validation?? && field.validation.className??>
<#assign capFirstValidationModel = "${field.validation.className?cap_first}">
<#assign uncapFirstValidationModel = "${field.validation.className?uncap_first}">
<#assign uppercaseValidationModel = "${field.validation.className?upper_case}">
${capFirstValidationModel}LocalService ${uncapFirstValidationModel}LocalService = (${capFirstValidationModel}LocalService) request
.getAttribute(${capFirstModel}WebKeys.${uppercaseValidationModel}_LOCAL_SERVICE);
</#if>
</#list>
%>

<div class="container-fluid-1280 entry-body">
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/templates/7.2/Portlet_XXXXWEB_view.jsp.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ SimpleDateFormat dateTimeFormat = new SimpleDateFormat(datetimeFormatVal);
<#assign capFirstValidationModel = "${field.validation.className?cap_first}">
<#assign uncapFirstValidationModel = "${field.validation.className?uncap_first}">
<#assign uppercaseValidationModel = "${field.validation.className?upper_case}">
${capFirstValidationModel}LocalService ${uncapFirstValidationModel}LocalService = (${capFirstValidationModel}LocalService) request
.getAttribute(${capFirstModel}WebKeys.${uppercaseValidationModel}_LOCAL_SERVICE);
${capFirstValidationModel}LocalService ${uncapFirstValidationModel}LocalService = (${capFirstValidationModel}LocalService) request
.getAttribute(${capFirstModel}WebKeys.${uppercaseValidationModel}_LOCAL_SERVICE);
</#if>
</#list>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ String redirect = ParamUtil.getString(request, "redirect");
boolean fromAsset = ParamUtil.getBoolean(request, "fromAsset", false);
portletDisplay.setShowBackIcon(true);
portletDisplay.setURLBack(redirect);

<#list application.fields as field >
<#if field.validation?? && field.validation.className??>
<#assign capFirstValidationModel = "${field.validation.className?cap_first}">
<#assign uncapFirstValidationModel = "${field.validation.className?uncap_first}">
<#assign uppercaseValidationModel = "${field.validation.className?upper_case}">
${capFirstValidationModel}LocalService ${uncapFirstValidationModel}LocalService = (${capFirstValidationModel}LocalService) request
.getAttribute(${capFirstModel}WebKeys.${uppercaseValidationModel}_LOCAL_SERVICE);
</#if>
</#list>
%>

<div class="container-fluid-1280">
Expand Down

0 comments on commit 65d733d

Please sign in to comment.