Skip to content

Commit

Permalink
Merge branch 'release/1.1.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
yasuflatland-lf committed Dec 9, 2019
2 parents 2b0a291 + 6a8339c commit 78da3e4
Show file tree
Hide file tree
Showing 11 changed files with 190 additions and 100 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.2",
"Bundle-Version": "1.1.3",
"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.2";// + "_" + LocalDateTime.now().toString();
public final static String VERSION = "1.1.3";// + "_" + LocalDateTime.now().toString();

/**
* Main
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ public class ${capFirstModel}LocalServiceImpl extends ${capFirstModel}LocalServi
newEntry.setModifiedDate(now);

newEntry.setUuid(serviceContext.getUuid());
newEntry.setUrlTitle(getUniqueUrlTitle(entry, entry.getUrlTitle()));
newEntry.setUrlTitle(getUniqueUrlTitle(entry, entry.get${application.asset.assetTitleFieldName?cap_first}()));

newEntry.set${application.asset.assetTitleFieldName?cap_first}(entry.get${application.asset.assetTitleFieldName?cap_first}());
newEntry.set${application.asset.assetSummaryFieldName?cap_first}(entry.get${application.asset.assetSummaryFieldName?cap_first}());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,52 +1,95 @@
<?xml version="1.0"?>
<!-- <dmsc:root templateName="Portlet_XXXXSVC_portlet-model-hints.xml.ftl" /> -->
<!-- <dmsc:sync id="head-common" > -->
<#include "./valuables.ftl">
<#assign createPath = "${serviceModulePath}/src/main/resources/META-INF/portlet-model-hints.xml">
<!-- </dmsc:sync> -->
<?xml version="1.0"?>

<model-hints>
<!-- <dmsc:sync id="model-definitions" > -->
<model name="${packageName}.model.${capFirstModel}">
<field name="uuid" type="String" />
<field name="${lowercaseModel}Id" type="long" />
<field name="title" type="String">
<hint name="max-length">80</hint>
</field>
<field name="${lowercaseModel}BooleanStat" type="boolean" />
<field name="${lowercaseModel}DateTime" type="Date" />
<field name="${lowercaseModel}DocumentLibrary" type="String">
<hint name="display-width">60</hint>
<hint name="max-length">512</hint>
</field>
<field name="${lowercaseModel}Double" type="double" />
<field name="${lowercaseModel}Integer" type="int" />
<field name="${lowercaseModel}RichText" type="String">
<hint-collection name="TEXTAREA" />
<hint name="max-length">4001</hint>
</field>
<field name="${lowercaseModel}Text" type="String">
<hint-collection name="TEXTAREA" />
<hint name="max-length">4001</hint>
</field>
<field name="groupId" type="long" />
<field name="companyId" type="long" />
<field name="userId" type="long" />
<field name="userName" type="String" />
<field name="createDate" type="Date" />
<field name="modifiedDate" type="Date" />
<field name="urlTitle" type="String" />
<field name="${lowercaseModel}TitleName" type="String">
<hint name="display-width">200</hint>
<hint name="max-length">255</hint>
</field>
<field name="${lowercaseModel}SummaryName" type="String">
<hint-collection name="TEXTAREA" />
<hint name="max-length">4001</hint>
</field>
<field name="status" type="int" />
<field name="statusByUserId" type="long" />
<field name="statusByUserName" type="String" />
<field name="statusDate" type="Date" />
</model>
<!-- </dmsc:sync> -->
<#list damascus.applications as application>
<model name="${packageName}.model.${application.model}">
<field name="uuid" type="String" />

<#-- ---------------- -->
<#-- field loop start -->
<#-- ---------------- -->
<#list application.fields as field >
<#if field.type?string == "com.liferay.damascus.cli.json.fields.Long" >
<field name="${field.name}" type="${templateUtil?api.getTypeParameter(field.type?string)}" />
</#if>
<#if field.type?string == "com.liferay.damascus.cli.json.fields.Varchar" >
<field name="${field.name}" type="${templateUtil?api.getTypeParameter(field.type?string)}" >
<hint name="max-length">${field.length}</hint>
</field>
</#if>
<#if field.type?string == "com.liferay.damascus.cli.json.fields.Date" >
<field name="${field.name}" type="${templateUtil?api.getTypeParameter(field.type?string)}">
<hint name="show-time">false</hint>
<hint name="year-range-delta">80</hint>
</field>
</#if>
<#if field.type?string == "com.liferay.damascus.cli.json.fields.DateTime" >
<field name="${field.name}" type="${templateUtil?api.getTypeParameter(field.type?string)}">
<hint name="show-time">true</hint>
<hint name="year-range-delta">80</hint>
</field>
</#if>
<#if field.type?string == "com.liferay.damascus.cli.json.fields.Boolean" >
<field name="${field.name}" type="${templateUtil?api.getTypeParameter(field.type?string)}" />
</#if>
<#if field.type?string == "com.liferay.damascus.cli.json.fields.DocumentLibrary" >
<field name="${field.name}" type="${templateUtil?api.getTypeParameter(field.type?string)}">
<hint name="display-width">60</hint>
<hint name="max-length">512</hint>
</field>
</#if>
<#if field.type?string == "com.liferay.damascus.cli.json.fields.Double" >
<field name="${field.name}" type="${templateUtil?api.getTypeParameter(field.type?string)}" />
</#if>
<#if field.type?string == "com.liferay.damascus.cli.json.fields.Integer" >
<field name="${field.name}" type="${templateUtil?api.getTypeParameter(field.type?string)}" />
</#if>
<#if field.type?string == "com.liferay.damascus.cli.json.fields.RichText" >
<field name="${field.name}" type="${templateUtil?api.getTypeParameter(field.type?string)}">
<hint-collection name="TEXTAREA" />
<hint name="max-length">4001</hint>
</field>
</#if>
<#if field.type?string == "com.liferay.damascus.cli.json.fields.Text" >
<field name="${field.name}" type="${templateUtil?api.getTypeParameter(field.type?string)}">
<hint-collection name="TEXTAREA" />
<hint name="max-length">4001</hint>
</field>
</#if>
</#list>
<#-- ---------------- -->
<#-- field loop ends -->
<#-- ---------------- -->

<#-- ---------------- -->
<#-- Assets -->
<#-- ---------------- -->
<#if application.asset.assetTitleFieldName?? && application.asset.assetTitleFieldName != "" >
<field name="${application.asset.assetTitleFieldName}" type="String">
<hint name="display-width">200</hint>
<hint name="max-length">255</hint>
</field>
</#if>
<#if application.asset.assetSummaryFieldName?? && application.asset.assetSummaryFieldName != "" >
<field name="${application.asset.assetSummaryFieldName}" type="String">
<hint-collection name="TEXTAREA" />
<hint name="max-length">4001</hint>
</field>
</#if>

<field name="groupId" type="long" />
<field name="companyId" type="long" />
<field name="userId" type="long" />
<field name="userName" type="String" />
<field name="createDate" type="Date" />
<field name="modifiedDate" type="Date" />
<field name="urlTitle" type="String" />
<field name="status" type="int" />
<field name="statusByUserId" type="long" />
<field name="statusByUserName" type="String" />
<field name="statusDate" type="Date" />
</model>
</#list>
</model-hints>
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ page import="com.liferay.portal.kernel.portlet.*" %><%@
page import="com.liferay.portal.kernel.security.permission.ActionKeys" %><%@
page import="com.liferay.portal.kernel.service.WorkflowDefinitionLinkLocalServiceUtil" %><%@
page import="com.liferay.portal.kernel.util.*" %><%@
page import="com.liferay.portal.kernel.workflow.*" %><%@
page import="com.liferay.frontend.taglib.clay.servlet.taglib.util.JSPNavigationItemList" %><%@
page import="${packageName}.model.${capFirstModel}" %><%@
page import="${packageName}.web.constants.*" %><%@
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ page import="com.liferay.portal.kernel.portlet.*" %><%@
page import="com.liferay.portal.kernel.security.permission.ActionKeys" %><%@
page import="com.liferay.portal.kernel.service.WorkflowDefinitionLinkLocalServiceUtil" %><%@
page import="com.liferay.portal.kernel.util.*" %><%@
page import="com.liferay.portal.kernel.workflow.*" %><%@
page import="${packageName}.model.${capFirstModel}" %><%@
page import="${packageName}.web.constants.*" %><%@
page import="${packageName}.web.constants.${capFirstModel}WebKeys" %><%@
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ public class ${capFirstModel}LocalServiceImpl extends ${capFirstModel}LocalServi
newEntry.setModifiedDate(now);

newEntry.setUuid(serviceContext.getUuid());
newEntry.setUrlTitle(getUniqueUrlTitle(entry, entry.getUrlTitle()));
newEntry.setUrlTitle(getUniqueUrlTitle(entry, entry.get${application.asset.assetTitleFieldName?cap_first}()));

newEntry.set${application.asset.assetTitleFieldName?cap_first}(entry.get${application.asset.assetTitleFieldName?cap_first}());
newEntry.set${application.asset.assetSummaryFieldName?cap_first}(entry.get${application.asset.assetSummaryFieldName?cap_first}());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,52 +1,95 @@
<?xml version="1.0"?>
<!-- <dmsc:root templateName="Portlet_XXXXSVC_portlet-model-hints.xml.ftl" /> -->
<!-- <dmsc:sync id="head-common" > -->
<#include "./valuables.ftl">
<#assign createPath = "${serviceModulePath}/src/main/resources/META-INF/portlet-model-hints.xml">
<!-- </dmsc:sync> -->
<?xml version="1.0"?>

<model-hints>
<!-- <dmsc:sync id="model-definitions" > -->
<model name="${packageName}.model.${capFirstModel}">
<field name="uuid" type="String" />
<field name="${lowercaseModel}Id" type="long" />
<field name="title" type="String">
<hint name="max-length">80</hint>
</field>
<field name="${lowercaseModel}BooleanStat" type="boolean" />
<field name="${lowercaseModel}DateTime" type="Date" />
<field name="${lowercaseModel}DocumentLibrary" type="String">
<hint name="display-width">60</hint>
<hint name="max-length">512</hint>
</field>
<field name="${lowercaseModel}Double" type="double" />
<field name="${lowercaseModel}Integer" type="int" />
<field name="${lowercaseModel}RichText" type="String">
<hint-collection name="TEXTAREA" />
<hint name="max-length">4001</hint>
</field>
<field name="${lowercaseModel}Text" type="String">
<hint-collection name="TEXTAREA" />
<hint name="max-length">4001</hint>
</field>
<field name="groupId" type="long" />
<field name="companyId" type="long" />
<field name="userId" type="long" />
<field name="userName" type="String" />
<field name="createDate" type="Date" />
<field name="modifiedDate" type="Date" />
<field name="urlTitle" type="String" />
<field name="${lowercaseModel}TitleName" type="String">
<hint name="display-width">200</hint>
<hint name="max-length">255</hint>
</field>
<field name="${lowercaseModel}SummaryName" type="String">
<hint-collection name="TEXTAREA" />
<hint name="max-length">4001</hint>
</field>
<field name="status" type="int" />
<field name="statusByUserId" type="long" />
<field name="statusByUserName" type="String" />
<field name="statusDate" type="Date" />
</model>
<!-- </dmsc:sync> -->
<#list damascus.applications as application>
<model name="${packageName}.model.${application.model}">
<field name="uuid" type="String" />

<#-- ---------------- -->
<#-- field loop start -->
<#-- ---------------- -->
<#list application.fields as field >
<#if field.type?string == "com.liferay.damascus.cli.json.fields.Long" >
<field name="${field.name}" type="${templateUtil?api.getTypeParameter(field.type?string)}" />
</#if>
<#if field.type?string == "com.liferay.damascus.cli.json.fields.Varchar" >
<field name="${field.name}" type="${templateUtil?api.getTypeParameter(field.type?string)}" >
<hint name="max-length">${field.length}</hint>
</field>
</#if>
<#if field.type?string == "com.liferay.damascus.cli.json.fields.Date" >
<field name="${field.name}" type="${templateUtil?api.getTypeParameter(field.type?string)}">
<hint name="show-time">false</hint>
<hint name="year-range-delta">80</hint>
</field>
</#if>
<#if field.type?string == "com.liferay.damascus.cli.json.fields.DateTime" >
<field name="${field.name}" type="${templateUtil?api.getTypeParameter(field.type?string)}">
<hint name="show-time">true</hint>
<hint name="year-range-delta">80</hint>
</field>
</#if>
<#if field.type?string == "com.liferay.damascus.cli.json.fields.Boolean" >
<field name="${field.name}" type="${templateUtil?api.getTypeParameter(field.type?string)}" />
</#if>
<#if field.type?string == "com.liferay.damascus.cli.json.fields.DocumentLibrary" >
<field name="${field.name}" type="${templateUtil?api.getTypeParameter(field.type?string)}">
<hint name="display-width">60</hint>
<hint name="max-length">512</hint>
</field>
</#if>
<#if field.type?string == "com.liferay.damascus.cli.json.fields.Double" >
<field name="${field.name}" type="${templateUtil?api.getTypeParameter(field.type?string)}" />
</#if>
<#if field.type?string == "com.liferay.damascus.cli.json.fields.Integer" >
<field name="${field.name}" type="${templateUtil?api.getTypeParameter(field.type?string)}" />
</#if>
<#if field.type?string == "com.liferay.damascus.cli.json.fields.RichText" >
<field name="${field.name}" type="${templateUtil?api.getTypeParameter(field.type?string)}">
<hint-collection name="TEXTAREA" />
<hint name="max-length">4001</hint>
</field>
</#if>
<#if field.type?string == "com.liferay.damascus.cli.json.fields.Text" >
<field name="${field.name}" type="${templateUtil?api.getTypeParameter(field.type?string)}">
<hint-collection name="TEXTAREA" />
<hint name="max-length">4001</hint>
</field>
</#if>
</#list>
<#-- ---------------- -->
<#-- field loop ends -->
<#-- ---------------- -->

<#-- ---------------- -->
<#-- Assets -->
<#-- ---------------- -->
<#if application.asset.assetTitleFieldName?? && application.asset.assetTitleFieldName != "" >
<field name="${application.asset.assetTitleFieldName}" type="String">
<hint name="display-width">200</hint>
<hint name="max-length">255</hint>
</field>
</#if>
<#if application.asset.assetSummaryFieldName?? && application.asset.assetSummaryFieldName != "" >
<field name="${application.asset.assetSummaryFieldName}" type="String">
<hint-collection name="TEXTAREA" />
<hint name="max-length">4001</hint>
</field>
</#if>

<field name="groupId" type="long" />
<field name="companyId" type="long" />
<field name="userId" type="long" />
<field name="userName" type="String" />
<field name="createDate" type="Date" />
<field name="modifiedDate" type="Date" />
<field name="urlTitle" type="String" />
<field name="status" type="int" />
<field name="statusByUserId" type="long" />
<field name="statusByUserName" type="String" />
<field name="statusDate" type="Date" />
</model>
</#list>
</model-hints>
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ page import="com.liferay.portal.kernel.portlet.*" %><%@
page import="com.liferay.portal.kernel.security.permission.ActionKeys" %><%@
page import="com.liferay.portal.kernel.service.WorkflowDefinitionLinkLocalServiceUtil" %><%@
page import="com.liferay.portal.kernel.util.*" %><%@
page import="com.liferay.portal.kernel.workflow.*" %><%@
page import="com.liferay.frontend.taglib.clay.servlet.taglib.util.JSPNavigationItemList" %><%@
page import="${packageName}.model.${capFirstModel}" %><%@
page import="${packageName}.web.constants.*" %><%@
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ page import="com.liferay.portal.kernel.portlet.*" %><%@
page import="com.liferay.portal.kernel.security.permission.ActionKeys" %><%@
page import="com.liferay.portal.kernel.service.WorkflowDefinitionLinkLocalServiceUtil" %><%@
page import="com.liferay.portal.kernel.util.*" %><%@
page import="com.liferay.portal.kernel.workflow.*" %><%@
page import="${packageName}.model.${capFirstModel}" %><%@
page import="${packageName}.web.constants.*" %><%@
page import="${packageName}.web.constants.${capFirstModel}WebKeys" %><%@
Expand Down

0 comments on commit 78da3e4

Please sign in to comment.