Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…nector into customer-deposit-view-entity
  • Loading branch information
nutan shinde committed Jan 10, 2025
2 parents 1b3ce1f + 56f870a commit e8fe882
Show file tree
Hide file tree
Showing 9 changed files with 940 additions and 4 deletions.
60 changes: 60 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
apply plugin: 'java-library'
apply plugin: 'groovy'

// sourceCompatibility = 11
// targetCompatibility = 11

def componentNode = parseComponent(project)
version = componentNode.'@version'

def moquiDir = projectDir.parentFile.parentFile.parentFile
def frameworkDir = file(moquiDir.absolutePath + '/framework')
def jarBaseName = componentNode.'@name'

// to run use "gradle dependencyUpdates"
apply plugin: 'com.github.ben-manes.versions'
buildscript {
repositories {
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies { classpath 'com.github.ben-manes:gradle-versions-plugin:0.21.0' }
}
dependencyUpdates.resolutionStrategy = { componentSelection { rules -> rules.all { ComponentSelection selection ->
boolean rejected = ['alpha', 'beta', 'rc', 'cr', 'm'].any { qualifier -> selection.candidate.version ==~ /(?i).*[.-]${qualifier}[.\d-]*/ }
if (rejected) selection.reject('Release candidate')
} } }

repositories {
flatDir name: 'localLib', dirs: frameworkDir.absolutePath + '/lib'
mavenCentral()
}

// Log4J has annotation processors, disable to avoid warning
tasks.withType(JavaCompile) { options.compilerArgs << "-proc:none" }
tasks.withType(GroovyCompile) { options.compilerArgs << "-proc:none" }

dependencies {
implementation project(':framework')
//mySql Database jar
runtimeOnly 'mysql:mysql-connector-java:8.0.33'
}

// by default the Java plugin runs test on build, change to not do that (only run test if explicit task)
// no longer workds as of gradle 4.8 or possibly earlier, use clear() instead: check.dependsOn.remove(test)
check.dependsOn.clear()

task cleanLib(type: Delete) { delete fileTree(dir: projectDir.absolutePath+'/lib', include: '*') }
clean.dependsOn cleanLib

jar {
destinationDirectory = file(projectDir.absolutePath + '/lib')
archiveBaseName = jarBaseName
}

task copyDependencies { doLast {
copy { from (configurations.runtimeClasspath - project(':framework').configurations.runtimeClasspath - project(':framework').jar.archivePath)
into file(projectDir.absolutePath + '/lib') }
} }
copyDependencies.dependsOn cleanLib
jar.dependsOn copyDependencies
2 changes: 1 addition & 1 deletion component.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<component xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/moqui-conf-3.xsd"
name="mantle-net-suite-connector" version="1.0.0">
name="mantle-netsuite-connector" version="1.0.0">
</component>
14 changes: 14 additions & 0 deletions data/ServiceJobData.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<entity-facade-xml type="seed">
<!-- ServiceJob data for create order from HC to netsuite -->
<moqui.service.job.ServiceJob jobName="generate_CreateOrderFeed" description="Generate HotWax Create Order Feed for Netsuite"
serviceName="co.hotwax.netsuite.OrderServices.generate#CreateOrderFeed" cronExpression="0 0/15 * * * ?" paused="Y">
<parameters parameterName="systemMessageTypeId" parameterValue=""/>
<parameters parameterName="systemMessageRemoteId" parameterValue=""/>
<parameters parameterName="orderId" parameterValue=""/>
<parameters parameterName="fromOrderDate" parameterValue=""/>
<parameters parameterName="thruOrderDate" parameterValue=""/>
<parameters parameterName="includeShipmentMethod" parameterValue=""/>
<parameters parameterName="excludeShipmentMethod" parameterValue=""/>
</moqui.service.job.ServiceJob>
</entity-facade-xml>
23 changes: 23 additions & 0 deletions data/SystemMessageData.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<entity-facade-xml type="seed">
<!-- System Message Type for Create Order Feed for Netsuite -->
<moqui.service.message.SystemMessageType systemMessageTypeId="PosCashOrderItemsFeed"
description="Generate HotWax Create POS Order Feed for Netsuite"
parentTypeId="LocalFeedFile"
sendPath="/home/${sftpUsername}/netsuite/cashsale/export/PosCashOrderItemsFeed-${systemMessageId}-${dateTime}.csv"
sendServiceName="co.hotwax.ofbiz.SystemMessageServices.send#SystemMessageFileSftp"
receivePath="${contentRoot}/CreateOrderFeed/cashsale/createOrderFeed-${dateTime}.csv"/>

<moqui.service.message.SystemMessageType systemMessageTypeId="NetSuiteOrderItemsFeed"
description="Generate HotWax Create Order Feed for Netsuite"
parentTypeId="LocalFeedFile"
sendPath="/home/${sftpUsername}/netsuite/salesorder/export/CreatedOrderItemsFeed-${systemMessageId}-${dateTime}.csv"
sendServiceName="co.hotwax.ofbiz.SystemMessageServices.send#SystemMessageFileSftp"
receivePath="${contentRoot}/CreateOrderFeed/salesorder/createOrderFeed-${dateTime}.csv"/>

<moqui.service.message.SystemMessageTypeParameter systemMessageTypeId="PosCashOrderItemsFeed"
parameterName="resourcePath" parameterValue="" systemMessageRemoteId=""/>

<moqui.service.message.SystemMessageTypeParameter systemMessageTypeId="NetSuiteOrderItemsFeed"
parameterName="resourcePath" parameterValue="" systemMessageRemoteId=""/>
</entity-facade-xml>
35 changes: 35 additions & 0 deletions data/UpgradeData_Upcoming.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<entity-facade-xml type="ext-upgrade">
<!-- ServiceJob data for create order from HC to netsuite -->
<moqui.service.job.ServiceJob jobName="generate_CreateOrderFeed" description="Generate HotWax Create Order Feed for Netsuite"
serviceName="co.hotwax.netsuite.OrderServices.generate#CreateOrderFeed" cronExpression="0 0/15 * * * ?" paused="Y">
<parameters parameterName="systemMessageTypeId" parameterValue=""/>
<parameters parameterName="systemMessageRemoteId" parameterValue=""/>
<parameters parameterName="orderId" parameterValue=""/>
<parameters parameterName="fromOrderDate" parameterValue=""/>
<parameters parameterName="thruOrderDate" parameterValue=""/>
<parameters parameterName="includeShipmentMethod" parameterValue=""/>
<parameters parameterName="excludeShipmentMethod" parameterValue=""/>
</moqui.service.job.ServiceJob>

<!-- System Message Type for Create Order Feed for Netsuite -->
<moqui.service.message.SystemMessageType systemMessageTypeId="PosCashOrderItemsFeed"
description="Generate HotWax Create POS Order Feed for Netsuite"
parentTypeId="LocalFeedFile"
sendPath="/home/${sftpUsername}/netsuite/cashsale/export/PosCashOrderItemsFeed-${systemMessageId}-${dateTime}.csv"
sendServiceName="co.hotwax.ofbiz.SystemMessageServices.send#SystemMessageFileSftp"
receivePath="${contentRoot}/CreateOrderFeed/cashsale/createOrderFeed-${dateTime}.csv"/>

<moqui.service.message.SystemMessageType systemMessageTypeId="NetSuiteOrderItemsFeed"
description="Generate HotWax Create Order Feed for Netsuite"
parentTypeId="LocalFeedFile"
sendPath="/home/${sftpUsername}/netsuite/salesorder/export/CreatedOrderItemsFeed-${systemMessageId}-${dateTime}.csv"
sendServiceName="co.hotwax.ofbiz.SystemMessageServices.send#SystemMessageFileSftp"
receivePath="${contentRoot}/CreateOrderFeed/salesorder/createOrderFeed-${dateTime}.csv"/>

<moqui.service.message.SystemMessageTypeParameter systemMessageTypeId="PosCashOrderItemsFeed"
parameterName="resourcePath" parameterValue="" systemMessageRemoteId=""/>

<moqui.service.message.SystemMessageTypeParameter systemMessageTypeId="NetSuiteOrderItemsFeed"
parameterName="resourcePath" parameterValue="" systemMessageRemoteId=""/>
</entity-facade-xml>
Loading

0 comments on commit e8fe882

Please sign in to comment.