Compare commits
106
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
00896e73bc | ||
|
|
fb6b508d56 | ||
|
|
bdf94f31a1 | ||
|
|
c5d262aeab | ||
|
|
208d44e0a3 | ||
|
|
e3691d1b21 | ||
|
|
dfb702cd9c | ||
|
|
39db98a535 | ||
|
|
2aca1121ee | ||
|
|
7de28070a3 | ||
|
|
c859c6f636 | ||
|
|
d960b2b0ca | ||
|
|
1c93a26ccc | ||
|
|
006ce17647 | ||
|
|
b6257b720b | ||
|
|
fb49563744 | ||
|
|
7db83d6a53 | ||
|
|
8e8ef4c9dc | ||
|
|
15c209a475 | ||
|
|
c79321c479 | ||
|
|
d02386d2d1 | ||
|
|
364f4264b0 | ||
|
|
72e2eacef8 | ||
|
|
0a49e0addd | ||
|
|
95ec51ecd1 | ||
|
|
123f30eb6b | ||
|
|
a28316b70d | ||
|
|
7e00617828 | ||
|
|
1b907b06e8 | ||
|
|
dfd71bf7dd | ||
|
|
3e5d0b73a8 | ||
|
|
2b17c50ce7 | ||
|
|
6271d220b6 | ||
|
|
8d49af4005 | ||
|
|
2f5b8d33e3 | ||
|
|
326e0f12a4 | ||
|
|
2dda5b7095 | ||
|
|
7c3a03c16d | ||
|
|
d890ebaedc | ||
|
|
5a069a9991 | ||
|
|
2b15c0302c | ||
|
|
2e88059bfc | ||
|
|
123d9ed67f | ||
|
|
0bfd33a274 | ||
|
|
e1e7c2a4d3 | ||
|
|
f0ee921873 | ||
|
|
725c8543e0 | ||
|
|
858cd36e90 | ||
|
|
3742e034a7 | ||
|
|
14e581ff35 | ||
|
|
4fd4cfc05a | ||
|
|
69ce0dffc8 | ||
|
|
2c7a414cc2 | ||
|
|
717bd4ba43 | ||
|
|
564b605d55 | ||
|
|
2ce14c8fe1 | ||
|
|
7af07c808b | ||
|
|
f089d59389 | ||
|
|
8ef5896077 | ||
|
|
57183eea13 | ||
|
|
27adfed9f0 | ||
|
|
02cd3b33b0 | ||
|
|
1a5bca9190 | ||
|
|
d75ef8212d | ||
|
|
703a32b41f | ||
|
|
9510fc9389 | ||
|
|
7fb8780c97 | ||
|
|
921db68bde | ||
|
|
6b1d71d91a | ||
|
|
c4c3012916 | ||
|
|
ac1595b304 | ||
|
|
15bb640a83 | ||
|
|
7933fef9f2 | ||
|
|
5b0b80f795 | ||
|
|
5560130451 | ||
|
|
af5d61b051 | ||
|
|
2cf6476a79 | ||
|
|
4138bf2a34 | ||
|
|
44cb8dd327 | ||
|
|
9c0c43365f | ||
|
|
58f2b14ee8 | ||
|
|
20e1e1fae7 | ||
|
|
c32abb81d2 | ||
|
|
9dd2a255e9 | ||
|
|
69f00cff78 | ||
|
|
d93f7ce590 | ||
|
|
7756b11421 | ||
|
|
2876adf26c | ||
|
|
b5cdcd9efc | ||
|
|
78f09e61ad | ||
|
|
ec4bff76a0 | ||
|
|
d6c6330b39 | ||
|
|
2b8f4f8b64 | ||
|
|
392f18f913 | ||
|
|
1cf9d9110b | ||
|
|
b06521c356 | ||
|
|
26a2be1392 | ||
|
|
a0b2f55b40 | ||
|
|
7add713a10 | ||
|
|
315bdea44b | ||
|
|
a1e495de19 | ||
|
|
4a26aecbf5 | ||
|
|
a5e96763e4 | ||
|
|
00200bfaca | ||
|
|
bbc63bc470 | ||
|
|
e1d57fba00 |
+15
-9
@@ -20,7 +20,7 @@ under the License.
|
||||
= Apache OFBiz®
|
||||
|
||||
If you are reading this file in AsciiDoc format you may want to see it in
|
||||
https://ci.apache.org/projects/ofbiz/site/stable/readme/html5/README.html[HTML]
|
||||
https://ci.apache.org/projects/ofbiz/site/stable/readme/html5/README.html[HTML]
|
||||
or https://ci.apache.org/projects/ofbiz/site/stable/readme/pdf/README.pdf[PDF] format
|
||||
|
||||
---
|
||||
@@ -59,14 +59,17 @@ ________________________________________________________________________________
|
||||
[[system-requirements]]
|
||||
== System requirements
|
||||
|
||||
The only requirement to run OFBiz is to have the Java Development Kit (JDK)
|
||||
version 8 installed on your system (not just the JRE, but the full JDK) which
|
||||
you can download from the below link. Make sure of setting the $JAVA_HOME
|
||||
environment variable.
|
||||
The only requirements to run OFBiz is
|
||||
|
||||
* to have the Java Development Kit (JDK) version 8 installed on your system
|
||||
(not just the JRE, but the full JDK) that you can download from the below link.
|
||||
Make sure of setting the $JAVA_HOME environment variable. +
|
||||
https://adoptopenjdk.net/[JDK download], https://medium.com/@javachampions/java-is-still-free-2-0-0-6b9aa8d6d244[To know more about the JDK]
|
||||
|
||||
* If on Windows, a Powershell version >= 7.1.3 installed that you can download from the below link. +
|
||||
https://github.com/PowerShell/PowerShell[Powershell]
|
||||
|
||||
https://adoptopenjdk.net/[JDK download]
|
||||
|
||||
https://medium.com/@javachampions/java-is-still-free-2-0-0-6b9aa8d6d244[To know more about the JDK]
|
||||
|
||||
[[quick-start]]
|
||||
// tag::quickstart[]
|
||||
@@ -126,9 +129,12 @@ In case of problems visit our link:#further-reading[Further reading section].
|
||||
[[security]]
|
||||
== Security
|
||||
|
||||
If you find a security issue, please report it to: security @ ofbiz.apache.org.
|
||||
* If you find a pre-auth security issue, please report it to: security @ ofbiz.apache.org.
|
||||
Once proper mitigations to the security issues are complete the OFBiz team will
|
||||
disclose this information to the public mailing list.
|
||||
* If you find a post-auth security issue, please https://s.apache.org/dsj2p[create a bug in our issue tracker (Jira)] .
|
||||
|
||||
|
||||
|
||||
You can find more information about security in OFBiz at
|
||||
https://cwiki.apache.org/confluence/display/OFBIZ/Keeping+OFBiz+secure[Keeping OFBiz secure]
|
||||
@@ -395,7 +401,7 @@ dash!
|
||||
Loads all data sets; meant for initial loading of generic OFBiz data. Can be
|
||||
applied for development, testing, demonstration, etc. purposes. Be aware that
|
||||
executing this task can result in your data being overwritten in your database
|
||||
of choice.
|
||||
of choice.
|
||||
|
||||
`gradlew loadAll` OR `gradlew "ofbiz --load-data"`
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
|
||||
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
|
||||
<property key="AcctgTransType.description.AMORTIZATION">
|
||||
<value xml:lang="ar">الإطفاء</value>
|
||||
<value xml:lang="de">Amortisation</value>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
|
||||
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
|
||||
<property key="AccountingCheckAccountCannotBeUpdated">
|
||||
<value xml:lang="en">ERROR: Could not update Check Account.</value>
|
||||
</property>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
|
||||
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
|
||||
<property key="AccountingAccount">
|
||||
<value xml:lang="ar">حساب</value>
|
||||
<value xml:lang="cs">Účet</value>
|
||||
|
||||
@@ -33,7 +33,7 @@ under the License.
|
||||
organizationPartyId="Company" ownerPartyId="Company" postToGlAccountId="231000" isRefundable="Y" replenishLevel="0.00" actualBalance="0.00" availableBalance="0.00"/>
|
||||
<FinAccountStatus finAccountId="AMEX_01" statusId="FNACT_ACTIVE" statusDate="2009-04-01 00:00:01.000"/>
|
||||
<PaymentMethod paymentMethodId="AMEX_01" paymentMethodTypeId="CREDIT_CARD" partyId="Company" description="AmEx 0005" glAccountId="231000" finAccountId="AMEX_01" fromDate="2009-04-01 00:00:00.000"/>
|
||||
<CreditCard paymentMethodId="AMEX_01" cardType="CCT_AMERICANEXPRESS" cardNumber="378282246310005" expireDate="02/2020" companyNameOnCard="Your Company Name"
|
||||
<CreditCard paymentMethodId="AMEX_01" cardType="CCT_AMERICANEXPRESS" cardNumber="378282246310005" expireDate="02/2120" companyNameOnCard="Your Company Name"
|
||||
titleOnCard="" firstNameOnCard="Smart" middleNameOnCard="" lastNameOnCard="Guy" suffixOnCard="" contactMechId="9000"/>
|
||||
<PaymentMethod paymentMethodId="PETTY_CASH" paymentMethodTypeId="CASH" partyId="Company" description="Petty Cash" glAccountId="110000" fromDate="2009-04-01 00:00:00.000"/>
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
-->
|
||||
|
||||
<entity-eca xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entity-eca.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/entity-eca.xsd">
|
||||
|
||||
<!-- To maintain FinAccount.actualBalance and FinAccount.availableBalance -->
|
||||
<eca entity="FinAccountTrans" operation="create-store" event="return">
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/entitymodel.xsd">
|
||||
<!-- ========================================================= -->
|
||||
<!-- ======================== Defaults ======================= -->
|
||||
<!-- ========================================================= -->
|
||||
|
||||
@@ -78,8 +78,8 @@ under the License.
|
||||
<!-- TODO: somehow determine if this is an order placed against the account or some other type of withdrawal -->
|
||||
<!-- TODO: handle order placed against (paid for with) the account -->
|
||||
|
||||
<set field="quickCreateAcctgTransAndEntries.debitGlAccountId" from-field="glAccountId"/>
|
||||
<set field="quickCreateAcctgTransAndEntries.creditGlAccountId" from-field="parameters.glAccountId"/>
|
||||
<set field="quickCreateAcctgTransAndEntries.debitGlAccountId" from-field="parameters.glAccountId"/>
|
||||
<set field="quickCreateAcctgTransAndEntries.creditGlAccountId" from-field="glAccountId"/>
|
||||
<set field="quickCreateAcctgTransAndEntries.acctgTransTypeId" value="PAYMENT_ACCTG_TRANS"/>
|
||||
</then>
|
||||
</else-if>
|
||||
@@ -89,6 +89,12 @@ under the License.
|
||||
<!-- if positive will go to one account for write-off, if negative will go to another account for a fee -->
|
||||
<!-- these will reverse depending on positive/negative amount -->
|
||||
<if-compare field="finAccountTrans.amount" operator="less" value="0">
|
||||
<calculate field="quickCreateAcctgTransAndEntries.amount" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
|
||||
<calcop operator="multiply">
|
||||
<calcop operator="get" field="quickCreateAcctgTransAndEntries.amount"/>
|
||||
<number value="-1"/>
|
||||
</calcop>
|
||||
</calculate>
|
||||
<set field="quickCreateAcctgTransAndEntries.debitGlAccountId" from-field="parameters.glAccountId"/>
|
||||
<set field="quickCreateAcctgTransAndEntries.creditGlAccountId" from-field="glAccountId"/>
|
||||
<set field="quickCreateAcctgTransAndEntries.acctgTransTypeId" value="OUTGOING_PAYMENT"/>
|
||||
|
||||
@@ -70,7 +70,8 @@ under the License.
|
||||
<field-map field-name="finAccountId" value="1002"/>
|
||||
</entity-one>
|
||||
<assert>
|
||||
<if-empty field="finAccount"/>
|
||||
<not><if-empty field="finAccount"/></not>
|
||||
<not><if-empty field="finAccount.thruDate"/></not>
|
||||
</assert>
|
||||
<check-errors/>
|
||||
</simple-method>
|
||||
|
||||
@@ -20,7 +20,7 @@ under the License.
|
||||
|
||||
<ofbiz-component name="accounting"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/ofbiz-component.xsd">
|
||||
<resource-loader name="main" type="component"/>
|
||||
<classpath type="dir" location="config"/>
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<service-group xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/service-group.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/service-group.xsd">
|
||||
|
||||
<group name="createCreditCardAndAddress" send-mode="all">
|
||||
<invoke name="createPostalAddress" mode="sync" result-to-context="true"/>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<service-eca xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/service-eca.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/service-eca.xsd">
|
||||
|
||||
<eca service="createPaymentApplication" event="commit">
|
||||
<condition field-name="invoiceId" operator="is-not-empty"/>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<service-eca xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/service-eca.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/service-eca.xsd">
|
||||
|
||||
<!-- On cancelling invoice reverse its Accounting Transactions -->
|
||||
<eca service="cancelInvoice" event="invoke">
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<service-eca xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/service-eca.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/service-eca.xsd">
|
||||
|
||||
<!-- this eca automatically posts the accounting transactions to GL -->
|
||||
<eca service="createAcctgTransAndEntries" event="commit">
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<service-eca xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/service-eca.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/service-eca.xsd">
|
||||
|
||||
<!-- these SECAs are for automatically creating accounting transactions based on business transactions.
|
||||
They should normally be "sync" SECAs so that they happen as soon
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Accounting Services - Miscellaneous</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
@@ -18,7 +18,7 @@ specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Accounting Services: Agreements </description>
|
||||
<vendor>OFBiz</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Accounting Services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Accounting Services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Accounting Services: Budget</description>
|
||||
<vendor>Apache OFBiz</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Clear Commerce Services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Cost Services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Accounting Services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Accounting Services: Financial Account</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
<version>1.0</version>
|
||||
@@ -48,7 +48,7 @@ under the License.
|
||||
<attribute name="replenishPaymentId" type="String" mode="OUT" optional="true"/>
|
||||
<attribute name="replenishLevel" type="BigDecimal" mode="OUT" optional="true"/>
|
||||
</service>
|
||||
<service name="deleteFinAccount" default-entity-name="FinAccount" engine="entity-auto" invoke="delete">
|
||||
<service name="deleteFinAccount" default-entity-name="FinAccount" engine="entity-auto" invoke="expire">
|
||||
<description>Delete a Financial Account</description>
|
||||
<auto-attributes mode="IN" optional="false" include="pk"/>
|
||||
</service>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Accounting Services: Fixed Asset </description>
|
||||
<vendor>OFBiz</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Accounting Services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Accounting Services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
<version>1.0</version>
|
||||
@@ -556,7 +556,7 @@ under the License.
|
||||
<attribute name="customTimePeriodId" mode="IN" type="String"/>
|
||||
<attribute name="previousTimePeriod" mode="OUT" type="Map" optional="true"/>
|
||||
</service>
|
||||
<service name="getAcctgTransEntriesAndTransTotal" engine="simple" invoke="getAcctgTransEntriesAndTransTotal"
|
||||
<service name="getAcctgTransEntriesAndTransTotal" engine="simple" invoke="getAcctgTransEntriesAndTransTotal"
|
||||
location="component://accounting/minilang/ledger/AcctgTransServices.xml" auth="true">
|
||||
<description>Given AcctgTransAndEntire and Calculate acctg trans total for specific time period.</description>
|
||||
<attribute name="customTimePeriodStartDate" mode="IN" type="Timestamp"/>
|
||||
@@ -581,7 +581,7 @@ under the License.
|
||||
<attribute name="debitCreditDifference" type="BigDecimal" mode="OUT"/>
|
||||
</service>
|
||||
|
||||
<service name="revertAcctgTransOnCancelInvoice" engine="simple"
|
||||
<service name="revertAcctgTransOnCancelInvoice" engine="simple"
|
||||
location="component://accounting/minilang/ledger/AcctgTransServices.xml" invoke="revertAcctgTransOnCancelInvoice" auth="true">
|
||||
<description>Reverting Accounting Transaction And Entries on Canceling an Invoice</description>
|
||||
<attribute name="invoiceId" mode="IN" type="String" optional="false"/>
|
||||
@@ -589,7 +589,7 @@ under the License.
|
||||
<service name="revertAcctgTransOnRemovePaymentApplications" engine="simple"
|
||||
location="component://accounting/minilang/ledger/AcctgTransServices.xml" invoke="revertAcctgTransOnRemovePaymentApplications" auth="true">
|
||||
<description>Create Reverse Accounting Transaction and Entries on removing PaymentApplication records.</description>
|
||||
<attribute name="paymentApplicationId" mode="IN" type="String" optional="false"/>
|
||||
<attribute name="paymentApplicationId" mode="IN" type="String" optional="false"/>
|
||||
</service>
|
||||
|
||||
<service name="createGlAccountCategory" engine="entity-auto" default-entity-name="GlAccountCategory" invoke="create" auth="true">
|
||||
@@ -656,7 +656,7 @@ under the License.
|
||||
<attribute name="oldStatusId" type="String" mode="OUT" optional="true"/>
|
||||
</service>
|
||||
|
||||
<service name="createUpdateCostCenter" engine="java" auth="true" invoke="createUpdateCostCenter"
|
||||
<service name="createUpdateCostCenter" engine="java" auth="true" invoke="createUpdateCostCenter"
|
||||
location="org.apache.ofbiz.accounting.ledger.GeneralLedgerServices">
|
||||
<description>Create Update CostCenters</description>
|
||||
<attribute name="glAccountId" mode="IN" type="String"/>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>OrbitalGateway Services</description>
|
||||
<vendor></vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Accounting Services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Accounting Payment Gateway Config Services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Accounting Services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>PayPal Services</description>
|
||||
|
||||
<service name="payPalSetExpressCheckout" engine="java"
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Accounting Services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Accounting Permission Services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Accounting Services: Rate and related services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Accounting Services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Accounting Services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Accounting Services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Accounting Services: TaxAuthority and related </description>
|
||||
<vendor>OFBiz</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Accounting Services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Accounting Services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
+105
-45
@@ -23,6 +23,7 @@ import java.math.BigInteger;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.security.InvalidAlgorithmParameterException;
|
||||
import java.security.InvalidKeyException;
|
||||
import java.security.Key;
|
||||
import java.security.KeyFactory;
|
||||
import java.security.KeyPair;
|
||||
import java.security.KeyPairGenerator;
|
||||
@@ -59,7 +60,9 @@ import javax.crypto.spec.DHPrivateKeySpec;
|
||||
import javax.crypto.spec.DHPublicKeySpec;
|
||||
import javax.crypto.spec.IvParameterSpec;
|
||||
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.apache.ofbiz.base.util.Debug;
|
||||
import org.apache.ofbiz.base.util.GeneralException;
|
||||
import org.apache.ofbiz.base.util.HttpClient;
|
||||
import org.apache.ofbiz.base.util.HttpClientException;
|
||||
import org.apache.ofbiz.base.util.StringUtil;
|
||||
@@ -154,14 +157,23 @@ public class ValueLinkApi {
|
||||
* @return Hex String of the encrypted pin (EAN) for transmission to ValueLink
|
||||
*/
|
||||
public String encryptPin(String pin) {
|
||||
byte[] rawIv = new byte[8];
|
||||
SecureRandom random = new SecureRandom();
|
||||
random.nextBytes(rawIv);
|
||||
IvParameterSpec iv = new IvParameterSpec(rawIv);
|
||||
// get the Cipher
|
||||
Cipher mwkCipher = this.getCipher(this.getMwkKey(), Cipher.ENCRYPT_MODE);
|
||||
Cipher mwkCipher = null;
|
||||
try {
|
||||
mwkCipher = getCipher(this.getMwkKey(), Cipher.ENCRYPT_MODE, iv);
|
||||
} catch (GeneralException e1) {
|
||||
Debug.logError(e1, module);
|
||||
}
|
||||
|
||||
// pin to bytes
|
||||
byte[] pinBytes = pin.getBytes(StandardCharsets.UTF_8);
|
||||
|
||||
// 7 bytes of random data
|
||||
byte[] random = this.getRandomBytes(7);
|
||||
byte[] randomBytes = this.getRandomBytes(7);
|
||||
|
||||
// pin checksum
|
||||
byte[] checkSum = this.getPinCheckSum(pinBytes);
|
||||
@@ -169,8 +181,8 @@ public class ValueLinkApi {
|
||||
// put all together
|
||||
byte[] eanBlock = new byte[16];
|
||||
int i;
|
||||
for (i = 0; i < random.length; i++) {
|
||||
eanBlock[i] = random[i];
|
||||
for (i = 0; i < randomBytes.length; i++) {
|
||||
eanBlock[i] = randomBytes[i];
|
||||
}
|
||||
eanBlock[7] = checkSum[0];
|
||||
for (i = 0; i < pinBytes.length; i++) {
|
||||
@@ -200,11 +212,26 @@ public class ValueLinkApi {
|
||||
/**
|
||||
* Decrypt an encrypted pin using the configured keys
|
||||
* @param pin Hex String of the encrypted pin (EAN)
|
||||
* @return Plain text String of the pin
|
||||
* @return Plain text String of the pin @
|
||||
*/
|
||||
public String decryptPin(String pin) {
|
||||
// get the Cipher
|
||||
Cipher mwkCipher = this.getCipher(this.getMwkKey(), Cipher.DECRYPT_MODE);
|
||||
// separate prefix with IV from the rest of encrypted data
|
||||
byte[] encryptedPayload = Base64.decodeBase64(pin.getBytes());
|
||||
byte[] iv = new byte[8];
|
||||
byte[] encryptedBytes = new byte[encryptedPayload.length - iv.length];
|
||||
|
||||
// populate iv with bytes:
|
||||
System.arraycopy(encryptedPayload, 0, iv, 0, iv.length);
|
||||
|
||||
// populate encryptedBytes with bytes:
|
||||
System.arraycopy(encryptedPayload, iv.length, encryptedBytes, 0, encryptedBytes.length);
|
||||
|
||||
Cipher mwkCipher = null;
|
||||
try {
|
||||
mwkCipher = getCipher(getMwkKey(), Cipher.ENCRYPT_MODE, new IvParameterSpec(iv));
|
||||
} catch (GeneralException e1) {
|
||||
Debug.logError(e1, module);
|
||||
}
|
||||
|
||||
// decrypt pin
|
||||
String decryptedPinString = null;
|
||||
@@ -271,7 +298,7 @@ public class ValueLinkApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Output the creation of public/private keys + KEK to the console for manual database update
|
||||
* Output the creation of public/private keys + KEK to the console for manual database update @
|
||||
*/
|
||||
public StringBuffer outputKeyCreation(boolean kekOnly, String kekTest) {
|
||||
return this.outputKeyCreation(0, kekOnly, kekTest);
|
||||
@@ -340,8 +367,18 @@ public class ValueLinkApi {
|
||||
byte[] loadKekBytes = loadedKek.getEncoded();
|
||||
|
||||
// test the KEK
|
||||
Cipher cipher = this.getCipher(this.getKekKey(), Cipher.ENCRYPT_MODE);
|
||||
byte[] kekTestB = { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
byte[] rawIv = new byte[8];
|
||||
SecureRandom secRandom = new SecureRandom();
|
||||
secRandom.nextBytes(rawIv);
|
||||
IvParameterSpec iv = new IvParameterSpec(rawIv);
|
||||
|
||||
Cipher cipher = null;
|
||||
try {
|
||||
cipher = getCipher(this.getKekKey(), Cipher.ENCRYPT_MODE, iv);
|
||||
} catch (GeneralException e1) {
|
||||
Debug.logError(e1, module);
|
||||
}
|
||||
byte[] kekTestB = {0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
byte[] kekTestC = new byte[0];
|
||||
if (kekTest != null) {
|
||||
kekTestB = StringUtil.fromHexString(kekTest);
|
||||
@@ -496,7 +533,7 @@ public class ValueLinkApi {
|
||||
|
||||
/**
|
||||
* Generate a new MWK
|
||||
* @return Hex String of the new encrypted MWK ready for transmission to ValueLink
|
||||
* @return Hex String of the new encrypted MWK ready for transmission to ValueLink @
|
||||
*/
|
||||
public byte[] generateMwk() {
|
||||
KeyGenerator keyGen = null;
|
||||
@@ -535,7 +572,7 @@ public class ValueLinkApi {
|
||||
/**
|
||||
* Generate a new MWK
|
||||
* @param desBytes byte array of the DES key (24 bytes)
|
||||
* @return Hex String of the new encrypted MWK ready for transmission to ValueLink
|
||||
* @return Hex String of the new encrypted MWK ready for transmission to ValueLink @
|
||||
*/
|
||||
public byte[] generateMwk(byte[] desBytes) {
|
||||
if (debug) {
|
||||
@@ -570,7 +607,7 @@ public class ValueLinkApi {
|
||||
/**
|
||||
* Generate a new MWK
|
||||
* @param mwkdes3 pre-generated DES3 SecretKey
|
||||
* @return Hex String of the new encrypted MWK ready for transmission to ValueLink
|
||||
* @return Hex String of the new encrypted MWK ready for transmission to ValueLink @
|
||||
*/
|
||||
public byte[] generateMwk(SecretKey mwkdes3) {
|
||||
// zeros for checksum
|
||||
@@ -581,9 +618,18 @@ public class ValueLinkApi {
|
||||
Random ran = new SecureRandom();
|
||||
ran.nextBytes(random);
|
||||
|
||||
byte[] rawIv = new byte[8];
|
||||
SecureRandom secRandom = new SecureRandom();
|
||||
secRandom.nextBytes(rawIv);
|
||||
IvParameterSpec iv = new IvParameterSpec(rawIv);
|
||||
|
||||
// open a cipher using the new mwk
|
||||
Cipher cipher = this.getCipher(mwkdes3, Cipher.ENCRYPT_MODE);
|
||||
Cipher cipher = null;
|
||||
try {
|
||||
cipher = getCipher(mwkdes3, Cipher.ENCRYPT_MODE, iv);
|
||||
} catch (GeneralException e1) {
|
||||
Debug.logError(e1, module);
|
||||
}
|
||||
|
||||
// make the checksum - encrypted 8 bytes of 0's
|
||||
byte[] encryptedZeros = new byte[0];
|
||||
@@ -617,7 +663,12 @@ public class ValueLinkApi {
|
||||
* @return encrypted byte array
|
||||
*/
|
||||
public byte[] encryptViaKek(byte[] content) {
|
||||
return cryptoViaKek(content, Cipher.ENCRYPT_MODE);
|
||||
try {
|
||||
return cryptoViaKek(content, Cipher.ENCRYPT_MODE);
|
||||
} catch (GeneralException e1) {
|
||||
Debug.logError(e1, module);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -626,7 +677,12 @@ public class ValueLinkApi {
|
||||
* @return decrypted byte array
|
||||
*/
|
||||
public byte[] decryptViaKek(byte[] content) {
|
||||
return cryptoViaKek(content, Cipher.DECRYPT_MODE);
|
||||
try {
|
||||
return cryptoViaKek(content, Cipher.DECRYPT_MODE);
|
||||
} catch (GeneralException e1) {
|
||||
Debug.logError(e1, module);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -772,46 +828,50 @@ public class ValueLinkApi {
|
||||
return dhParamSpec;
|
||||
}
|
||||
|
||||
// actual kek encryption/decryption code
|
||||
protected byte[] cryptoViaKek(byte[] content, int mode) {
|
||||
/**
|
||||
* actual kek encryption/decryption code
|
||||
* @throws GeneralException
|
||||
*/
|
||||
protected byte[] cryptoViaKek(byte[] content, int mode) throws GeneralException {
|
||||
// open a cipher using the kek for transport
|
||||
Cipher cipher = this.getCipher(this.getKekKey(), mode);
|
||||
byte[] dec = new byte[0];
|
||||
byte[] rawIv = new byte[8];
|
||||
SecureRandom random = new SecureRandom();
|
||||
random.nextBytes(rawIv);
|
||||
IvParameterSpec iv = new IvParameterSpec(rawIv);
|
||||
|
||||
// Create the Cipher - DESede/CBC/PKCS5Padding
|
||||
byte[] encBytes = null;
|
||||
Cipher cipher = getCipher(getKekKey(), mode, iv);
|
||||
try {
|
||||
dec = cipher.doFinal(content);
|
||||
} catch (IllegalStateException e) {
|
||||
Debug.logError(e, module);
|
||||
} catch (IllegalBlockSizeException e) {
|
||||
Debug.logError(e, module);
|
||||
} catch (BadPaddingException e) {
|
||||
encBytes = cipher.doFinal(content);
|
||||
} catch (IllegalStateException | BadPaddingException | IllegalBlockSizeException e) {
|
||||
Debug.logError(e, module);
|
||||
}
|
||||
return dec;
|
||||
// Prepend iv as a prefix to use it during decryption
|
||||
byte[] combinedPayload = new byte[rawIv.length + encBytes.length];
|
||||
|
||||
// populate payload with prefix iv and encrypted data
|
||||
System.arraycopy(iv, 0, combinedPayload, 0, rawIv.length);
|
||||
System.arraycopy(cipher, 0, combinedPayload, 8, encBytes.length);
|
||||
|
||||
return encBytes;
|
||||
}
|
||||
|
||||
// return a cipher for a key - DESede/CBC/NoPadding IV = 0
|
||||
protected Cipher getCipher(SecretKey key, int mode) {
|
||||
byte[] zeros = { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
IvParameterSpec iv = new IvParameterSpec(zeros);
|
||||
|
||||
// return a cipher for a key - DESede/CBC/NoPadding with random IV
|
||||
protected static Cipher getCipher(Key key, int mode, IvParameterSpec iv) throws GeneralException {
|
||||
// create the Cipher - DESede/CBC/NoPadding
|
||||
Cipher mwkCipher = null;
|
||||
Cipher cipher = null;
|
||||
try {
|
||||
mwkCipher = Cipher.getInstance("DESede/CBC/NoPadding");
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
Debug.logError(e, module);
|
||||
return null;
|
||||
} catch (NoSuchPaddingException e) {
|
||||
Debug.logError(e, module);
|
||||
cipher = Cipher.getInstance("DESede/CBC/NoPadding");
|
||||
} catch (NoSuchAlgorithmException | NoSuchPaddingException e) {
|
||||
throw new GeneralException(e);
|
||||
}
|
||||
try {
|
||||
mwkCipher.init(mode, key, iv);
|
||||
} catch (InvalidKeyException e) {
|
||||
Debug.logError(e, "Invalid key", module);
|
||||
} catch (InvalidAlgorithmParameterException e) {
|
||||
Debug.logError(e, module);
|
||||
cipher.init(mode, key, iv);
|
||||
} catch (InvalidKeyException | InvalidAlgorithmParameterException e) {
|
||||
throw new GeneralException(e);
|
||||
}
|
||||
return mwkCipher;
|
||||
return cipher;
|
||||
}
|
||||
|
||||
protected byte[] getPinCheckSum(byte[] pinBytes) {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
<test-suite suite-name="accountingtests"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/test-suite.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/test-suite.xsd">
|
||||
|
||||
<test-case case-name="accounting-tests-data-load">
|
||||
<entity-xml action="load" entity-xml-url="component://accounting/testdef/data/AccountingTestsData.xml"/>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
<test-suite suite-name="fixedassettests"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/test-suite.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/test-suite.xsd">
|
||||
|
||||
<test-case case-name="fixedasset-tests">
|
||||
<simple-method-test location="component://accounting/minilang/test/FixedAssetTests.xml"/>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
<test-suite suite-name="invoicetests"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/test-suite.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/test-suite.xsd">
|
||||
|
||||
<test-case case-name="auto-invoice-tests">
|
||||
<simple-method-test location="component://accounting/minilang/test/AutoInvoiceTests.xml"/>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
<test-suite suite-name="paymentappltests"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/test-suite.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/test-suite.xsd">
|
||||
|
||||
<test-case case-name="application-tests-data-load">
|
||||
<entity-xml action="load" entity-xml-url="component://accounting/testdef/data/PaymentApplicationTestsData.xml"/>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
<test-suite suite-name="paymenttests"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/test-suite.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/test-suite.xsd">
|
||||
|
||||
<test-case case-name="auto-payment-tests">
|
||||
<simple-method-test location="component://accounting/minilang/test/AutoPaymentTests.xml"/>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
<test-suite suite-name="ratetests"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/test-suite.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/test-suite.xsd">
|
||||
<test-case case-name="rate-tests-data-load">
|
||||
<entity-xml action="load" entity-xml-url="component://accounting/testdef/data/RateTestsData.xml"/>
|
||||
</test-case>
|
||||
|
||||
@@ -18,7 +18,7 @@ specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://ofbiz.apache.org/Widget-Form" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Form http://ofbiz.apache.org/dtds/widget-form.xsd">
|
||||
|
||||
<form name="FindFinAccounts" type="single" target="FindFinAccount"
|
||||
@@ -73,7 +73,7 @@ under the License.
|
||||
<parameter param-name="partyId" from-field="ownerPartyId"/>
|
||||
</hyperlink>
|
||||
</field>
|
||||
<field name="deleteLink" title=" " widget-style="buttontext">
|
||||
<field name="deleteLink" title=" " widget-style="buttontext" use-when="thruDate==null">
|
||||
<hyperlink description="${uiLabelMap.CommonDelete}" target="deleteFinAccount" also-hidden="false">
|
||||
<parameter param-name="finAccountId"/>
|
||||
</hyperlink>
|
||||
@@ -336,7 +336,7 @@ under the License.
|
||||
<field name="glReconciliationId" position="2">
|
||||
<drop-down allow-empty="true">
|
||||
<option key="_NA_" description="${uiLabelMap.CommonNotAssigned}"/>
|
||||
<list-options list-name="glReconciliations" key-name="glReconciliationId"
|
||||
<list-options list-name="glReconciliations" key-name="glReconciliationId"
|
||||
description="${glReconciliationName}[[${glReconciliationId}] [${reconciledDate}] [${reconciledBalance}]]"/>
|
||||
</drop-down>
|
||||
</field>
|
||||
@@ -346,17 +346,17 @@ under the License.
|
||||
<field name="thruEntryDate" position="2"><date-time/></field>
|
||||
<field name="searchButton" widget-style="smallSubmit"><submit button-type="button"/></field>
|
||||
</form>
|
||||
<form name="FindBankReconciliationFinAcctTrans" target="BankReconciliation"
|
||||
<form name="FindBankReconciliationFinAcctTrans" target="BankReconciliation"
|
||||
extends="FindFinAccountTransactions">
|
||||
<field name="statusId" title="${uiLabelMap.CommonStatus}"><display-entity entity-name="StatusItem"/></field>
|
||||
<field name="glReconciliationId" position="2">
|
||||
<drop-down>
|
||||
<list-options list-name="glReconciliations" key-name="glReconciliationId"
|
||||
<list-options list-name="glReconciliations" key-name="glReconciliationId"
|
||||
description="${glReconciliationName}[[${glReconciliationId}] [${reconciledDate}] [${reconciledBalance}]]"/>
|
||||
</drop-down>
|
||||
</field>
|
||||
</form>
|
||||
<form name="EditDepositPayment" extends="EditPayment"
|
||||
<form name="EditDepositPayment" extends="EditPayment"
|
||||
extends-resource="component://accounting/widget/PaymentForms.xml" target="createDepositPayment">
|
||||
<actions>
|
||||
<entity-one entity-name="FinAccount" value-field="finAccount"/>
|
||||
@@ -400,12 +400,8 @@ under the License.
|
||||
</actions>
|
||||
<alt-target use-when="glReconciliationId != null" target="updateFinAccountGlReconciliation"/>
|
||||
<field name="finAccountId"><hidden value="${finAccountId}"/></field>
|
||||
<field name="glReconciliationId" use-when="glReconciliationId == null"><ignored/></field>
|
||||
<field name="glReconciliationId" use-when="glReconciliationId != null"><display/></field>
|
||||
<field name="glAccountId"><hidden value="${finAccount.postToGlAccountId}"/></field>
|
||||
<field name="organizationPartyId"><lookup target-form-name="LookupPartyName"/></field>
|
||||
<field name="reconciledBalance" use-when="${reconciledBalance == null}"><hidden/></field>
|
||||
<field name="reconciledBalance" use-when=""GLREC_RECONCILED".equals("${glReconciliation.statusId}")"><display type="currency" currency="${defaultOrganizationPartyCurrencyUomId}"/></field>
|
||||
<field name="reconciledDate" title="${uiLabelMap.AccountingReconciliationDate}"><date-time/></field>
|
||||
<field name="createButton" use-when="glReconciliationId == null" widget-style="smallSubmit">
|
||||
<submit button-type="button"/>
|
||||
|
||||
@@ -18,7 +18,7 @@ specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://ofbiz.apache.org/Widget-Form" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Form http://ofbiz.apache.org/dtds/widget-form.xsd">
|
||||
|
||||
<form name="FindAcctgTrans" target="FindAcctgTrans" type="single" title="" default-map-name="journal"
|
||||
@@ -763,7 +763,7 @@ under the License.
|
||||
<field name="description"><textarea/></field>
|
||||
<field name="createButton" widget-style="smallSubmit"><submit button-type="button"/></field>
|
||||
<sort-order>
|
||||
<sort-field name="organizationPartyId"/>
|
||||
<sort-field name="organizationPartyId"/>
|
||||
<sort-field name="acctgTransTypeId"/>
|
||||
<sort-field name="glFiscalTypeId"/>
|
||||
<sort-field name="glJournalId"/>
|
||||
@@ -861,7 +861,7 @@ under the License.
|
||||
</field>
|
||||
<field name="reconciledDate"><date-time/></field>
|
||||
<field name="organizationPartyId"><display/></field>
|
||||
<field name="reconciledBalance"><display/></field>
|
||||
<field name="reconciledBalance" use-when=""GLREC_RECONCILED".equals("${glReconciliation.statusId}")"><display type="currency" currency="${defaultOrganizationPartyCurrencyUomId}"/></field>
|
||||
<field name="openingBalance" use-when="${groovy:'GLREC_RECONCILED'.equals(glReconciliation?.statusId)}"><display/></field>
|
||||
<field use-when="glReconciliationId!=null" name="updateButton" title="${uiLabelMap.CommonUpdate}" widget-style="buttontext" ><submit button-type="text-link"/></field>
|
||||
</form>
|
||||
|
||||
@@ -69,10 +69,8 @@ under the License.
|
||||
<field-map field-name="compareDate" from-field="invoiceDate"/>
|
||||
<field-map field-name="lastNameFirst" value="Y"/>
|
||||
</service>
|
||||
<set field="amountToApply" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(delegator,invoiceId)
|
||||
.multiply(org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceCurrencyConversionRate(delegator,invoiceId))}"/>
|
||||
<set field="total" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(delegator,invoiceId)
|
||||
.multiply(org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceCurrencyConversionRate(delegator,invoiceId))}"/>
|
||||
<set field="amountToApply" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(delegator,invoiceId)}"/>
|
||||
<set field="total" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(delegator,invoiceId)}"/>
|
||||
</row-actions>
|
||||
|
||||
<field name="invoiceId" widget-style="buttontext" sort-field="true">
|
||||
|
||||
@@ -891,6 +891,11 @@ under the License.
|
||||
<set field="fromDate" from-field="parameters.fromDate" type="Timestamp"/>
|
||||
<set field="thruDate" from-field="parameters.thruDate" type="Timestamp"/>
|
||||
<set field="glFiscalTypeId" from-field="parameters.glFiscalTypeId" default-value="ACTUAL"/>
|
||||
<service service-name="getPartyAccountingPreferences" result-map="result">
|
||||
<field-map field-name="organizationPartyId" value="${groovy:parameters.get('ApplicationDecorator|organizationPartyId')}"/>
|
||||
</service>
|
||||
<set field="partyAcctgPreference" from-field="result.partyAccountingPreference"/>
|
||||
<set field="currencyUomId" from-field="partyAcctgPreference.baseCurrencyUomId"/>
|
||||
<script location="component://accounting/groovyScripts/reports/IncomeStatement.groovy"/>
|
||||
</actions>
|
||||
<widgets>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
|
||||
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
|
||||
<property key="CommonExtCreatePublicMessage">
|
||||
<value xml:lang="de">Erzeuge öffentliche Nachricht</value>
|
||||
<value xml:lang="en">Create Public Message</value>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
|
||||
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
|
||||
<property key="PageTitleEditProductCategory">
|
||||
<value xml:lang="en">Edit Product Category</value>
|
||||
<value xml:lang="fr">Edition de la catégorie produit</value>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/entitymodel.xsd">
|
||||
<title>Entity of an Apache OFBiz Component</title>
|
||||
<description>None</description>
|
||||
<version>1.0</version>
|
||||
|
||||
@@ -20,7 +20,7 @@ under the License.
|
||||
|
||||
<ofbiz-component name="commonext"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/ofbiz-component.xsd">
|
||||
<resource-loader name="main" type="component"/>
|
||||
<classpath type="dir" location="config"/>
|
||||
|
||||
|
||||
@@ -19,6 +19,6 @@ under the License.
|
||||
-->
|
||||
|
||||
<service-eca xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/service-eca.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/service-eca.xsd">
|
||||
|
||||
</service-eca>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Commonext Component Services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<component-loader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/component-loader.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/component-loader.xsd">
|
||||
<load-component component-location="datamodel"/>
|
||||
<load-component component-location="party"/>
|
||||
<load-component component-location="securityext"/>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
|
||||
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
|
||||
<property key="CharacterSet.description.ISO-8859-1">
|
||||
<value xml:lang="en">ISO-8859-1</value>
|
||||
<value xml:lang="es">ISO-8859-1 Inglés</value>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
|
||||
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
|
||||
<property key="contentevents.error_getting_content_list">
|
||||
<value xml:lang="en">Error getting the content list to index: ${gee}.</value>
|
||||
<value xml:lang="ja">コンテンツリストの取得時にエラー。索引: ${gee}.</value>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
|
||||
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
|
||||
<property key="CannotFindCmsform">
|
||||
<value xml:lang="de">Die CMS Form kann nicht gefunden werden!</value>
|
||||
<value xml:lang="en">Cannot find the cmsform!</value>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<entity-eca xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entity-eca.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/entity-eca.xsd">
|
||||
|
||||
<!-- If the text in the database has changed for the data resource, we need to clear out anything depending on this cached value -->
|
||||
<eca entity="ElectronicText" operation="store-remove" event="return">
|
||||
|
||||
@@ -101,7 +101,6 @@
|
||||
<if-not-empty field="parameters.summaryData">
|
||||
<!-- create the summary data -->
|
||||
<set field="createSummary.dataResourceTypeId" value="ELECTRONIC_TEXT"/>
|
||||
<set field="createSummary.contentPurposeTypeId" value="ARTICLE"/>
|
||||
<set field="createSummary.dataTemplateTypeId" value="NONE"/>
|
||||
<set field="createSummary.mapKey" value="SUMMARY"/>
|
||||
<set field="createSummary.ownerContentId" from-field="ownerContentId"/>
|
||||
|
||||
@@ -20,7 +20,7 @@ under the License.
|
||||
|
||||
<ofbiz-component name="content"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/ofbiz-component.xsd">
|
||||
<resource-loader name="main" type="component"/>
|
||||
<classpath type="dir" location="config"/>
|
||||
<classpath type="dir" location="dtd"/>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<service-mca xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/service-mca.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/service-mca.xsd">
|
||||
|
||||
<mca mail-rule-name="processIncomingEmail">
|
||||
<action service="storeIncomingEmail" mode="sync"/>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<service-eca xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/service-eca.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/service-eca.xsd">
|
||||
<eca service="createFile" event="in-validate">
|
||||
<condition field-name="dataResource" operator="is-empty"/>
|
||||
<action service="createDataResource" mode="sync"/>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Content Component Services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Content Component Services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Content Component Content Services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Content Component Services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Content Component Data Services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Content Component Document Services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Content Component Output Services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Content Component Services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Content Component WebSite Services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
|
||||
|
||||
+6
-6
@@ -39,12 +39,12 @@ import org.apache.ofbiz.service.DispatchContext;
|
||||
import org.apache.ofbiz.service.LocalDispatcher;
|
||||
import org.apache.ofbiz.service.ServiceUtil;
|
||||
|
||||
import com.sun.syndication.feed.synd.SyndContent;
|
||||
import com.sun.syndication.feed.synd.SyndContentImpl;
|
||||
import com.sun.syndication.feed.synd.SyndEntry;
|
||||
import com.sun.syndication.feed.synd.SyndEntryImpl;
|
||||
import com.sun.syndication.feed.synd.SyndFeed;
|
||||
import com.sun.syndication.feed.synd.SyndFeedImpl;
|
||||
import com.rometools.rome.feed.synd.SyndContent;
|
||||
import com.rometools.rome.feed.synd.SyndContentImpl;
|
||||
import com.rometools.rome.feed.synd.SyndEntry;
|
||||
import com.rometools.rome.feed.synd.SyndEntryImpl;
|
||||
import com.rometools.rome.feed.synd.SyndFeed;
|
||||
import com.rometools.rome.feed.synd.SyndFeedImpl;
|
||||
|
||||
/**
|
||||
* BlogRssServices
|
||||
|
||||
+112
-96
@@ -27,7 +27,12 @@ import java.io.RandomAccessFile;
|
||||
import java.io.StringWriter;
|
||||
import java.io.Writer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.StandardOpenOption;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
@@ -37,7 +42,6 @@ import org.apache.ofbiz.base.util.Debug;
|
||||
import org.apache.ofbiz.base.util.GeneralException;
|
||||
import org.apache.ofbiz.base.util.UtilDateTime;
|
||||
import org.apache.ofbiz.base.util.UtilGenerics;
|
||||
import org.apache.ofbiz.base.util.UtilIO;
|
||||
import org.apache.ofbiz.base.util.UtilMisc;
|
||||
import org.apache.ofbiz.base.util.UtilProperties;
|
||||
import org.apache.ofbiz.base.util.UtilValidate;
|
||||
@@ -50,15 +54,14 @@ import org.apache.ofbiz.service.GenericServiceException;
|
||||
import org.apache.ofbiz.service.ModelService;
|
||||
import org.apache.ofbiz.service.ServiceUtil;
|
||||
|
||||
import edu.emory.mathcs.backport.java.util.Arrays;
|
||||
|
||||
/**
|
||||
* DataServices Class
|
||||
*/
|
||||
public class DataServices {
|
||||
|
||||
public static final String module = DataServices.class.getName();
|
||||
public static final String resource = "ContentUiLabels";
|
||||
private static final String MODULE = DataServices.class.getName();
|
||||
private static final String RESOURCE = "ContentUiLabels";
|
||||
|
||||
public static Map<String, Object> clearAssociatedRenderCache(DispatchContext dctx, Map<String, Object> context) {
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
@@ -67,8 +70,9 @@ public class DataServices {
|
||||
try {
|
||||
DataResourceWorker.clearAssociatedRenderCache(delegator, dataResourceId);
|
||||
} catch (GeneralException e) {
|
||||
Debug.logError(e, "Unable to clear associated render cache with dataResourceId=" + dataResourceId, module);
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ContentClearAssociatedRenderCacheError", UtilMisc.toMap("dataResourceId", dataResourceId), locale));
|
||||
Debug.logError(e, "Unable to clear associated render cache with dataResourceId=" + dataResourceId, MODULE);
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "ContentClearAssociatedRenderCacheError",
|
||||
UtilMisc.toMap("dataResourceId", dataResourceId), locale));
|
||||
}
|
||||
return ServiceUtil.returnSuccess();
|
||||
}
|
||||
@@ -129,7 +133,7 @@ public class DataServices {
|
||||
dataResourceId = delegator.getNextSeqId("DataResource");
|
||||
}
|
||||
if (Debug.infoOn()) {
|
||||
Debug.logInfo("in createDataResourceMethod, dataResourceId:" + dataResourceId, module);
|
||||
Debug.logInfo("in createDataResourceMethod, dataResourceId:" + dataResourceId, MODULE);
|
||||
}
|
||||
GenericValue dataResource = delegator.makeValue("DataResource", UtilMisc.toMap("dataResourceId", dataResourceId));
|
||||
dataResource.setNonPKFields(context);
|
||||
@@ -140,9 +144,10 @@ public class DataServices {
|
||||
// get first statusId for content out of the statusItem table if not provided
|
||||
if (UtilValidate.isEmpty(dataResource.get("statusId"))) {
|
||||
try {
|
||||
GenericValue statusItem = EntityQuery.use(delegator).from("StatusItem").where("statusTypeId", "CONTENT_STATUS").orderBy("sequenceId").queryFirst();
|
||||
GenericValue statusItem = EntityQuery.use(delegator).from("StatusItem").where("statusTypeId", "CONTENT_STATUS")
|
||||
.orderBy("sequenceId").queryFirst();
|
||||
if (statusItem != null) {
|
||||
dataResource.put("statusId", statusItem.get("statusId"));
|
||||
dataResource.put("statusId", statusItem.get("statusId"));
|
||||
}
|
||||
} catch (GenericEntityException e) {
|
||||
return ServiceUtil.returnError(e.getMessage());
|
||||
@@ -173,7 +178,8 @@ public class DataServices {
|
||||
String dataResourceId = (String) context.get("dataResourceId");
|
||||
String textData = (String) context.get("textData");
|
||||
if (UtilValidate.isNotEmpty(textData)) {
|
||||
GenericValue electronicText = delegator.makeValue("ElectronicText", UtilMisc.toMap("dataResourceId", dataResourceId, "textData", textData));
|
||||
GenericValue electronicText = delegator.makeValue("ElectronicText",
|
||||
UtilMisc.toMap("dataResourceId", dataResourceId, "textData", textData));
|
||||
try {
|
||||
electronicText.create();
|
||||
} catch (GenericEntityException e) {
|
||||
@@ -210,18 +216,19 @@ public class DataServices {
|
||||
|
||||
// extended validation for binary/character data
|
||||
if (UtilValidate.isNotEmpty(textData) && binData != null) {
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ContentCannotProcessBothCharacterAndBinaryFile", locale));
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "ContentCannotProcessBothCharacterAndBinaryFile", locale));
|
||||
}
|
||||
|
||||
// obtain a reference to the file
|
||||
File file = null;
|
||||
if (UtilValidate.isEmpty(objectInfo)) {
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ContentUnableObtainReferenceToFile", UtilMisc.toMap("objectInfo", ""), locale));
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "ContentUnableObtainReferenceToFile",
|
||||
UtilMisc.toMap("objectInfo", ""), locale));
|
||||
}
|
||||
if (UtilValidate.isEmpty(dataResourceTypeId) || "LOCAL_FILE".equals(dataResourceTypeId) || "LOCAL_FILE_BIN".equals(dataResourceTypeId)) {
|
||||
file = new File(objectInfo);
|
||||
if (!file.isAbsolute()) {
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ContentLocalFileDoesNotPointToAbsoluteLocation", locale));
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "ContentLocalFileDoesNotPointToAbsoluteLocation", locale));
|
||||
}
|
||||
} else if ("OFBIZ_FILE".equals(dataResourceTypeId) || "OFBIZ_FILE_BIN".equals(dataResourceTypeId)) {
|
||||
prefix = System.getProperty("ofbiz.home");
|
||||
@@ -232,7 +239,7 @@ public class DataServices {
|
||||
} else if ("CONTEXT_FILE".equals(dataResourceTypeId) || "CONTEXT_FILE_BIN".equals(dataResourceTypeId)) {
|
||||
prefix = (String) context.get("rootDir");
|
||||
if (UtilValidate.isEmpty(prefix)) {
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ContentCannotFindContextFileWithEmptyContextRoot", locale));
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "ContentCannotFindContextFileWithEmptyContextRoot", locale));
|
||||
}
|
||||
if (objectInfo.indexOf('/') != 0 && prefix.lastIndexOf('/') != (prefix.length() - 1)) {
|
||||
sep = "/";
|
||||
@@ -240,43 +247,49 @@ public class DataServices {
|
||||
file = new File(prefix + sep + objectInfo);
|
||||
}
|
||||
if (file == null) {
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ContentUnableObtainReferenceToFile", UtilMisc.toMap("objectInfo", objectInfo), locale));
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "ContentUnableObtainReferenceToFile",
|
||||
UtilMisc.toMap("objectInfo", objectInfo), locale));
|
||||
}
|
||||
|
||||
// write the data to the file
|
||||
if (UtilValidate.isNotEmpty(textData)) {
|
||||
try (
|
||||
OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(file), UtilIO.getUtf8());
|
||||
) {
|
||||
try (OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8);) {
|
||||
out.write(textData);
|
||||
if (!org.apache.ofbiz.security.SecuredUpload.isValidFile(file.getAbsolutePath(), "Text", delegator)) {
|
||||
String errorMessage = UtilProperties.getMessage("SecurityUiLabels", "SupportedTextFileFormats", locale);
|
||||
return ServiceUtil.returnError(errorMessage);
|
||||
}
|
||||
} catch (IOException | ImageReadException e) {
|
||||
Debug.logWarning(e, module);
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ContentUnableWriteCharacterDataToFile", UtilMisc.toMap("fileName", file.getAbsolutePath()), locale));
|
||||
Debug.logWarning(e, MODULE);
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "ContentUnableWriteCharacterDataToFile",
|
||||
UtilMisc.toMap("fileName", file.getAbsolutePath()), locale));
|
||||
}
|
||||
} else if (binData != null) {
|
||||
try {
|
||||
RandomAccessFile out = new RandomAccessFile(file, "rw");
|
||||
out.write(binData.array());
|
||||
out.close();
|
||||
// Check if a webshell is not uploaded
|
||||
if (!org.apache.ofbiz.security.SecuredUpload.isValidFile(file.getAbsolutePath(), "All", delegator)) {
|
||||
Path tempFile = Files.createTempFile(null, null);
|
||||
Files.write(tempFile, binData.array(), StandardOpenOption.APPEND);
|
||||
if (!org.apache.ofbiz.security.SecuredUpload.isValidFile(tempFile.toString(), "All", delegator)) {
|
||||
String errorMessage = UtilProperties.getMessage("SecurityUiLabels", "SupportedFileFormatsIncludingSvg", locale);
|
||||
return ServiceUtil.returnError(errorMessage);
|
||||
}
|
||||
Files.delete(tempFile);
|
||||
RandomAccessFile out = new RandomAccessFile(file, "rw");
|
||||
out.write(binData.array());
|
||||
out.close();
|
||||
|
||||
} catch (FileNotFoundException | ImageReadException e) {
|
||||
Debug.logError(e, module);
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ContentUnableToOpenFileForWriting", UtilMisc.toMap("fileName", file.getAbsolutePath()), locale));
|
||||
Debug.logError(e, MODULE);
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "ContentUnableToOpenFileForWriting",
|
||||
UtilMisc.toMap("fileName", file.getAbsolutePath()), locale));
|
||||
} catch (IOException e) {
|
||||
Debug.logError(e, module);
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ContentUnableWriteBinaryDataToFile", UtilMisc.toMap("fileName", file.getAbsolutePath()), locale));
|
||||
Debug.logError(e, MODULE);
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "ContentUnableWriteBinaryDataToFile",
|
||||
UtilMisc.toMap("fileName", file.getAbsolutePath()), locale));
|
||||
}
|
||||
} else {
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ContentNoContentFilePassed", UtilMisc.toMap("fileName", file.getAbsolutePath()), locale));
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "ContentNoContentFilePassed",
|
||||
UtilMisc.toMap("fileName", file.getAbsolutePath()), locale));
|
||||
}
|
||||
|
||||
Map<String, Object> result = ServiceUtil.returnSuccess();
|
||||
@@ -324,8 +337,9 @@ public class DataServices {
|
||||
try {
|
||||
dataResource = EntityQuery.use(delegator).from("DataResource").where("dataResourceId", dataResourceId).queryOne();
|
||||
} catch (GenericEntityException e) {
|
||||
Debug.logWarning(e, module);
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ContentDataResourceNotFound", UtilMisc.toMap("parameters.dataResourceId", dataResourceId), locale));
|
||||
Debug.logWarning(e, MODULE);
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "ContentDataResourceNotFound",
|
||||
UtilMisc.toMap("parameters.dataResourceId", dataResourceId), locale));
|
||||
}
|
||||
|
||||
dataResource.setNonPKFields(context);
|
||||
@@ -335,7 +349,7 @@ public class DataServices {
|
||||
try {
|
||||
dataResource.store();
|
||||
} catch (GenericEntityException e) {
|
||||
Debug.logError(e, module);
|
||||
Debug.logError(e, MODULE);
|
||||
return ServiceUtil.returnError(e.getMessage());
|
||||
}
|
||||
|
||||
@@ -352,8 +366,8 @@ public class DataServices {
|
||||
}
|
||||
|
||||
/**
|
||||
* Because sometimes a DataResource will exist, but no ElectronicText has been created,
|
||||
* this method will create an ElectronicText if it does not exist.
|
||||
* Because sometimes a DataResource will exist, but no ElectronicText has been created, this method will create an
|
||||
* ElectronicText if it does not exist.
|
||||
* @param dctx the dispatch context
|
||||
* @param context the context
|
||||
* @return update the ElectronicText
|
||||
@@ -368,12 +382,12 @@ public class DataServices {
|
||||
String contentId = (String) context.get("contentId");
|
||||
result.put("contentId", contentId);
|
||||
if (UtilValidate.isEmpty(dataResourceId)) {
|
||||
Debug.logError("dataResourceId is null.", module);
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ContentDataResourceIsNull", locale));
|
||||
Debug.logError("dataResourceId is null.", MODULE);
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "ContentDataResourceIsNull", locale));
|
||||
}
|
||||
String textData = (String) context.get("textData");
|
||||
if (Debug.verboseOn()) {
|
||||
Debug.logVerbose("in updateElectronicText, textData:" + textData, module);
|
||||
Debug.logVerbose("in updateElectronicText, textData:" + textData, MODULE);
|
||||
}
|
||||
try {
|
||||
electronicText = EntityQuery.use(delegator).from("ElectronicText").where("dataResourceId", dataResourceId).queryOne();
|
||||
@@ -387,8 +401,8 @@ public class DataServices {
|
||||
electronicText.create();
|
||||
}
|
||||
} catch (GenericEntityException e) {
|
||||
Debug.logWarning(e, module);
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ContentElectronicTextNotFound", locale) + " " + e.getMessage());
|
||||
Debug.logWarning(e, MODULE);
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "ContentElectronicTextNotFound", locale) + " " + e.getMessage());
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -445,53 +459,59 @@ public class DataServices {
|
||||
|
||||
// write the data to the file
|
||||
if (UtilValidate.isNotEmpty(textData)) {
|
||||
try (
|
||||
OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(file),UtilIO.getUtf8());
|
||||
) {
|
||||
try (OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8);) {
|
||||
out.write(textData);
|
||||
if (!org.apache.ofbiz.security.SecuredUpload.isValidFile(file.getAbsolutePath(), "Text", delegator)) {
|
||||
String errorMessage = UtilProperties.getMessage("SecurityUiLabels", "SupportedTextFileFormats", locale);
|
||||
return ServiceUtil.returnError(errorMessage);
|
||||
}
|
||||
} catch (IOException | ImageReadException e) {
|
||||
Debug.logWarning(e, module);
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ContentUnableWriteCharacterDataToFile", UtilMisc.toMap("fileName", file.getAbsolutePath()), locale));
|
||||
Debug.logWarning(e, MODULE);
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "ContentUnableWriteCharacterDataToFile",
|
||||
UtilMisc.toMap("fileName", file.getAbsolutePath()), locale));
|
||||
}
|
||||
} else if (binData != null) {
|
||||
try {
|
||||
// Check if a webshell is not uploaded
|
||||
Path tempFile = Files.createTempFile(null, null);
|
||||
Files.write(tempFile, binData.array(), StandardOpenOption.APPEND);
|
||||
if (!org.apache.ofbiz.security.SecuredUpload.isValidFile(tempFile.toString(), "Image", delegator)) {
|
||||
String errorMessage = UtilProperties.getMessage("SecurityUiLabels", "SupportedFileFormatsIncludingSvg", locale);
|
||||
return ServiceUtil.returnError(errorMessage);
|
||||
}
|
||||
Files.delete(tempFile);
|
||||
RandomAccessFile out = new RandomAccessFile(file, "rw");
|
||||
out.setLength(binData.array().length);
|
||||
out.write(binData.array());
|
||||
out.close();
|
||||
// Check if a webshell is not uploaded
|
||||
if (!org.apache.ofbiz.security.SecuredUpload.isValidFile(file.getAbsolutePath(), "All", delegator)) {
|
||||
String errorMessage = UtilProperties.getMessage("SecurityUiLabels", "SupportedFileFormatsIncludingSvg", locale);
|
||||
return ServiceUtil.returnError(errorMessage);
|
||||
}
|
||||
} catch (FileNotFoundException | ImageReadException e) {
|
||||
Debug.logError(e, module);
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ContentUnableToOpenFileForWriting", UtilMisc.toMap("fileName", file.getAbsolutePath()), locale));
|
||||
Debug.logError(e, MODULE);
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "ContentUnableToOpenFileForWriting",
|
||||
UtilMisc.toMap("fileName", file.getAbsolutePath()), locale));
|
||||
} catch (IOException e) {
|
||||
Debug.logError(e, module);
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ContentUnableWriteBinaryDataToFile", UtilMisc.toMap("fileName", file.getAbsolutePath()), locale));
|
||||
Debug.logError(e, MODULE);
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "ContentUnableWriteBinaryDataToFile",
|
||||
UtilMisc.toMap("fileName", file.getAbsolutePath()), locale));
|
||||
}
|
||||
} else {
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ContentNoContentFilePassed", UtilMisc.toMap("fileName", file.getAbsolutePath()), locale));
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "ContentNoContentFilePassed",
|
||||
UtilMisc.toMap("fileName", file.getAbsolutePath()), locale));
|
||||
}
|
||||
|
||||
} catch (IOException e) {
|
||||
Debug.logWarning(e, module);
|
||||
Debug.logWarning(e, MODULE);
|
||||
throw new GenericServiceException(e.getMessage());
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Map<String, Object> renderDataResourceAsText(DispatchContext dctx, Map<String, ? extends Object> context) throws GeneralException, IOException {
|
||||
public static Map<String, Object> renderDataResourceAsText(DispatchContext dctx, Map<String, ? extends Object> context)
|
||||
throws GeneralException, IOException {
|
||||
Map<String, Object> results = new HashMap<>();
|
||||
//LocalDispatcher dispatcher = dctx.getDispatcher();
|
||||
Writer out = (Writer) context.get("outWriter");
|
||||
Map<String, Object> templateContext = UtilGenerics.checkMap(context.get("templateContext"));
|
||||
Map<String, Object> templateContext = UtilGenerics.cast(context.get("templateContext"));
|
||||
//GenericValue userLogin = (GenericValue) context.get("userLogin");
|
||||
String dataResourceId = (String) context.get("dataResourceId");
|
||||
if (templateContext != null && UtilValidate.isEmpty(dataResourceId)) {
|
||||
@@ -514,7 +534,7 @@ public class DataServices {
|
||||
out.write(outWriter.toString());
|
||||
results.put("textData", outWriter.toString());
|
||||
} catch (IOException e) {
|
||||
Debug.logError(e, "Error rendering sub-content text", module);
|
||||
Debug.logError(e, "Error rendering sub-content text", MODULE);
|
||||
return ServiceUtil.returnError(e.toString());
|
||||
}
|
||||
return results;
|
||||
@@ -533,14 +553,15 @@ public class DataServices {
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
//Locale locale = (Locale) context.get("locale");
|
||||
String dataResourceId = (String) context.get("dataResourceId");
|
||||
ByteBuffer byteBuffer = (ByteBuffer)context.get("imageData");
|
||||
ByteBuffer byteBuffer = (ByteBuffer) context.get("imageData");
|
||||
if (byteBuffer != null) {
|
||||
byte[] imageBytes = byteBuffer.array();
|
||||
try {
|
||||
GenericValue imageDataResource = EntityQuery.use(delegator).from("ImageDataResource").where("dataResourceId", dataResourceId).queryOne();
|
||||
GenericValue imageDataResource = EntityQuery.use(delegator).from("ImageDataResource")
|
||||
.where("dataResourceId", dataResourceId).queryOne();
|
||||
if (Debug.infoOn()) {
|
||||
Debug.logInfo("imageDataResource(U):" + imageDataResource, module);
|
||||
Debug.logInfo("imageBytes(U):" + Arrays.toString(imageBytes), module);
|
||||
Debug.logInfo("imageDataResource(U):" + imageDataResource, MODULE);
|
||||
Debug.logInfo("imageBytes(U):" + Arrays.toString(imageBytes), MODULE);
|
||||
}
|
||||
if (imageDataResource == null) {
|
||||
return createImageMethod(dctx, context);
|
||||
@@ -566,14 +587,14 @@ public class DataServices {
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
String dataResourceId = (String) context.get("dataResourceId");
|
||||
ByteBuffer byteBuffer = (ByteBuffer)context.get("imageData");
|
||||
ByteBuffer byteBuffer = (ByteBuffer) context.get("imageData");
|
||||
if (byteBuffer != null) {
|
||||
byte[] imageBytes = byteBuffer.array();
|
||||
try {
|
||||
GenericValue imageDataResource = delegator.makeValue("ImageDataResource", UtilMisc.toMap("dataResourceId", dataResourceId));
|
||||
imageDataResource.setBytes("imageData", imageBytes);
|
||||
if (Debug.infoOn()) {
|
||||
Debug.logInfo("imageDataResource(C):" + imageDataResource, module);
|
||||
Debug.logInfo("imageDataResource(C):" + imageDataResource, MODULE);
|
||||
}
|
||||
imageDataResource.create();
|
||||
} catch (GenericEntityException e) {
|
||||
@@ -597,35 +618,34 @@ public class DataServices {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Map<String, Object> createBinaryFileMethod(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException {
|
||||
public static Map<String, Object> createBinaryFileMethod(DispatchContext dctx, Map<String, ? extends Object> context)
|
||||
throws GenericServiceException {
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
GenericValue dataResource = (GenericValue) context.get("dataResource");
|
||||
String dataResourceTypeId = (String) dataResource.get("dataResourceTypeId");
|
||||
String objectInfo = (String) dataResource.get("objectInfo");
|
||||
byte [] imageData = (byte []) context.get("imageData");
|
||||
String rootDir = (String)context.get("rootDir");
|
||||
byte[] imageData = (byte[]) context.get("imageData");
|
||||
String rootDir = (String) context.get("rootDir");
|
||||
Locale locale = (Locale) context.get("locale");
|
||||
File file = null;
|
||||
if (Debug.infoOn()) {
|
||||
Debug.logInfo("in createBinaryFileMethod, dataResourceTypeId:" + dataResourceTypeId, module);
|
||||
Debug.logInfo("in createBinaryFileMethod, objectInfo:" + objectInfo, module);
|
||||
Debug.logInfo("in createBinaryFileMethod, rootDir:" + rootDir, module);
|
||||
Debug.logInfo("in createBinaryFileMethod, dataResourceTypeId:" + dataResourceTypeId, MODULE);
|
||||
Debug.logInfo("in createBinaryFileMethod, objectInfo:" + objectInfo, MODULE);
|
||||
Debug.logInfo("in createBinaryFileMethod, rootDir:" + rootDir, MODULE);
|
||||
}
|
||||
try {
|
||||
file = DataResourceWorker.getContentFile(dataResourceTypeId, objectInfo, rootDir);
|
||||
} catch (FileNotFoundException | GeneralException e) {
|
||||
Debug.logWarning(e, module);
|
||||
Debug.logWarning(e, MODULE);
|
||||
throw new GenericServiceException(e.getMessage());
|
||||
}
|
||||
if (Debug.infoOn()) {
|
||||
Debug.logInfo("in createBinaryFileMethod, file:" + file, module);
|
||||
Debug.logInfo("in createBinaryFileMethod, imageData:" + imageData.length, module);
|
||||
Debug.logInfo("in createBinaryFileMethod, file:" + file, MODULE);
|
||||
Debug.logInfo("in createBinaryFileMethod, imageData:" + imageData.length, MODULE);
|
||||
}
|
||||
if (imageData != null && imageData.length > 0) {
|
||||
try (
|
||||
FileOutputStream out = new FileOutputStream(file);
|
||||
) {
|
||||
try (FileOutputStream out = new FileOutputStream(file);) {
|
||||
out.write(imageData);
|
||||
// Check if a webshell is not uploaded
|
||||
if (!org.apache.ofbiz.security.SecuredUpload.isValidFile(file.getAbsolutePath(), "All", delegator)) {
|
||||
@@ -633,10 +653,10 @@ public class DataServices {
|
||||
return ServiceUtil.returnError(errorMessage);
|
||||
}
|
||||
if (Debug.infoOn()) {
|
||||
Debug.logInfo("in createBinaryFileMethod, length:" + file.length(), module);
|
||||
Debug.logInfo("in createBinaryFileMethod, length:" + file.length(), MODULE);
|
||||
}
|
||||
} catch (IOException | ImageReadException e) {
|
||||
Debug.logWarning(e, module);
|
||||
Debug.logWarning(e, MODULE);
|
||||
throw new GenericServiceException(e.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -657,38 +677,34 @@ public class DataServices {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Map<String, Object> updateBinaryFileMethod(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException {
|
||||
public static Map<String, Object> updateBinaryFileMethod(DispatchContext dctx, Map<String, ? extends Object> context)
|
||||
throws GenericServiceException {
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
GenericValue dataResource = (GenericValue) context.get("dataResource");
|
||||
String dataResourceTypeId = (String) dataResource.get("dataResourceTypeId");
|
||||
String objectInfo = (String) dataResource.get("objectInfo");
|
||||
byte [] imageData = (byte []) context.get("imageData");
|
||||
String rootDir = (String)context.get("rootDir");
|
||||
byte[] imageData = (byte[]) context.get("imageData");
|
||||
String rootDir = (String) context.get("rootDir");
|
||||
Locale locale = (Locale) context.get("locale");
|
||||
File file = null;
|
||||
if (Debug.infoOn()) {
|
||||
Debug.logInfo("in updateBinaryFileMethod, dataResourceTypeId:" + dataResourceTypeId, module);
|
||||
Debug.logInfo("in updateBinaryFileMethod, objectInfo:" + objectInfo, module);
|
||||
Debug.logInfo("in updateBinaryFileMethod, rootDir:" + rootDir, module);
|
||||
Debug.logInfo("in updateBinaryFileMethod, dataResourceTypeId:" + dataResourceTypeId, MODULE);
|
||||
Debug.logInfo("in updateBinaryFileMethod, objectInfo:" + objectInfo, MODULE);
|
||||
Debug.logInfo("in updateBinaryFileMethod, rootDir:" + rootDir, MODULE);
|
||||
}
|
||||
try {
|
||||
file = DataResourceWorker.getContentFile(dataResourceTypeId, objectInfo, rootDir);
|
||||
} catch (FileNotFoundException e) {
|
||||
Debug.logWarning(e, module);
|
||||
} catch (FileNotFoundException | GeneralException e) {
|
||||
Debug.logWarning(e, MODULE);
|
||||
throw new GenericServiceException(e.getMessage());
|
||||
} catch (GeneralException e2) {
|
||||
Debug.logWarning(e2, module);
|
||||
throw new GenericServiceException(e2.getMessage());
|
||||
}
|
||||
if (Debug.infoOn()) {
|
||||
Debug.logInfo("in updateBinaryFileMethod, file:" + file, module);
|
||||
Debug.logInfo("in updateBinaryFileMethod, imageData:" + Arrays.toString(imageData), module);
|
||||
Debug.logInfo("in updateBinaryFileMethod, file:" + file, MODULE);
|
||||
Debug.logInfo("in updateBinaryFileMethod, imageData:" + Arrays.toString(imageData), MODULE);
|
||||
}
|
||||
if (imageData != null && imageData.length > 0) {
|
||||
try (
|
||||
FileOutputStream out = new FileOutputStream(file);
|
||||
){
|
||||
try (FileOutputStream out = new FileOutputStream(file);) {
|
||||
out.write(imageData);
|
||||
// Check if a webshell is not uploaded
|
||||
if (!org.apache.ofbiz.security.SecuredUpload.isValidFile(file.getAbsolutePath(), "All", delegator)) {
|
||||
@@ -697,10 +713,10 @@ public class DataServices {
|
||||
}
|
||||
|
||||
if (Debug.infoOn()) {
|
||||
Debug.logInfo("in updateBinaryFileMethod, length:" + file.length(), module);
|
||||
Debug.logInfo("in updateBinaryFileMethod, length:" + file.length(), MODULE);
|
||||
}
|
||||
} catch (IOException | ImageReadException e) {
|
||||
Debug.logWarning(e, module);
|
||||
Debug.logWarning(e, MODULE);
|
||||
throw new GenericServiceException(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://ofbiz.apache.org/Widget-Form" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Form http://ofbiz.apache.org/dtds/widget-form.xsd">
|
||||
<!-- ContentType forms -->
|
||||
<form name="AddContentType" target="addContentType" title="" type="single"
|
||||
@@ -214,7 +214,7 @@ under the License.
|
||||
<form name="UpdateContentPurposeOperation" target="" title="" type="list" list-name="contentList"
|
||||
odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
|
||||
<actions>
|
||||
<entity-one entity-name="ContentPurposeOperation" use-cache="false"/>
|
||||
<entity-condition entity-name="ContentPurposeOperation" use-cache="false"/>
|
||||
</actions>
|
||||
<auto-fields-service service-name="updateContentPurposeOperation" default-field-type="display"/>
|
||||
<field name="deleteLink" title=" " widget-style="buttontext">
|
||||
|
||||
@@ -26,7 +26,7 @@ under the License.
|
||||
<actions>
|
||||
<set field="headerItem" value="Forum"/>
|
||||
<property-map resource="ContentUiLabels" map-name="uiLabelMap" global="true"/>
|
||||
<set field="pageTitle" from-field="uiLabelMap.[titleProperty]"/>
|
||||
<set field="pageTitle" from-field="uiLabelMap.${titleProperty}"/>
|
||||
</actions>
|
||||
<widgets>
|
||||
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/entitymodel.xsd">
|
||||
<!-- ========================================================= -->
|
||||
<!-- ======================== Defaults ======================= -->
|
||||
<!-- ========================================================= -->
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/entitymodel.xsd">
|
||||
<!-- ========================================================= -->
|
||||
<!-- ======================== Defaults ======================= -->
|
||||
<!-- ========================================================= -->
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/entitymodel.xsd">
|
||||
<!-- ========================================================= -->
|
||||
<!-- ======================== Defaults ======================= -->
|
||||
<!-- ========================================================= -->
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/entitymodel.xsd">
|
||||
<!-- ========================================================= -->
|
||||
<!-- ======================== Defaults ======================= -->
|
||||
<!-- ========================================================= -->
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/entitymodel.xsd">
|
||||
<!-- ========================================================= -->
|
||||
<!-- ======================== Defaults ======================= -->
|
||||
<!-- ========================================================= -->
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/entitymodel.xsd">
|
||||
<!-- ========================================================= -->
|
||||
<!-- ======================== Defaults ======================= -->
|
||||
<!-- ========================================================= -->
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/entitymodel.xsd">
|
||||
<!-- ========================================================= -->
|
||||
<!-- ======================== Defaults ======================= -->
|
||||
<!-- ========================================================= -->
|
||||
|
||||
@@ -18,7 +18,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/entitymodel.xsd">
|
||||
<!-- ========================================================= -->
|
||||
<!-- ======================== Defaults ======================= -->
|
||||
<!-- ========================================================= -->
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/entitymodel.xsd">
|
||||
<!-- ========================================================= -->
|
||||
<!-- ======================== Defaults ======================= -->
|
||||
<!-- ========================================================= -->
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/entitymodel.xsd">
|
||||
<!-- ========================================================= -->
|
||||
<!-- ======================== Defaults ======================= -->
|
||||
<!-- ========================================================= -->
|
||||
|
||||
@@ -20,7 +20,7 @@ under the License.
|
||||
|
||||
<ofbiz-component name="datamodel"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/ofbiz-component.xsd">
|
||||
<resource-loader name="main" type="component"/>
|
||||
|
||||
<entity-resource type="model" reader-name="main" loader="main" location="entitydef/accounting-entitymodel.xml"/>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
|
||||
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
|
||||
<property key="EmplLeaveReasonType.description.CASUAL">
|
||||
<value xml:lang="en">Casual</value>
|
||||
<value xml:lang="fr">Convenance</value>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
under the License.
|
||||
-->
|
||||
|
||||
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
|
||||
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
|
||||
<property key="HumanResRequiredFieldMissingTrainingClassTypeId">
|
||||
<value xml:lang="en">Required Field Missing : Training Class Type Id.</value>
|
||||
</property>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
|
||||
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
|
||||
<property key="FormFieldTitle_accountNumber">
|
||||
<value xml:lang="en">Account Number</value>
|
||||
<value xml:lang="de">Kontonummer</value>
|
||||
|
||||
@@ -20,7 +20,7 @@ under the License.
|
||||
|
||||
<ofbiz-component name="humanres"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/ofbiz-component.xsd">
|
||||
<resource-loader name="main" type="component"/>
|
||||
<classpath type="dir" location="config"/>
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Human Resources Services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Human Resources Services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Humanres Services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ under the License.
|
||||
-->
|
||||
|
||||
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
||||
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
|
||||
<description>Humanres Services</description>
|
||||
<vendor>OFBiz</vendor>
|
||||
|
||||
|
||||
@@ -121,19 +121,7 @@ var rawdata = [
|
||||
EmpPosition: {
|
||||
label: "Add Employee Position",
|
||||
action: function (NODE, TREE_OBJ) {
|
||||
var dataSet = {};
|
||||
dataSet = {"partyId" : NODE.attr("id")};
|
||||
jQuery.ajax({
|
||||
type: "GET",
|
||||
url: "EditEmplPosition",
|
||||
data: dataSet,
|
||||
error: function(msg) {
|
||||
alert("An error occurred loading content! : " + msg);
|
||||
},
|
||||
success: function(msg) {
|
||||
jQuery('div.page-container').html(msg);
|
||||
}
|
||||
});
|
||||
window.location.href = "EditEmplPosition?partyId=" + NODE.attr("id");
|
||||
}
|
||||
},
|
||||
AddIntOrg: {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user