You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by sa...@apache.org on 2012/08/07 08:26:13 UTC
svn commit: r1370126 [14/15] - in /ofbiz/branches/jackrabbit20120501: ./
applications/accounting/script/org/ofbiz/accounting/payment/
applications/accounting/src/org/ofbiz/accounting/payment/
applications/accounting/webapp/accounting/WEB-INF/ applicati...
Modified: ofbiz/branches/jackrabbit20120501/specialpurpose/example/widget/example/FormWidgetExampleForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/specialpurpose/example/widget/example/FormWidgetExampleForms.xml?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/specialpurpose/example/widget/example/FormWidgetExampleForms.xml (original)
+++ ofbiz/branches/jackrabbit20120501/specialpurpose/example/widget/example/FormWidgetExampleForms.xml Tue Aug 7 06:25:59 2012
@@ -30,7 +30,7 @@ under the License.
<!-- ***************** -->
<field name="field1"
title="${uiLabelMap.ExampleDateField1Title}"
- tooltip="${uiLabelMap.ExampleToDo}">
+ tooltip="${uiLabelMap.ExampleToDo}" tooltip-style="button-text">
<date-time mask="Y"/>
</field>
<!-- ***************** -->
@@ -38,7 +38,7 @@ under the License.
<!-- ***************** -->
<field name="field9"
title="${uiLabelMap.ExampleDateField9Title}">
- <!--tooltip="${uiLabelMap.ExampleDateField9Tooltip}"-->
+ <!--tooltip="${uiLabelMap.ExampleDateField9Tooltip}" tooltip-style="button-text"-->
<date-time default-value="${groovy:org.ofbiz.base.util.UtilDateTime.nowTimestamp()}"/>
</field>
<!-- ***************** -->
@@ -46,7 +46,7 @@ under the License.
<!-- ***************** -->
<field name="field10"
title="${uiLabelMap.ExampleDateField10Title}"
- tooltip="${uiLabelMap.ExampleDateField10Tooltip}">
+ tooltip="${uiLabelMap.ExampleDateField10Tooltip}" tooltip-style="button-text">
<date-time default-value="${nowTimestamp}"/>
</field>
<!-- ***************** -->
@@ -54,7 +54,7 @@ under the License.
<!-- ***************** -->
<field name="field11"
title="${uiLabelMap.ExampleDateField11Title}"
- tooltip="${uiLabelMap.ExampleDateField11Tooltip}">
+ tooltip="${uiLabelMap.ExampleDateField11Tooltip}" tooltip-style="button-text">
<date-time default-value="${date:dayStart(nowTimestamp, timeZone, locale)}"/>
</field>
<!-- ***************** -->
@@ -62,7 +62,7 @@ under the License.
<!-- ***************** -->
<field name="field2"
title="${uiLabelMap.ExampleDateField2Title}"
- tooltip="${uiLabelMap.ExampleToDo}">
+ tooltip="${uiLabelMap.ExampleToDo}" tooltip-style="button-text">
<date-time type="date"/>
</field>
<!-- ***************** -->
@@ -70,7 +70,7 @@ under the License.
<!-- ***************** -->
<field name="field3"
title="${uiLabelMap.ExampleDateField3Title}"
- tooltip="${uiLabelMap.ExampleToDo}">
+ tooltip="${uiLabelMap.ExampleToDo}" tooltip-style="button-text">
<date-time type="time"/>
</field>
<!-- ***************** -->
@@ -78,7 +78,7 @@ under the License.
<!-- ***************** -->
<field name="field4"
title="${uiLabelMap.ExampleDateField4Title}"
- tooltip="${uiLabelMap.ExampleDateField4Tooltip}">
+ tooltip="${uiLabelMap.ExampleDateField4Tooltip}" tooltip-style="button-text">
<date-time input-method="time-dropdown" clock="24" default-value="${exampleDateField}"/>
</field>
<!-- ***************** -->
@@ -86,7 +86,7 @@ under the License.
<!-- ***************** -->
<field name="field5"
title="${uiLabelMap.ExampleDateField5Title}"
- tooltip="${uiLabelMap.ExampleDateField4Tooltip}">
+ tooltip="${uiLabelMap.ExampleDateField4Tooltip}" tooltip-style="button-text">
<date-time input-method="time-dropdown" clock="12" default-value="${exampleDateField}"/>
</field>
<!-- ***************** -->
@@ -95,7 +95,7 @@ under the License.
<field name="field6"
entry-name="exampleDateField"
title="${uiLabelMap.ExampleDateField6Title}"
- tooltip="${uiLabelMap.ExampleToDo}">
+ tooltip="${uiLabelMap.ExampleToDo}" tooltip-style="button-text">
<display type="date-time"/>
</field>
<!-- ***************** -->
@@ -104,7 +104,7 @@ under the License.
<field name="field7"
entry-name="exampleDateField"
title="${uiLabelMap.ExampleDateField7Title}"
- tooltip="${uiLabelMap.ExampleDateField7Tooltip}">
+ tooltip="${uiLabelMap.ExampleDateField7Tooltip}" tooltip-style="button-text">
<display description="${groovy:org.ofbiz.base.util.UtilDateTime.toDateString(exampleDateField, "MM/dd/yyyy");}"/>
</field>
<!-- ***************** -->
@@ -113,7 +113,7 @@ under the License.
<field name="field8"
entry-name="exampleDateField"
title="${uiLabelMap.ExampleDateField8Title}"
- tooltip="${uiLabelMap.ExampleDateField8Tooltip}">
+ tooltip="${uiLabelMap.ExampleDateField8Tooltip}" tooltip-style="button-text">
<display description="${groovy:org.ofbiz.base.util.UtilDateTime.toDateString(exampleDateField, "MMMM,dd,yyyy");}"/>
</field>
<!-- ***************** -->
@@ -121,7 +121,7 @@ under the License.
<!-- ***************** -->
<field name="field12"
title="${uiLabelMap.ExampleDateField12Title}"
- tooltip="${uiLabelMap.ExampleDateField12Tooltip}">
+ tooltip="${uiLabelMap.ExampleDateField12Tooltip}" tooltip-style="button-text">
<date-time input-method="time-dropdown" clock="24" default-value="${exampleDateField}" step="5"/>
</field>
</form>
@@ -135,7 +135,7 @@ under the License.
<!-- ***************** -->
<field name="field1"
title="${uiLabelMap.ExampleDropDownField1Title}"
- tooltip="${uiLabelMap.ExampleDropDownField1Tooltip}">
+ tooltip="${uiLabelMap.ExampleDropDownField1Tooltip}" tooltip-style="button-text">
<drop-down allow-empty="true">
<option key="Y" description="${uiLabelMap.CommonY}"/>
<option key="N" description="${uiLabelMap.CommonN}"/>
@@ -146,7 +146,7 @@ under the License.
<!-- ***************** -->
<field name="field2"
title="${uiLabelMap.ExampleDropDownField2Title}"
- tooltip="${uiLabelMap.ExampleDropDownField2Tooltip}">
+ tooltip="${uiLabelMap.ExampleDropDownField2Tooltip}" tooltip-style="button-text">
<drop-down allow-empty="false"> <!-- allow-empty="false" is also the default value, so you can also not specify this attribute here -->
<option key="Y" description="${uiLabelMap.CommonY}"/>
<option key="N" description="${uiLabelMap.CommonN}"/>
@@ -157,7 +157,7 @@ under the License.
<!-- ***************** -->
<field name="field5"
title="${uiLabelMap.ExampleDropDownField5Title}"
- tooltip="${uiLabelMap.ExampleDropDownField5Tooltip}">
+ tooltip="${uiLabelMap.ExampleDropDownField5Tooltip}" tooltip-style="button-text">
<drop-down no-current-selected-key="N">
<option key="Y" description="${uiLabelMap.CommonY}"/>
<option key="N" description="${uiLabelMap.CommonN}"/>
@@ -170,7 +170,7 @@ under the License.
title="${uiLabelMap.ExampleDropDownField8Title}"
event="onchange"
action="return showErrorAlert('${uiLabelMap.CommonErrorMessage2}','${uiLabelMap.YouChangedTheSelectBoxValue}');"
- tooltip="${uiLabelMap.ExampleDropDownField8Tooltip}">
+ tooltip="${uiLabelMap.ExampleDropDownField8Tooltip}" tooltip-style="button-text">
<drop-down>
<option key="Y" description="${uiLabelMap.CommonY}"/>
<option key="N" description="${uiLabelMap.CommonN}"/>
@@ -185,7 +185,7 @@ under the License.
<!-- ***************** -->
<field name="field3"
title="${uiLabelMap.ExampleDropDownField3Title}"
- tooltip="${uiLabelMap.ExampleToDo}">
+ tooltip="${uiLabelMap.ExampleToDo}" tooltip-style="button-text">
<drop-down>
<entity-options entity-name="ExampleType"
key-field-name="exampleTypeId"
@@ -199,7 +199,7 @@ under the License.
<!-- ***************** -->
<field name="field4"
title="${uiLabelMap.ExampleDropDownField4Title}"
- tooltip="${uiLabelMap.ExampleToDo}">
+ tooltip="${uiLabelMap.ExampleToDo}" tooltip-style="button-text">
<drop-down>
<entity-options entity-name="ExampleType"
key-field-name="exampleTypeId"
@@ -213,7 +213,7 @@ under the License.
<!-- ***************** -->
<field name="exampleTypeId"
title="${uiLabelMap.ExampleDropDownField6Title}"
- tooltip="${uiLabelMap.ExampleToDo}">
+ tooltip="${uiLabelMap.ExampleToDo}" tooltip-style="button-text">
<drop-down>
<entity-options entity-name="ExampleType"
description="${description}"/>
@@ -224,7 +224,7 @@ under the License.
<!-- ***************** -->
<field name="field7"
title="${uiLabelMap.ExampleDropDownField7Title}"
- tooltip="${uiLabelMap.ExampleToDo}">
+ tooltip="${uiLabelMap.ExampleToDo}" tooltip-style="button-text">
<drop-down>
<entity-options entity-name="ExampleType"
key-field-name="exampleTypeId"
@@ -242,7 +242,7 @@ under the License.
<!-- TODO : return only the Id, else you need to edit the field to remove the description -->
<field name="emptyField1" title=" "><display/></field>
<field name="geoId" title="${uiLabelMap.ExampleAutocompleteDropdown}"
- tooltip="${uiLabelMap.ExampleAutocompleteTooltip}">
+ tooltip="${uiLabelMap.ExampleAutocompleteTooltip}" tooltip-style="button-text">
<drop-down>
<auto-complete/>
<entity-options entity-name="Geo" description="${geoId}: ${geoName}">
@@ -341,22 +341,37 @@ under the License.
<!-- Lookup Examples -->
<form name="ExampleLookupFields" type="single" title="">
<!-- Old style lookup (in a popup window without autocompletion), geoIdAlone because we have another geoId below -->
- <field name="geoIdAlone" title="${uiLabelMap.CommonGeoId}">
+ <field name="geoIdAlone" title="${uiLabelMap.CommonGeoId}" tooltip="${uiLabelMap.ExampleLookupFields1}" tooltip-style="button-text">
<lookup target-form-name="LookupGeo" presentation="window"/>
</field>
<!-- Standard lookup (in a layer with autocompletion) -->
+ <field name="geoIdStd" title="${uiLabelMap.CommonGeoId}" tooltip="${uiLabelMap.ExampleLookupFields2}" tooltip-style="button-text">
+ <lookup target-form-name="LookupGeo"/>
+ </field>
+ <!-- Standard read only lookup (in a layer with autocompletion) -->
+ <field name="geoIdReadOnly" title="${uiLabelMap.CommonGeoId}" tooltip="${uiLabelMap.ExampleLookupFields3}" tooltip-style="button-text">
+ <lookup target-form-name="LookupGeo" read-only="true"/>
+ </field>
+ <!-- Standard lookup (in a layer with autocompletion) -->
<!-- passes the name in one field and the id in another, passing the id in the other field does not work yet with autocompletion, WIP... -->
- <field name="geoName" title="${uiLabelMap.CommonGeoName}">
+ <field name="geoName" title="${uiLabelMap.CommonGeoName}" tooltip="${uiLabelMap.ExampleLookupFields4}" tooltip-style="button-text">
<lookup target-form-name="LookupGeoName" description-field-name="geoId"/>
</field>
<!-- This field may be hidden and the name rendered in geoName using default-value if geoId is known when loading the form-->
<field name="geoId" title="${uiLabelMap.CommonGeoId}"><text/></field><!-- the text field is only used for rendering. In the "real life" you would use the hidden field commented below to pass the data to the request -->
- <!--field name="geoId"><hidden/></field-->
+ <!--field name="geoId"><hidden/></field-->
+
<sort-order>
<field-group>
<sort-field name="geoIdAlone"/>
</field-group>
<field-group>
+ <sort-field name="geoIdStd"/>
+ </field-group>
+ <field-group>
+ <sort-field name="geoIdReadOnly"/>
+ </field-group>
+ <field-group>
<sort-field name="geoName"/>
<sort-field name="geoId"/>
</field-group>
Modified: ofbiz/branches/jackrabbit20120501/specialpurpose/example/widget/example/FormWidgetExampleScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/specialpurpose/example/widget/example/FormWidgetExampleScreens.xml?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/specialpurpose/example/widget/example/FormWidgetExampleScreens.xml (original)
+++ ofbiz/branches/jackrabbit20120501/specialpurpose/example/widget/example/FormWidgetExampleScreens.xml Tue Aug 7 06:25:59 2012
@@ -81,13 +81,12 @@ under the License.
</widgets>
</section>
</container>
- <container style="screenlet-body">
+ <container style="screenlet-body">
<container style="button-bar"><label style="h2">${uiLabelMap.ExampleLookupFieldsTitle}</label></container>
<container style="screenlet-body">
<label style="h3">${uiLabelMap.ExampleSourceCode}</label>
<label>${uiLabelMap.ExampleDefinitionName} "ExampleLookupFields" ${uiLabelMap.ExampleDefinitionFile}</label>
<link target="http://svn.apache.org/repos/asf/ofbiz/trunk/framework/example/widget/example/FormWidgetExampleForms.xml" url-mode="plain" target-window="svnPage" text="${uiLabelMap.ExampleDefinitionFileTooltip}" style="buttontext"/>
- <label>${uiLabelMap.ExampleLookupFields}</label>
<include-form name="ExampleLookupFields" location="component://example/widget/example/FormWidgetExampleForms.xml"/>
</container>
</container>
Modified: ofbiz/branches/jackrabbit20120501/specialpurpose/exampleext/widget/example/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/specialpurpose/exampleext/widget/example/CommonScreens.xml?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/specialpurpose/exampleext/widget/example/CommonScreens.xml (original)
+++ ofbiz/branches/jackrabbit20120501/specialpurpose/exampleext/widget/example/CommonScreens.xml Tue Aug 7 06:25:59 2012
@@ -46,7 +46,7 @@ under the License.
<condition>
<and>
<if-has-permission permission="EXAMPLE" action="_VIEW"/>
- <not><if-empty field="example"/></not>
+ <not><if-empty field="example"/></not><!-- This is an example of check useful when only seed data are loaded -->
</and>
</condition>
<widgets>
@@ -63,7 +63,7 @@ under the License.
<widgets>
<section>
<condition>
- <not><if-empty field="example"/></not>
+ <not><if-empty field="example"/></not><!-- This is a check useful when only seed data are loaded -->
</condition>
<widgets>
<container style="h1"><label>${uiLabelMap[titleProperty]} ${uiLabelMap.CommonFor} ${example.exampleName} [${exampleId}]</label></container>
Modified: ofbiz/branches/jackrabbit20120501/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/web.xml?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/web.xml (original)
+++ ofbiz/branches/jackrabbit20120501/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/web.xml Tue Aug 7 06:25:59 2012
@@ -34,11 +34,6 @@ under the License.
<description>A unique name used to identify/recognize the local dispatcher for the Service Engine</description>
</context-param>
<context-param>
- <param-name>serviceReaderUrls</param-name>
- <param-value>/WEB-INF/services.xml</param-value>
- <description>Configuration File(s) For The Service Dispatcher</description>
- </context-param>
- <context-param>
<param-name>entityDelegatorName</param-name>
<param-value>default</param-value>
<description>The Name of the Entity Delegator to use, defined in entityengine.xml</description>
Modified: ofbiz/branches/jackrabbit20120501/specialpurpose/ofbizwebsite/webapp/ofbiz/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/specialpurpose/ofbizwebsite/webapp/ofbiz/WEB-INF/web.xml?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/specialpurpose/ofbizwebsite/webapp/ofbiz/WEB-INF/web.xml (original)
+++ ofbiz/branches/jackrabbit20120501/specialpurpose/ofbizwebsite/webapp/ofbiz/WEB-INF/web.xml Tue Aug 7 06:25:59 2012
@@ -35,11 +35,6 @@ under the License.
<description>A unique name used to identify/recognize the local dispatcher for the Service Engine</description>
</context-param>
<context-param>
- <param-name>serviceReaderUrls</param-name>
- <param-value>/WEB-INF/services.xml</param-value>
- <description>Configuration File(s) For The Service Dispatcher</description>
- </context-param>
- <context-param>
<param-name>entityDelegatorName</param-name>
<param-value>default</param-value>
<description>The Name of the Entity Delegator to use, defined in entityengine.xml</description>
Modified: ofbiz/branches/jackrabbit20120501/specialpurpose/pos/config/xpos.properties
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/specialpurpose/pos/config/xpos.properties?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/specialpurpose/pos/config/xpos.properties (original)
+++ ofbiz/branches/jackrabbit20120501/specialpurpose/pos/config/xpos.properties Tue Aug 7 06:25:59 2012
@@ -1,34 +1,35 @@
###############################################################################
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
###############################################################################
#
-# Dynamically modified by OFBiz Framework (org.ofbiz.base.util : UtilProperties.setPropertyValue)
-# The comments have been removed, you may still find them on the OFBiz repository...
+# By default the screen is 1024x768 wide. If you want to use another screen size,
+# you must create a new directory under specialpurpose/pos/screens, like the 800x600.
+# You must also set the 3 related parameters (StartClass, ClientWidth, ClientHeight) accordingly.
#
-#Sat Apr 21 21:10:40 CEST 2012
+
+StartPackage=org.ofbiz.pos
+StartClass=default/pospanel
+LogLevel=0
+StyleFile=posstyles.xml
CenterWin=true
ClientHeight=768
-Language=XuiLabels_fr
ClientWidth=1024
-StartClass=default/pospanel
+Language=XuiLabels
Title=OFBiz POS
-StyleFile=posstyles.xml
UseWindow=false
UseFrames=false
-LogLevel=0
-StartPackage=org.ofbiz.pos
Modified: ofbiz/branches/jackrabbit20120501/specialpurpose/pos/ofbiz-component.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/specialpurpose/pos/ofbiz-component.xml?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/specialpurpose/pos/ofbiz-component.xml (original)
+++ ofbiz/branches/jackrabbit20120501/specialpurpose/pos/ofbiz-component.xml Tue Aug 7 06:25:59 2012
@@ -33,5 +33,34 @@ under the License.
<entity-resource type="data" reader-name="seed" loader="main" location="data/PosTypeData.xml"/>
<entity-resource type="data" reader-name="demo" loader="main" location="data/DemoRetail.xml"/>
<entity-resource type="data" reader-name="demo" loader="main" location="data/PosSyncSettings.xml"/>
+
+ <!-- load the JPOS devices -->
+ <container name="jpos.device-container" loaders="pos" class="org.ofbiz.pos.container.JposDeviceContainer">
+ <property name="CashDrawer.1" value="NullCashDrawer"/>
+ <property name="Receipt" value="NullReceipt"/>
+ <!--property name="Receipt" value="TM-T88III"/-->
+ <!--property name="Receipt" value="StarTSP600"/-->
+ <property name="Keyboard" value="GenericKeyboard"/>
+ <property name="Scanner" value="GenericScanner"/>
+ <property name="Msr" value="TestMsr"/>
+ <property name="PinPad" value="[NOT IMPLEMENTED]"/>
+ <property name="Journal" value="[NOT IMPLEMENTED]"/>
+ <property name="LineDisplay" value="[NOT IMPLEMENTED]"/>
+ <property name="CheckScanner" value="[NOT IMPLEMENTED]"/>
+ <property name="SignatureCapture" value="[NOT IMPLEMENTED]"/>
+ </container>
+
+ <!-- load the POS GUI -->
+ <container name="pos-container" loaders="pos" class="org.ofbiz.pos.container.PosContainer">
+ <property name="startup-directory" value="specialpurpose/pos/config/"/>
+ <property name="startup-file" value="xpos.properties"/>
+ <property name="class-package-name " value="net.xoetrope.swing"/>
+ <property name="dispatcher-name" value="POSDispatcher"/>
+ <property name="delegator-name" value="default"/>
+ <property name="xui-session-id" value="pos-1"/>
+ <property name="facility-id" value="MyRetailStore"/>
+ <property name="look-and-feel" value="com.jgoodies.looks.plastic.PlasticLookAndFeel"/>
+ </container>
+
</ofbiz-component>
Modified: ofbiz/branches/jackrabbit20120501/specialpurpose/pos/src/org/ofbiz/guiapp/xui/XuiContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/specialpurpose/pos/src/org/ofbiz/guiapp/xui/XuiContainer.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/specialpurpose/pos/src/org/ofbiz/guiapp/xui/XuiContainer.java (original)
+++ ofbiz/branches/jackrabbit20120501/specialpurpose/pos/src/org/ofbiz/guiapp/xui/XuiContainer.java Tue Aug 7 06:25:59 2012
@@ -31,9 +31,9 @@ import org.ofbiz.base.container.Containe
import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.DelegatorFactory;
-import org.ofbiz.service.GenericDispatcher;
import org.ofbiz.service.LocalDispatcher;
import org.ofbiz.base.util.UtilProperties;
+import org.ofbiz.service.ServiceContainer;
public abstract class XuiContainer implements Container {
@@ -43,20 +43,22 @@ public abstract class XuiContainer imple
protected String startupDir = null;
protected String startupFile = null;
protected String configFile = null;
+ protected String name;
- public void init(String[] args, String configFile) throws ContainerException {
+ public void init(String[] args, String name, String configFile) throws ContainerException {
+ this.name = name;
this.configFile = configFile;
}
public boolean start() throws ContainerException {
// make sure the subclass sets the config name
- if (this.getContainerConfigName() == null) {
+ if (name == null) {
throw new ContainerException("Unknown container config name");
}
// get the container config
- ContainerConfig.Container cc = ContainerConfig.getContainer(this.getContainerConfigName(), configFile);
+ ContainerConfig.Container cc = ContainerConfig.getContainer(name, configFile);
if (cc == null) {
- throw new ContainerException("No " + this.getContainerConfigName() + " configuration found in container config!");
+ throw new ContainerException("No " + name + " configuration found in container config!");
}
// get the delegator
@@ -66,12 +68,12 @@ public abstract class XuiContainer imple
// get the dispatcher
String dispatcherName = ContainerConfig.getPropertyValue(cc, "dispatcher-name", "xui-dispatcher");
- LocalDispatcher dispatcher = GenericDispatcher.getLocalDispatcher(dispatcherName, delegator);
+ LocalDispatcher dispatcher = ServiceContainer.getLocalDispatcher(dispatcherName, delegator);
// get the pre-defined session ID
String xuiSessionId = ContainerConfig.getPropertyValue(cc, "xui-session-id", null);
if (UtilValidate.isEmpty(xuiSessionId)) {
- throw new ContainerException("No xui-session-id value set in " + this.getContainerConfigName() + "!");
+ throw new ContainerException("No xui-session-id value set in " + name + "!");
}
String laf = ContainerConfig.getPropertyValue(cc, "look-and-feel", null);
@@ -108,16 +110,15 @@ public abstract class XuiContainer imple
public void stop() throws ContainerException {
}
+ public String getName() {
+ return name;
+ }
+
public String getXuiPropertiesName() {
return this.startupFile;
}
/**
- * @return String the name of the container name property
- */
- public abstract String getContainerConfigName();
-
- /**
* Implementation specific configuration from the container config
* This method is called after the initial XUI configuration, after
* the session creation; before the initial screen is rendered.
Modified: ofbiz/branches/jackrabbit20120501/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java (original)
+++ ofbiz/branches/jackrabbit20120501/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java Tue Aug 7 06:25:59 2012
@@ -67,6 +67,7 @@ import org.ofbiz.order.shoppingcart.Shop
import org.ofbiz.order.shoppinglist.ShoppingListEvents;
import org.ofbiz.party.contact.ContactMechWorker;
import org.ofbiz.pos.component.Journal;
+import org.ofbiz.pos.component.JournalLineParams;
import org.ofbiz.pos.component.Output;
import org.ofbiz.pos.device.DeviceLoader;
import org.ofbiz.pos.device.impl.Receipt;
@@ -955,12 +956,14 @@ public class PosTransaction implements S
BigDecimal subTotal = unitPrice.multiply(quantity);
BigDecimal adjustment = item.getOtherAdjustments();
- XModel line = Journal.appendNode(model, "tr", ""+cart.getItemIndex(item), "");
- Journal.appendNode(line, "td", "sku", item.getProductId());
- Journal.appendNode(line, "td", "desc", item.getName());
- Journal.appendNode(line, "td", "qty", UtilFormatOut.formatQuantity(quantity));
- Journal.appendNode(line, "td", "price", UtilFormatOut.formatPrice(subTotal));
- Journal.appendNode(line, "td", "index", Integer.toString(cart.getItemIndex(item)));
+ XModel line = Journal.appendNode(new JournalLineParams(model, "tr", "" + cart.getItemIndex(item), ""));
+ JournalLineParams sku = new JournalLineParams(line, "td", "sku", item.getProductId());
+ JournalLineParams desc = new JournalLineParams(line, "td", "desc", item.getName());
+ JournalLineParams qty = new JournalLineParams(line, "td", "qty", UtilFormatOut.formatQuantity(quantity));
+ JournalLineParams price = new JournalLineParams(line, "td", "price", UtilFormatOut.formatPrice(subTotal));
+ JournalLineParams index = new JournalLineParams(line, "td", "index", Integer.toString(cart.getItemIndex(item)));
+ JournalLineParams[] journalLineParamses = new JournalLineParams[] {sku, desc, qty, price, index};
+ appendJouralLine(journalLineParamses);
if (this.isAggregatedItem(item.getProductId())) {
// put alterations here
@@ -971,27 +974,48 @@ public class PosTransaction implements S
List<ConfigOption> selected = pcw.getSelectedOptions();
for (ConfigOption configoption : selected) {
if (configoption.isSelected()) {
- XModel option = Journal.appendNode(model, "tr", ""+cart.getItemIndex(item), "");
- Journal.appendNode(option, "td", "sku", "");
- Journal.appendNode(option, "td", "desc", configoption.getDescription());
- Journal.appendNode(option, "td", "qty", "");
- Journal.appendNode(option, "td", "price", UtilFormatOut.formatPrice(configoption.getPrice()));
- Journal.appendNode(option, "td", "index", Integer.toString(cart.getItemIndex(item)));
+ XModel option = Journal.appendNode(new JournalLineParams(model, "tr", "" + cart.getItemIndex(item), ""));
+ sku = new JournalLineParams(option, "td", "sku", "");
+ desc = new JournalLineParams(option, "td", "desc", configoption.getDescription());
+ qty = new JournalLineParams(option, "td", "qty", "");
+ price = new JournalLineParams(option, "td", "price", UtilFormatOut.formatPrice(configoption.getPrice()));
+ index = new JournalLineParams(option, "td", "index", Integer.toString(cart.getItemIndex(item)));
+ journalLineParamses = new JournalLineParams[] {sku, desc, qty, price, index};
+ appendJouralLine(journalLineParamses);
}
}
}
if (adjustment.compareTo(BigDecimal.ZERO) != 0) {
// append the promo info
- XModel promo = Journal.appendNode(model, "tr", "itemadjustment", "");
- Journal.appendNode(promo, "td", "sku", "");
- Journal.appendNode(promo, "td", "desc", UtilProperties.getMessage(resource, "PosItemDiscount", locale));
- Journal.appendNode(promo, "td", "qty", "");
- Journal.appendNode(promo, "td", "price", UtilFormatOut.formatPrice(adjustment));
+ XModel promo = Journal.appendNode(new JournalLineParams(model, "tr", "itemadjustment", ""));
+ sku = new JournalLineParams(promo, "td", "sku", "");
+ desc = new JournalLineParams(promo, "td", "desc", UtilProperties.getMessage(resource, "PosItemDiscount", locale));
+ qty = new JournalLineParams(promo, "td", "qty", "");
+ price = new JournalLineParams(promo, "td", "price", UtilFormatOut.formatPrice(adjustment));
+ journalLineParamses = new JournalLineParams[] {sku, desc, qty, price, index};
+ appendJouralLine(journalLineParamses);
}
}
}
}
+
+ private void appendJouralLine(JournalLineParams[] journalLineParamses) {
+ if (locale.getLanguage().equals("ar")) {
+ int startParamIndex = 2;
+ if (journalLineParamses.length == 4)
+ startParamIndex = 1;
+ for (int p = journalLineParamses.length - startParamIndex; p >= 0; p--) {
+ Journal.appendNode(journalLineParamses[p]);
+ }
+ if (startParamIndex == 2)
+ Journal.appendNode(journalLineParamses[journalLineParamses.length - 1]);
+ } else {
+ for (int p = 0; p < journalLineParamses.length; p++) {
+ Journal.appendNode(journalLineParamses[p]);
+ }
+ }
+ }
public void appendTotalDataModel(XModel model) {
if (cart != null) {
@@ -1012,36 +1036,42 @@ public class PosTransaction implements S
for (GenericValue orderAdjustment : adjustments) {
BigDecimal amount = orderAdjustment.getBigDecimal("amount");
BigDecimal sourcePercentage = orderAdjustment.getBigDecimal("sourcePercentage");
- XModel adjustmentLine = Journal.appendNode(model, "tr", "adjustment", "");
- Journal.appendNode(adjustmentLine, "td", "sku", "");
- Journal.appendNode(adjustmentLine, "td", "desc",
+ XModel adjustmentLine = Journal.appendNode(new JournalLineParams(model, "tr", "adjustment", ""));
+ JournalLineParams[] journalLineParamses = new JournalLineParams[5];
+ journalLineParamses[0] = new JournalLineParams(adjustmentLine, "td", "sku", "");
+ journalLineParamses[1] = new JournalLineParams(adjustmentLine, "td", "desc",
UtilProperties.getMessage(resource, "PosSalesDiscount", locale));
if (UtilValidate.isNotEmpty(amount)) {
- Journal.appendNode(adjustmentLine, "td", "qty", "");
- Journal.appendNode(adjustmentLine, "td", "price", UtilFormatOut.formatPrice(amount));
+ journalLineParamses[2] = new JournalLineParams(adjustmentLine, "td", "qty", "");
+ journalLineParamses[3] = new JournalLineParams(adjustmentLine, "td", "price", UtilFormatOut.formatPrice(amount));
} else if (UtilValidate.isNotEmpty(sourcePercentage)) {
BigDecimal percentage = sourcePercentage.movePointLeft(2).negate(); // sourcePercentage is negative and must be show as a positive value (it's a discount not an amount)
- Journal.appendNode(adjustmentLine, "td", "qty", UtilFormatOut.formatPercentage(percentage));
+ journalLineParamses[2] = new JournalLineParams(adjustmentLine, "td", "qty", UtilFormatOut.formatPercentage(percentage));
amount = cart.getItemTotal().add(itemsAdjustmentsAmount).multiply(percentage); // itemsAdjustmentsAmount is negative
- Journal.appendNode(adjustmentLine, "td", "price", UtilFormatOut.formatPrice(amount.negate())); // amount must be shown as a negative value
+ journalLineParamses[3] = new JournalLineParams(adjustmentLine, "td", "price", UtilFormatOut.formatPrice(amount.negate())); // amount must be shown as a negative value
}
- Journal.appendNode(adjustmentLine, "td", "index", "-1");
+ journalLineParamses[4] = new JournalLineParams(adjustmentLine, "td", "index", "-1");
+ appendJouralLine(journalLineParamses);
}
- XModel taxLine = Journal.appendNode(model, "tr", "tax", "");
- Journal.appendNode(taxLine, "td", "sku", "");
-
- Journal.appendNode(taxLine, "td", "desc", UtilProperties.getMessage(resource, "PosSalesTax", locale));
- Journal.appendNode(taxLine, "td", "qty", "");
- Journal.appendNode(taxLine, "td", "price", UtilFormatOut.formatPrice(taxAmount));
- Journal.appendNode(taxLine, "td", "index", "-1");
-
- XModel totalLine = Journal.appendNode(model, "tr", "total", "");
- Journal.appendNode(totalLine, "td", "sku", "");
- Journal.appendNode(totalLine, "td", "desc", UtilProperties.getMessage(resource, "PosGrandTotal", locale));
- Journal.appendNode(totalLine, "td", "qty", "");
- Journal.appendNode(totalLine, "td", "price", UtilFormatOut.formatPrice(total));
- Journal.appendNode(totalLine, "td", "index", "-1");
+ XModel taxLine = Journal.appendNode(new JournalLineParams(model, "tr", "tax", ""));
+ JournalLineParams[] journalTaxLineParamses = new JournalLineParams[5];
+ journalTaxLineParamses[0] = new JournalLineParams(taxLine, "td", "sku", "");
+
+ journalTaxLineParamses[1] = new JournalLineParams(taxLine, "td", "desc", UtilProperties.getMessage(resource, "PosSalesTax", locale));
+ journalTaxLineParamses[2] = new JournalLineParams(taxLine, "td", "qty", "");
+ journalTaxLineParamses[3] = new JournalLineParams(taxLine, "td", "price", UtilFormatOut.formatPrice(taxAmount));
+ journalTaxLineParamses[4] = new JournalLineParams(taxLine, "td", "index", "-1");
+ appendJouralLine(journalTaxLineParamses);
+
+ XModel totalLine = Journal.appendNode(new JournalLineParams(model, "tr", "total", ""));
+ JournalLineParams[] journalTotalLineParamses = new JournalLineParams[5];
+ journalTotalLineParamses[0] = new JournalLineParams(totalLine, "td", "sku", "");
+ journalTotalLineParamses[1] = new JournalLineParams(totalLine, "td", "desc", UtilProperties.getMessage(resource, "PosGrandTotal", locale));
+ journalTotalLineParamses[2] = new JournalLineParams(totalLine, "td", "qty", "");
+ journalTotalLineParamses[3] = new JournalLineParams(totalLine, "td", "price", UtilFormatOut.formatPrice(total));
+ journalTotalLineParamses[4] = new JournalLineParams(totalLine, "td", "index", "-1");
+ appendJouralLine(journalTotalLineParamses);
}
}
@@ -1074,12 +1104,14 @@ public class PosTransaction implements S
amount = inf.amount;
}
- XModel paymentLine = Journal.appendNode(model, "tr", Integer.toString(i), "");
- Journal.appendNode(paymentLine, "td", "sku", "");
- Journal.appendNode(paymentLine, "td", "desc", descString);
- Journal.appendNode(paymentLine, "td", "qty", "-");
- Journal.appendNode(paymentLine, "td", "price", UtilFormatOut.formatPrice(amount.negate()));
- Journal.appendNode(paymentLine, "td", "index", Integer.toString(i));
+ XModel paymentLine = Journal.appendNode(new JournalLineParams(model, "tr", Integer.toString(i), ""));
+ JournalLineParams[] journalPaymentLineParamses = new JournalLineParams[5];
+ journalPaymentLineParamses[0] = new JournalLineParams(paymentLine, "td", "sku", "");
+ journalPaymentLineParamses[1] = new JournalLineParams(paymentLine, "td", "desc", descString);
+ journalPaymentLineParamses[2] = new JournalLineParams(paymentLine, "td", "qty", "-");
+ journalPaymentLineParamses[3] = new JournalLineParams(paymentLine, "td", "price", UtilFormatOut.formatPrice(amount.negate()));
+ journalPaymentLineParamses[4] = new JournalLineParams(paymentLine, "td", "index", Integer.toString(i));
+ appendJouralLine(journalPaymentLineParamses);
}
}
}
@@ -1088,11 +1120,13 @@ public class PosTransaction implements S
if (cart != null) {
BigDecimal changeDue = this.getTotalDue().negate();
if (changeDue.compareTo(BigDecimal.ZERO) >= 0) {
- XModel changeLine = Journal.appendNode(model, "tr", "", "");
- Journal.appendNode(changeLine, "td", "sku", "");
- Journal.appendNode(changeLine, "td", "desc", "Change");
- Journal.appendNode(changeLine, "td", "qty", "-");
- Journal.appendNode(changeLine, "td", "price", UtilFormatOut.formatPrice(changeDue));
+ XModel changeLine = Journal.appendNode(new JournalLineParams(model, "tr", "", ""));
+ JournalLineParams[] journalPaymentLineParamses = new JournalLineParams[4];
+ journalPaymentLineParamses[0] = new JournalLineParams(changeLine, "td", "sku", "");
+ journalPaymentLineParamses[1] = new JournalLineParams(changeLine, "td", "desc", "Change");
+ journalPaymentLineParamses[2] = new JournalLineParams(changeLine, "td", "qty", "-");
+ journalPaymentLineParamses[3] = new JournalLineParams(changeLine, "td", "price", UtilFormatOut.formatPrice(changeDue));
+ appendJouralLine(journalPaymentLineParamses);
}
}
}
Modified: ofbiz/branches/jackrabbit20120501/specialpurpose/pos/src/org/ofbiz/pos/component/Journal.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/specialpurpose/pos/src/org/ofbiz/pos/component/Journal.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/specialpurpose/pos/src/org/ofbiz/pos/component/Journal.java (original)
+++ ofbiz/branches/jackrabbit20120501/specialpurpose/pos/src/org/ofbiz/pos/component/Journal.java Tue Aug 7 06:25:59 2012
@@ -87,9 +87,13 @@ public class Journal {
jtable.setModel(jmodel);
for (int i = 0; i < width.length; i++) {
+ if (defaultLocale.getLanguage().equals("ar")) {
+ jtable.setColWidth(width.length - i - 1, width[i]);
+ } else {
jtable.setColWidth(i, width[i]);
}
}
+ }
jtable.setSelectedRow(0);
}
@@ -172,26 +176,33 @@ public class Journal {
}
jmodel.setTagName("table");
// create the header
- XModel headerNode = appendNode(jmodel, "th", "header", "");
+ XModel headerNode = appendNode(new JournalLineParams(jmodel, "th", "header", ""));
+ if (defaultLocale.getLanguage().equals("ar")) {
+ for (int i = field.length - 1; i >= 0; i--) {
+ appendNode(new JournalLineParams(headerNode, "td", field[i], UtilProperties.getMessage(PosTransaction.resource, name[i], defaultLocale)));
+ }
+ } else {
for (int i = 0 ; i < field.length; i++) {
- appendNode(headerNode, "td", field[i],UtilProperties.getMessage(PosTransaction.resource,name[i],defaultLocale));
+ appendNode(new JournalLineParams(headerNode, "td", field[i], UtilProperties.getMessage(PosTransaction.resource, name[i], defaultLocale)));
+ }
}
return jmodel;
}
private void appendEmpty(XModel jmodel) {
- XModel headerNode = appendNode(jmodel, "tr", "emptyrow", "");
+ XModel headerNode = appendNode(new JournalLineParams(jmodel, "tr", "emptyrow", ""));
for (int i = 0 ; i < field.length; i++) {
- appendNode(headerNode, "td", field[i], "");
+ appendNode(new JournalLineParams(headerNode, "td", field[i], ""));
}
}
- public static XModel appendNode(XModel node, String tag, String name, String value) {
- XModel newNode = (XModel) node.append(name);
- newNode.setTagName(tag);
- if (value != null) {
- newNode.set(value);
+ public static XModel appendNode(JournalLineParams journalLineParams) {
+ XModel newNode = (XModel) journalLineParams.getNode().append(journalLineParams.getName());
+ newNode.setTagName(journalLineParams.getTag());
+
+ if (journalLineParams.getValue() != null) {
+ newNode.set(journalLineParams.getValue());
}
return newNode;
}
Modified: ofbiz/branches/jackrabbit20120501/specialpurpose/pos/src/org/ofbiz/pos/container/JposDeviceContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/specialpurpose/pos/src/org/ofbiz/pos/container/JposDeviceContainer.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/specialpurpose/pos/src/org/ofbiz/pos/container/JposDeviceContainer.java (original)
+++ ofbiz/branches/jackrabbit20120501/specialpurpose/pos/src/org/ofbiz/pos/container/JposDeviceContainer.java Tue Aug 7 06:25:59 2012
@@ -31,12 +31,16 @@ public class JposDeviceContainer impleme
protected String configFile = null;
- public void init(String[] args, String configFile) throws ContainerException {
+ private String name;
+
+ public void init(String[] args, String name, String configFile) throws ContainerException {
this.configFile = configFile;
+ this.name = name;
}
+
public boolean start() throws ContainerException {
- ContainerConfig.Container cc = ContainerConfig.getContainer("jpos.device-container", configFile);
+ ContainerConfig.Container cc = ContainerConfig.getContainer(name, configFile);
if (cc == null) {
throw new ContainerException("No jpos.device-container configuration found in container config!");
}
@@ -63,4 +67,8 @@ public class JposDeviceContainer impleme
}
Debug.logInfo("JPOS Devices released and closed", module);
}
+
+ public String getName() {
+ return name;
+ }
}
Modified: ofbiz/branches/jackrabbit20120501/specialpurpose/pos/src/org/ofbiz/pos/container/PosContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/specialpurpose/pos/src/org/ofbiz/pos/container/PosContainer.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/specialpurpose/pos/src/org/ofbiz/pos/container/PosContainer.java (original)
+++ ofbiz/branches/jackrabbit20120501/specialpurpose/pos/src/org/ofbiz/pos/container/PosContainer.java Tue Aug 7 06:25:59 2012
@@ -33,11 +33,6 @@ import org.ofbiz.product.store.ProductSt
public class PosContainer extends XuiContainer {
@Override
- public String getContainerConfigName() {
- return "pos-container";
- }
-
- @Override
public void configure(ContainerConfig.Container cc) throws ContainerException {
XuiSession session = XuiContainer.getSession();
GenericValue productStore = null;
Modified: ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/MyWorkTests.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/MyWorkTests.xml?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/MyWorkTests.xml (original)
+++ ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/MyWorkTests.xml Tue Aug 7 06:25:59 2012
@@ -20,7 +20,7 @@ under the License.
<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods-v2.xsd">
- <simple-method method-name="testUpdateTimesheetEntryByWorkeffortNotComplete" short-description="Test update timesheet entry by workeffort" login-required="false" user-login-name="userLogin">
+ <simple-method method-name="testUpdateTimesheetEntryByWorkeffortNotComplete" short-description="Test update timesheet entry by workeffort" login-required="false">
<entity-one value-field="userLogin" entity-name="UserLogin">
<field-map field-name="userLoginId" value="scrumteam1"/>
</entity-one>
@@ -33,7 +33,7 @@ under the License.
<call-service service-name="updateTimesheetEntryByWorkeffort" in-map-name="inMap"></call-service>
</simple-method>
- <simple-method method-name="testUpdateTimesheetEntryByWorkeffortComplete" short-description="Test update timesheet entry by workeffort" login-required="false" user-login-name="userLogin">
+ <simple-method method-name="testUpdateTimesheetEntryByWorkeffortComplete" short-description="Test update timesheet entry by workeffort" login-required="false">
<entity-one value-field="userLogin" entity-name="UserLogin">
<field-map field-name="userLoginId" value="scrumteam1"/>
</entity-one>
@@ -45,7 +45,7 @@ under the License.
<set field="inMap.checkComplete" value="Y"/>
<call-service service-name="updateTimesheetEntryByWorkeffort" in-map-name="inMap"></call-service>
</simple-method>
- <simple-method method-name="testUpdateTask" short-description="Test update tasks" login-required="false" user-login-name="userLogin">
+ <simple-method method-name="testUpdateTask" short-description="Test update tasks" login-required="false">
<entity-one value-field="userLogin" entity-name="UserLogin">
<field-map field-name="userLoginId" value="scrumteam2"/>
</entity-one>
@@ -57,7 +57,7 @@ under the License.
<call-simple-method method-name="updateTask" xml-resource="component://scrum/script/org/ofbiz/scrum/ScrumEvents.xml"/>
</simple-method>
- <simple-method method-name="testRemoveTaskAssignToMe" short-description="Test remove task assign to me" login-required="false" user-login-name="userLogin">
+ <simple-method method-name="testRemoveTaskAssignToMe" short-description="Test remove task assign to me" login-required="false">
<entity-one value-field="userLogin" entity-name="UserLogin">
<field-map field-name="userLoginId" value="scrumteam2"/>
</entity-one>
@@ -73,7 +73,7 @@ under the License.
<call-service service-name="unassignPartyFromWorkEffort" in-map-name="parameters"></call-service>
</simple-method>
- <simple-method method-name="testAddNewTimesheet" short-description="Test add a new timesheet" login-required="false" user-login-name="userLogin">
+ <simple-method method-name="testAddNewTimesheet" short-description="Test add a new timesheet" login-required="false">
<entity-one value-field="userLogin" entity-name="UserLogin">
<field-map field-name="userLoginId" value="scrumteam2"/>
</entity-one>
@@ -83,7 +83,7 @@ under the License.
<call-service service-name="createTimesheetForThisWeek" in-map-name="inMap" >
</call-service>
</simple-method>
- <simple-method method-name="testSetTimeSheetStatusToComplete" short-description="Test set timesheet status to complete" login-required="false" user-login-name="userLogin">
+ <simple-method method-name="testSetTimeSheetStatusToComplete" short-description="Test set timesheet status to complete" login-required="false">
<entity-one value-field="userLogin" entity-name="UserLogin">
<field-map field-name="userLoginId" value="scrumteam2"/>
</entity-one>
Modified: ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/ProductBacklogTest.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/ProductBacklogTest.xml?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/ProductBacklogTest.xml (original)
+++ ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/ProductBacklogTest.xml Tue Aug 7 06:25:59 2012
@@ -183,20 +183,6 @@ under the License.
<simple-method method-name="testNewProductBacklogEmail" short-description="Test New Product Backlog Email" login-required="false">
<entity-one value-field="userLogin" entity-name="UserLogin">
- <field-map field-name="userLoginId" value="admin"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="parameters.productId" value="DEMO-PRODUCT-1"/>
- <set field="parameters.custRequestId" value="TEST10"/>
- <set field="parameters.communicationEventTypeId" value="EMAIL_COMMUNICATION" />
- <set field="parameters.partyIdFrom" value="DemoCustomer-1"/>
- <set field="parameters.partyIdTo" value="SCRUMASTER"/>
- <set field="parameters.subject" value="Test New Product Backlog Email"/>
- <call-service service-name="createCommunicationEvent" in-map-name="parameters"></call-service>
- </simple-method>
-
- <simple-method method-name="testNewProductBacklogEmail" short-description="Test New Product Backlog Email" login-required="false">
- <entity-one value-field="userLogin" entity-name="UserLogin">
<field-map field-name="userLoginId" value="system"/>
</entity-one>
<set field="serviceCtx.userLogin" from-field="userLogin"/>
Modified: ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/ProductTest.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/ProductTest.xml?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/ProductTest.xml (original)
+++ ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/ProductTest.xml Tue Aug 7 06:25:59 2012
@@ -21,7 +21,7 @@ under the License.
<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods-v2.xsd">
- <simple-method method-name="testCreateProductByAdmin" short-description="" login-required="false" user-login-name="userLogin">
+ <simple-method method-name="testCreateProductByAdmin" short-description="" login-required="false">
<entity-one value-field="userLogin" entity-name="UserLogin">
<field-map field-name="userLoginId" value="admin"/>
</entity-one>
@@ -36,7 +36,7 @@ under the License.
<call-simple-method method-name="createProductAndRole" xml-resource="component://scrum/script/org/ofbiz/scrum/ScrumEvents.xml"/>
</simple-method>
- <simple-method method-name="testUpdateProductByAdmin" short-description="" login-required="false" user-login-name="userLogin">
+ <simple-method method-name="testUpdateProductByAdmin" short-description="" login-required="false">
<entity-one value-field="userLogin" entity-name="UserLogin">
<field-map field-name="userLoginId" value="admin"/>
</entity-one>
@@ -53,7 +53,7 @@ under the License.
</simple-method>
<!-- Billing -->
- <simple-method method-name="testAddProductTimeToNewInvoice" short-description="Test Add Product Time To New Invoice" login-required="false" user-login-name="userLogin">
+ <simple-method method-name="testAddProductTimeToNewInvoice" short-description="Test Add Product Time To New Invoice" login-required="false">
<entity-one entity-name="UserLogin" value-field="userLogin">
<field-map field-name="userLoginId" value="system"/>
</entity-one>
Modified: ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/QATests.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/QATests.xml?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/QATests.xml (original)
+++ ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/QATests.xml Tue Aug 7 06:25:59 2012
@@ -20,7 +20,7 @@ under the License.
<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods-v2.xsd">
- <simple-method method-name="testCreateTestTask" short-description="" login-required="false" user-login-name="userLogin">
+ <simple-method method-name="testCreateTestTask" short-description="" login-required="false">
<entity-one value-field="userLogin" entity-name="UserLogin">
<field-map field-name="userLoginId" value="testadmin"/>
</entity-one>
Modified: ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/ScrumProjectTests.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/ScrumProjectTests.xml?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/ScrumProjectTests.xml (original)
+++ ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/ScrumProjectTests.xml Tue Aug 7 06:25:59 2012
@@ -66,7 +66,7 @@ under the License.
<call-simple-method method-name="updateScrumProject" xml-resource="component://scrum/script/org/ofbiz/scrum/ScrumEvents.xml"/>
</simple-method>
- <simple-method method-name="testCloseScrumProject" short-description="Test Close Scrum Project " login-required="false" user-login-name="userLogin">
+ <simple-method method-name="testCloseScrumProject" short-description="Test Close Scrum Project " login-required="false">
<entity-one value-field="userLogin" entity-name="UserLogin">
<field-map field-name="userLoginId" value="admin"/>
</entity-one>
Modified: ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/SprintBacklogTests.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/SprintBacklogTests.xml?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/SprintBacklogTests.xml (original)
+++ ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/SprintBacklogTests.xml Tue Aug 7 06:25:59 2012
@@ -20,7 +20,7 @@ under the License.
<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods-v2.xsd">
- <simple-method method-name="testcreateSprintBacklogByAdmin" short-description="" login-required="false" user-login-name="userLogin">
+ <simple-method method-name="testcreateSprintBacklogByAdmin" short-description="" login-required="false">
<entity-one value-field="userLogin" entity-name="UserLogin">
<field-map field-name="userLoginId" value="admin"/>
</entity-one>
@@ -31,7 +31,7 @@ under the License.
<call-simple-method method-name="createSprintBacklog" xml-resource="component://scrum/script/org/ofbiz/scrum/ScrumEvents.xml"/>
</simple-method>
- <simple-method method-name="testcreateSprintBacklogByScrummaster" short-description="" login-required="false" user-login-name="userLogin">
+ <simple-method method-name="testcreateSprintBacklogByScrummaster" short-description="" login-required="false">
<entity-one value-field="userLogin" entity-name="UserLogin">
<field-map field-name="userLoginId" value="scrummaster"/>
</entity-one>
Modified: ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/TaskTests.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/TaskTests.xml?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/TaskTests.xml (original)
+++ ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/TaskTests.xml Tue Aug 7 06:25:59 2012
@@ -21,7 +21,7 @@ under the License.
<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods-v2.xsd">
- <simple-method method-name="testViewScrumRevision" short-description="Test View Scrum Revision" login-required="false" user-login-name="userLogin">
+ <simple-method method-name="testViewScrumRevision" short-description="Test View Scrum Revision" login-required="false">
<entity-one value-field="userLogin" entity-name="UserLogin">
<field-map field-name="userLoginId" value="system"/>
</entity-one>
@@ -40,7 +40,7 @@ under the License.
</assert>
<check-errors/>
</simple-method>
- <simple-method method-name="testRetrieveMissingScrumRevision" short-description="Test Retrieve Missing Scrum Revision" login-required="false" user-login-name="userLogin">
+ <simple-method method-name="testRetrieveMissingScrumRevision" short-description="Test Retrieve Missing Scrum Revision" login-required="false">
<entity-one value-field="userLogin" entity-name="UserLogin">
<field-map field-name="userLoginId" value="system"/>
</entity-one>
@@ -58,7 +58,7 @@ under the License.
</assert>
<check-errors/>
</simple-method>
- <simple-method method-name="testRemoveDuplicateScrumRevision" short-description="Test Remove Duplicate Scrum Revision" login-required="false" user-login-name="userLogin">
+ <simple-method method-name="testRemoveDuplicateScrumRevision" short-description="Test Remove Duplicate Scrum Revision" login-required="false">
<entity-one value-field="userLogin" entity-name="UserLogin">
<field-map field-name="userLoginId" value="system"/>
</entity-one>
Modified: ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/TimesheetTests.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/TimesheetTests.xml?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/TimesheetTests.xml (original)
+++ ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/script/org/ofbiz/scrum/test/TimesheetTests.xml Tue Aug 7 06:25:59 2012
@@ -21,7 +21,7 @@ under the License.
<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods-v2.xsd">
- <simple-method method-name="testTimesheetToComplete" short-description="Test set timesheet status to complete" login-required="false" user-login-name="userLogin">
+ <simple-method method-name="testTimesheetToComplete" short-description="Test set timesheet status to complete" login-required="false">
<entity-one value-field="userLogin" entity-name="UserLogin">
<field-map field-name="userLoginId" value="scrumteam2"/>
</entity-one>
@@ -30,7 +30,7 @@ under the License.
<set field="inMap.statusId" value="TIMESHEET_COMPLETED"/>
<call-service service-name="updateTimesheet" in-map-name="inMap"></call-service>
</simple-method>
- <simple-method method-name="testTimesheetToInProcess" short-description="Test set timesheet status to In Process" login-required="false" user-login-name="userLogin">
+ <simple-method method-name="testTimesheetToInProcess" short-description="Test set timesheet status to In Process" login-required="false">
<entity-one value-field="userLogin" entity-name="UserLogin">
<field-map field-name="userLoginId" value="scrumteam2"/>
</entity-one>
Modified: ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/servicedef/services.xml?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/servicedef/services.xml (original)
+++ ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/servicedef/services.xml Tue Aug 7 06:25:59 2012
@@ -217,10 +217,6 @@ under the License.
<auto-attributes include="pk" mode="IN" optional="false"/>
<attribute name="hours" type="Double" mode="OUT" optional="true"/>
</service>
- <service name="createDefaultTask" engine="simple" invoke="createDefaultTask" auth="true"
- location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml">
- <attribute name="custRequestId" type="String" mode="IN" optional="false"/>
- </service>
<service name="checkSprintStatus" engine="simple" auth="true"
location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml" invoke="checkSprintStatus">
</service>
Modified: ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumServices.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumServices.java (original)
+++ ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumServices.java Tue Aug 7 06:25:59 2012
@@ -121,8 +121,8 @@ public class ScrumServices {
* <p>
* Use for view Scrum Revision
*
- * @param revision Revision number
- * @param repository Repository url
+ * @param ctx The DispatchContext that this service is operating in
+ * @param context Map containing the input parameters
* @return Map with the result of the service, the output parameters.
*/
public static Map<String, Object> viewScrumRevision(DispatchContext ctx, Map<String, ? extends Object> context) {
@@ -166,8 +166,8 @@ public class ScrumServices {
* <p>
* Use for retrieve the missing data of the Revision
*
- * @param latestRevision The latest revision number
- * @param repositoryRoot The repository root url
+ * @param ctx The DispatchContext that this service is operating in
+ * @param context Map containing the input parameters
* @return Map with the result of the service, the output parameters.
*/
public static Map<String, Object> retrieveMissingScrumRevision(DispatchContext ctx, Map<String, ? extends Object> context) {
@@ -259,7 +259,8 @@ public class ScrumServices {
* <p>
* Use for remove duplicate scrum revision
*
- * @param repositoryRoot The repository root url
+ * @param ctx The DispatchContext that this service is operating in
+ * @param context Map containing the input parameters
* @return Map with the result of the service.
*/
public static Map<String, Object> removeDuplicateScrumRevision(DispatchContext ctx, Map<String, ? extends Object> context) {
Modified: ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/testdef/scrumTests.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/testdef/scrumTests.xml?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/testdef/scrumTests.xml (original)
+++ ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/testdef/scrumTests.xml Tue Aug 7 06:25:59 2012
@@ -59,7 +59,7 @@ under the License.
<entity-xml action="load" entity-xml-url="component://scrum/data/scrumTypeData.xml"/>
</test-case>
<test-case case-name="scrum-security-data">
- <entity-xml action="load" entity-xml-url="component://scrum/data/scrumSecurityData.xml"/>
+ <entity-xml action="load" entity-xml-url="component://scrum/data/scrumSecurityGroupDemoData.xml"/>
</test-case>
<test-case case-name="scrum-demo-data">
<entity-xml action="load" entity-xml-url="component://scrum/data/scrumDemoData.xml"/>
Modified: ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/widget/scrumScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/widget/scrumScreens.xml?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/widget/scrumScreens.xml (original)
+++ ofbiz/branches/jackrabbit20120501/specialpurpose/scrum/widget/scrumScreens.xml Tue Aug 7 06:25:59 2012
@@ -2536,7 +2536,7 @@ under the License.
<container>
<label style="h2" text="${uiLabelMap.PartyEmailMessage}"/>
</container>
- <include-form name="allocateMsgToPartyForm" location="component://custserv/widget/CommunicationEventForms.xml"/>
+ <include-form name="allocateMsgToPartyForm" location="component://party/widget/partymgr/CommunicationEventForms.xml"/>
</screenlet>
</widgets>
</section>
Modified: ofbiz/branches/jackrabbit20120501/specialpurpose/webpos/webapp/webpos/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/specialpurpose/webpos/webapp/webpos/WEB-INF/web.xml?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/specialpurpose/webpos/webapp/webpos/WEB-INF/web.xml (original)
+++ ofbiz/branches/jackrabbit20120501/specialpurpose/webpos/webapp/webpos/WEB-INF/web.xml Tue Aug 7 06:25:59 2012
@@ -34,11 +34,6 @@
<description>A unique name used to identify/recognize the local dispatcher for the Service Engine</description>
</context-param>
<context-param>
- <param-name>serviceReaderUrls</param-name>
- <param-value>/WEB-INF/services.xml</param-value>
- <description>Configuration File(s) For The Service Dispatcher</description>
- </context-param>
- <context-param>
<param-name>entityDelegatorName</param-name>
<param-value>default</param-value>
<description>The Name of the Entity Delegator to use, defined in entityengine.xml</description>
Modified: ofbiz/branches/jackrabbit20120501/specialpurpose/webpos/webapp/webpos/search/CustomerAddress.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/specialpurpose/webpos/webapp/webpos/search/CustomerAddress.ftl?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/specialpurpose/webpos/webapp/webpos/search/CustomerAddress.ftl (original)
+++ ofbiz/branches/jackrabbit20120501/specialpurpose/webpos/webapp/webpos/search/CustomerAddress.ftl Tue Aug 7 06:25:59 2012
@@ -20,9 +20,9 @@ under the License.
<div class="screenlet-title-bar">
<ul>
<li class="h3">
- <a id="billingAddressSelected" href="javascript:void();">${uiLabelMap.WebPosBillingAddress}</a>
+ <a id="billingAddressSelected" href="javascript:void(0);">${uiLabelMap.WebPosBillingAddress}</a>
- <a id="shippingAddressSelected" href="javascript:void();">${uiLabelMap.WebPosShippingAddress}</a>
+ <a id="shippingAddressSelected" href="javascript:void(0);">${uiLabelMap.WebPosShippingAddress}</a>
</li>
</ul>
<br class="clear" />
Modified: ofbiz/branches/jackrabbit20120501/specialpurpose/workflow/src/org/ofbiz/workflow/WorkflowEngine.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/specialpurpose/workflow/src/org/ofbiz/workflow/WorkflowEngine.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/specialpurpose/workflow/src/org/ofbiz/workflow/WorkflowEngine.java (original)
+++ ofbiz/branches/jackrabbit20120501/specialpurpose/workflow/src/org/ofbiz/workflow/WorkflowEngine.java Tue Aug 7 06:25:59 2012
@@ -18,12 +18,12 @@
*******************************************************************************/
package org.ofbiz.workflow;
-import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import javax.transaction.Transaction;
+
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.StringUtil;
import org.ofbiz.base.util.UtilDateTime;
@@ -39,6 +39,7 @@ import org.ofbiz.service.ModelService;
import org.ofbiz.service.ServiceDispatcher;
import org.ofbiz.service.engine.AbstractEngine;
import org.ofbiz.service.job.AbstractJob;
+import org.ofbiz.service.job.InvalidJobException;
import org.ofbiz.service.job.Job;
import org.ofbiz.service.job.JobManagerException;
@@ -283,27 +284,28 @@ public class WorkflowEngine extends Abst
}
/** Workflow Runner class runs inside its own thread using the Scheduler API */
-@SuppressWarnings("serial")
class WorkflowRunner extends AbstractJob {
+ public static final String module = WorkflowRunner.class.getName();
+
GenericRequester requester;
WfProcess process;
String startActivityId;
+ private final long runtime = System.currentTimeMillis();
WorkflowRunner(WfProcess process, GenericRequester requester, String startActivityId) {
super(process.toString() + "." + System.currentTimeMillis(), process.toString());
this.process = process;
this.requester = requester;
this.startActivityId = startActivityId;
- runtime = new Date().getTime();
- }
-
- protected void finish() {
- runtime = -1;
}
@Override
- public void exec() {
+ public void exec() throws InvalidJobException {
+ if (currentState != State.QUEUED) {
+ throw new InvalidJobException("Illegal state change");
+ }
+ currentState = State.RUNNING;
try {
if (startActivityId != null)
process.start(startActivityId);
@@ -314,7 +316,17 @@ class WorkflowRunner extends AbstractJob
if (requester != null)
requester.receiveResult(null);
}
- finish();
+ currentState = State.FINISHED;
+ }
+
+ @Override
+ public long getRuntime() {
+ return runtime;
+ }
+
+ @Override
+ public boolean isValid() {
+ return currentState == State.CREATED;
}
}
Modified: ofbiz/branches/jackrabbit20120501/specialpurpose/workflow/src/org/ofbiz/workflow/client/StartActivityJob.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/specialpurpose/workflow/src/org/ofbiz/workflow/client/StartActivityJob.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/specialpurpose/workflow/src/org/ofbiz/workflow/client/StartActivityJob.java (original)
+++ ofbiz/branches/jackrabbit20120501/specialpurpose/workflow/src/org/ofbiz/workflow/client/StartActivityJob.java Tue Aug 7 06:25:59 2012
@@ -18,24 +18,24 @@
*******************************************************************************/
package org.ofbiz.workflow.client;
-import java.util.Date;
import java.util.HashMap;
import org.ofbiz.base.util.Debug;
import org.ofbiz.service.GenericRequester;
import org.ofbiz.service.job.AbstractJob;
+import org.ofbiz.service.job.InvalidJobException;
import org.ofbiz.workflow.WfActivity;
/**
* Workflow Client API - Start Activity Async-Job
*/
-@SuppressWarnings("serial")
public class StartActivityJob extends AbstractJob {
public static final String module = StartActivityJob.class.getName();
protected WfActivity activity = null;
protected GenericRequester requester = null;
+ private final long runtime = System.currentTimeMillis();
public StartActivityJob(WfActivity activity) {
this(activity, null);
@@ -45,19 +45,15 @@ public class StartActivityJob extends Ab
super(activity.toString() + "." + System.currentTimeMillis(), activity.toString());
this.activity = activity;
this.requester = requester;
- runtime = new Date().getTime();
if (Debug.verboseOn()) Debug.logVerbose("Created new StartActivityJob : " + activity, module);
}
- protected void finish() {
- runtime = -1;
- }
-
- /**
- * @see org.ofbiz.service.job.Job#exec()
- */
@Override
- public void exec() {
+ public void exec() throws InvalidJobException {
+ if (currentState != State.QUEUED) {
+ throw new InvalidJobException("Illegal state change");
+ }
+ currentState = State.RUNNING;
try {
Debug.logVerbose("Executing job now : " + activity, module);
activity.activate();
@@ -68,6 +64,16 @@ public class StartActivityJob extends Ab
if (requester != null)
requester.receiveThrowable(e);
}
- finish();
+ currentState = State.FINISHED;
+ }
+
+ @Override
+ public long getRuntime() {
+ return runtime;
+ }
+
+ @Override
+ public boolean isValid() {
+ return currentState == State.CREATED;
}
}
Modified: ofbiz/branches/jackrabbit20120501/specialpurpose/workflow/src/org/ofbiz/workflow/impl/WfExecutionObjectImpl.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/specialpurpose/workflow/src/org/ofbiz/workflow/impl/WfExecutionObjectImpl.java?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/specialpurpose/workflow/src/org/ofbiz/workflow/impl/WfExecutionObjectImpl.java (original)
+++ ofbiz/branches/jackrabbit20120501/specialpurpose/workflow/src/org/ofbiz/workflow/impl/WfExecutionObjectImpl.java Tue Aug 7 06:25:59 2012
@@ -42,8 +42,8 @@ import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.serialize.SerializeException;
import org.ofbiz.entity.serialize.XmlSerializer;
import org.ofbiz.service.DispatchContext;
-import org.ofbiz.service.GenericDispatcher;
import org.ofbiz.service.LocalDispatcher;
+import org.ofbiz.service.ServiceContainer;
import org.ofbiz.workflow.AlreadySuspended;
import org.ofbiz.workflow.CannotResume;
import org.ofbiz.workflow.CannotStop;
@@ -592,7 +592,7 @@ public abstract class WfExecutionObjectI
* @throws WfException
*/
protected LocalDispatcher getDispatcher() throws WfException {
- return GenericDispatcher.getLocalDispatcher(dispatcherName, getDelegator());
+ return ServiceContainer.getLocalDispatcher(dispatcherName, getDelegator());
}
private Map<String, Object> getContext() throws WfException {
Modified: ofbiz/branches/jackrabbit20120501/themes/bizznesstime/includes/header.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/themes/bizznesstime/includes/header.ftl?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/themes/bizznesstime/includes/header.ftl (original)
+++ ofbiz/branches/jackrabbit20120501/themes/bizznesstime/includes/header.ftl Tue Aug 7 06:25:59 2012
@@ -148,7 +148,7 @@ under the License.
<#--if webSiteId?exists && requestAttributes._CURRENT_VIEW_?exists && helpTopic?exists-->
<#if parameters.componentName?exists && requestAttributes._CURRENT_VIEW_?exists && helpTopic?exists>
<#include "component://common/webcommon/includes/helplink.ftl" />
- <span><a href="javascript:lookup_popup2('showHelp?helpTopic=${helpTopic}&portalPageId=${parameters.portalPageId?if_exists}','help' ,500,500);">${uiLabelMap.CommonHelp}</a></span>
+ <span><a href="javascript:lookup_popup1('showHelp?helpTopic=${helpTopic}&portalPageId=${parameters.portalPageId?if_exists}','help' ,500,500);">${uiLabelMap.CommonHelp}</a></span>
</#if>
<#if layoutSettings.middleTopMessage1?has_content && layoutSettings.middleTopMessage1 != " ">
<span id="last-system-msg">
Modified: ofbiz/branches/jackrabbit20120501/themes/bluelight/includes/appbarOpen.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/themes/bluelight/includes/appbarOpen.ftl?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/themes/bluelight/includes/appbarOpen.ftl (original)
+++ ofbiz/branches/jackrabbit20120501/themes/bluelight/includes/appbarOpen.ftl Tue Aug 7 06:25:59 2012
@@ -45,7 +45,7 @@ under the License.
<#assign selected = false>
<#assign permissions = display.getBasePermission()>
<#list permissions as perm>
- <#if (perm != "NONE" && !security.hasEntityPermission(perm, "_VIEW", session) && !authz.hasPermission(session, perm, requestParameters))>
+ <#if (perm != "NONE" && !security.hasEntityPermission(perm, "_VIEW", session))>
<#-- User must have ALL permissions in the base-permission list -->
<#assign permission = false>
</#if>
@@ -75,7 +75,7 @@ under the License.
<#assign selected = false>
<#assign permissions = display.getBasePermission()>
<#list permissions as perm>
- <#if (perm != "NONE" && !security.hasEntityPermission(perm, "_VIEW", session) && !authz.hasPermission(session, perm, requestParameters))>
+ <#if (perm != "NONE" && !security.hasEntityPermission(perm, "_VIEW", session))>
<#-- User must have ALL permissions in the base-permission list -->
<#assign permission = false>
</#if>
Modified: ofbiz/branches/jackrabbit20120501/themes/bluelight/includes/header.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/themes/bluelight/includes/header.ftl?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/themes/bluelight/includes/header.ftl (original)
+++ ofbiz/branches/jackrabbit20120501/themes/bluelight/includes/header.ftl Tue Aug 7 06:25:59 2012
@@ -179,7 +179,7 @@ under the License.
<#--if webSiteId?exists && requestAttributes._CURRENT_VIEW_?exists && helpTopic?exists-->
<#if parameters.componentName?exists && requestAttributes._CURRENT_VIEW_?exists && helpTopic?exists>
<#include "component://common/webcommon/includes/helplink.ftl" />
- <li><a class="help-link <#if pageAvail?has_content> alert</#if>" href="javascript:lookup_popup2('showHelp?helpTopic=${helpTopic}&portalPageId=${parameters.portalPageId?if_exists}','help' ,500,500);" title="${uiLabelMap.CommonHelp}"></a></li>
+ <li><a class="help-link <#if pageAvail?has_content> alert</#if>" href="javascript:lookup_popup1('showHelp?helpTopic=${helpTopic}&portalPageId=${parameters.portalPageId?if_exists}','help' ,500,500);" title="${uiLabelMap.CommonHelp}"></a></li>
</#if>
<#if userLogin?exists>
<#if (userPreferences.COMPACT_HEADER)?default("N") == "Y">
Modified: ofbiz/branches/jackrabbit20120501/themes/droppingcrumbs/includes/appbarOpen.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/themes/droppingcrumbs/includes/appbarOpen.ftl?rev=1370126&r1=1370125&r2=1370126&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/themes/droppingcrumbs/includes/appbarOpen.ftl (original)
+++ ofbiz/branches/jackrabbit20120501/themes/droppingcrumbs/includes/appbarOpen.ftl Tue Aug 7 06:25:59 2012
@@ -45,7 +45,7 @@ under the License.
<#assign selected = false>
<#assign permissions = display.getBasePermission()>
<#list permissions as perm>
- <#if (perm != "NONE" && !security.hasEntityPermission(perm, "_VIEW", session) && !authz.hasPermission(session, perm, requestParameters))>
+ <#if (perm != "NONE" && !security.hasEntityPermission(perm, "_VIEW", session))>
<#-- User must have ALL permissions in the base-permission list -->
<#assign permission = false>
</#if>
@@ -75,7 +75,7 @@ under the License.
<#assign selected = false>
<#assign permissions = display.getBasePermission()>
<#list permissions as perm>
- <#if (perm != "NONE" && !security.hasEntityPermission(perm, "_VIEW", session) && !authz.hasPermission(session, perm, requestParameters))>
+ <#if (perm != "NONE" && !security.hasEntityPermission(perm, "_VIEW", session))>
<#-- User must have ALL permissions in the base-permission list -->
<#assign permission = false>
</#if>