Skip to content
This repository has been archived by the owner on May 9, 2020. It is now read-only.

Commit

Permalink
Small improvement to Web Tools services screen: Add service definitio…
Browse files Browse the repository at this point in the history
…n location.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1446885 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
adrian-crum committed Feb 16, 2013
1 parent f932084 commit 4867b23
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
3 changes: 3 additions & 0 deletions framework/webtools/config/WebtoolsUiLabels.xml
Expand Up @@ -1513,6 +1513,9 @@
<value xml:lang="zh">缺省实体名称</value>
<value xml:lang="zh_TW">缺省實體名稱</value>
</property>
<property key="WebtoolsDefinitionLocation">
<value xml:lang="en">Definition Location</value>
</property>
<property key="WebtoolsDeleteFiles">
<value xml:lang="de">Dateien nachher löschen?</value>
<value xml:lang="en">Delete Files Afterwards?</value>
Expand Down
Expand Up @@ -349,10 +349,9 @@ if (selectedService) {

curServiceMap.serviceName = selectedService;
curServiceModel = curDispatchContext.getModelService(selectedService);
curServiceMap.description = curServiceModel.description;

if (curServiceModel != null) {

curServiceMap.description = curServiceModel.description;
engineName = curServiceModel.engineName ?: "NA";
defaultEntityName = curServiceModel.defaultEntityName ?: "NA";
export = curServiceModel.export ? uiLabelMap.CommonTrue : uiLabelMap.CommonFalse;
Expand All @@ -378,6 +377,7 @@ if (selectedService) {
curServiceMap.defaultEntityName = defaultEntityName;
curServiceMap.invoke = invoke;
curServiceMap.location = location;
curServiceMap.definitionLocation = curServiceModel.definitionLocation.replaceFirst("file:/" + System.getProperty("ofbiz.home") + "/", "");
curServiceMap.requireNewTransaction = requireNewTransaction;
curServiceMap.export = export;
curServiceMap.exportBool = exportBool;
Expand Down Expand Up @@ -539,6 +539,11 @@ if (!selectedService) {
}
}

if (canIncludeService && constraintName.equals("definitionLocation")) {
fullPath = "file:/" + System.getProperty("ofbiz.home") + "/" + constraintVal;
canIncludeService = curServiceModel.definitionLocation.equals(fullPath);
}

if (canIncludeService && constraintName.equals("alpha")) {
canIncludeService = (serviceName[0]).equals(constraintVal);
if (constraintVal.equals("NA")) {
Expand All @@ -558,6 +563,7 @@ if (!selectedService) {
curServiceMap.defaultEntityName = defaultEntityName;
curServiceMap.invoke = invoke;
curServiceMap.location = location;
curServiceMap.definitionLocation = curServiceModel.definitionLocation.replaceFirst("file:/" + System.getProperty("ofbiz.home") + "/", "");
curServiceMap.requireNewTransaction = requireNewTransaction;

servicesList.add(curServiceMap);
Expand Down
Expand Up @@ -67,13 +67,14 @@ under the License.
<td><a href='<@ofbizUrl>${url}?constraint=location@${selectedServiceMap.location}</@ofbizUrl>'>${selectedServiceMap.location}</a></td>
</tr>
<tr>
<td class="label">${uiLabelMap.WebtoolsArtifactInfo}</td>
<td><a href='<@ofbizUrl>ArtifactInfo?name=${selectedServiceMap.serviceName}&amp;type=service</@ofbizUrl>'>${uiLabelMap.WebtoolsArtifactInfo}</a></td>
<td class="label">${uiLabelMap.WebtoolsDefinitionLocation}</td>
<td><a href='<@ofbizUrl>${url}?constraint=definitionLocation@${selectedServiceMap.definitionLocation}</@ofbizUrl>'>${selectedServiceMap.definitionLocation}</a></td>
<td class="label">${uiLabelMap.WebtoolsDefaultEntityName}</td>
<td><a href='<@ofbizUrl>${url}?constraint=default_entity_name@${selectedServiceMap.defaultEntityName}</@ofbizUrl>'>${selectedServiceMap.defaultEntityName}</a></td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
<td class="label">${uiLabelMap.WebtoolsArtifactInfo}</td>
<td><a href='<@ofbizUrl>ArtifactInfo?name=${selectedServiceMap.serviceName}&amp;type=service</@ofbizUrl>'>${uiLabelMap.WebtoolsArtifactInfo}</a></td>
<td class="label">${uiLabelMap.WebtoolsRequireNewTransaction}</td>
<td>${selectedServiceMap.requireNewTransaction}</td>
</tr>
Expand Down Expand Up @@ -375,6 +376,7 @@ under the License.
<td>${uiLabelMap.WebtoolsDefaultEntityName}</td>
<td>${uiLabelMap.WebtoolsInvoke}</td>
<td>${uiLabelMap.WebtoolsLocation}</td>
<td>${uiLabelMap.WebtoolsDefinitionLocation}</td>
</tr>
<#assign alt_row = false>
<#list servicesList as service>
Expand All @@ -384,6 +386,7 @@ under the License.
<td><a href='<@ofbizUrl>${url}?constraint=default_entity_name@${service.defaultEntityName?default(uiLabelMap.CommonNA)}</@ofbizUrl>'>${service.defaultEntityName}</a></td>
<td>${service.invoke}</td>
<td><a href='<@ofbizUrl>${url}?constraint=location@${service.location?default(uiLabelMap.CommonNA)}</@ofbizUrl>'>${service.location}</a></td>
<td><a href='<@ofbizUrl>${url}?constraint=definitionLocation@${service.definitionLocation}</@ofbizUrl>'>${service.definitionLocation}</a></td>
</tr>
<#assign alt_row = !alt_row>
</#list>
Expand Down

0 comments on commit 4867b23

Please sign in to comment.