Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
Add changes and prepare lubrary release
Browse files Browse the repository at this point in the history
  • Loading branch information
yamelsenih committed Mar 6, 2024
1 parent 0eb58bf commit af737b1
Show file tree
Hide file tree
Showing 10 changed files with 12,040 additions and 29 deletions.
11 changes: 11 additions & 0 deletions .settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
arguments=
auto.sync=false
build.scans.enabled=false
connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(8.0.2))
connection.project.dir=
eclipse.preferences.version=1
gradle.user.home=
java.home=
jvm.arguments=
offline.mode=false
override.workspace.settings=true
show.console.view=true
show.executions.view=true
4 changes: 4 additions & 0 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.source=11
63 changes: 50 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,70 @@
# ADempiere Template Project
# ADempiere Mobile Changes

A project to make dictionary changes from ADempiere and reuse some entities inside mobile application


## Badges

Add badges from somewhere like: [shields.io](https://shields.io/)

[![GPLv3 License](https://img.shields.io/badge/License-GPL%20v3-yellow.svg)](https://opensource.org/licenses/)

Fill it with a comment about project.

## Requirements
- [JDK 11 or later](https://adoptium.net/)
- [Gradle 8.0.1 or later](https://gradle.org/install/)


### Packages Names
you should change the follows packages for your own implementation, just change the word `template` by your implementation
The main package name is `org.spin.mobile` by your implementation

```Java
org.spin.template.model.validator
org.spin.template.setup
org.spin.template.util
org.spin.mobile.model.validator
org.spin.mobile.setup
org.spin.mobile.util
```

### Model Validators
Change the `org.spin.template.model.validator.Validator` by your implementation, example: `org.spin.template.model.validator.MyOwnFunctionality`
Change the `org.spin.mobile.model.validator.Validator` by your implementation, example: `org.spin.mobile.model.validator.MyOwnFunctionality`

### Model Deploy class
Change the `org.spin.template.setup.Deploy` by your implementation, example: `org.spin.template.setup.MyOwnSetupForDeploy`
Change the `org.spin.mobile.setup.Deploy` by your implementation, example: `org.spin.mobile.setup.MyOwnSetupForDeploy`

### Model Util class for core changes
Change the `org.spin.template.util.Changes` by your implementation, example: `org.spin.template.util.MyOwnChanges`
Change the `org.spin.mobile.util.Changes` by your implementation, example: `org.spin.mobile.util.MyOwnChanges`

## Core Changes

The main core changes is some elements and columns added to identify mobile entities.

### Entity Type

- Code: `MOBILE`
- Name: `Spin Contribution (Mobile Support)`
- Model Package: `org.spin.mobile.model`

### Elements

- DB Column Name: `MOBILE_IsMobile`
- Name: `Mobile Feature`
- Type: `Yes-No`

### Column Changes

- Table: `AD_Form`
- `MOBILE_IsMobile`
- `MOBILE_Slug`
- `MOBILE_ImageURL`

- Table: `AD_User`
- `MOBILE_IsMobile`
- Table: `AD_Role`
- `MOBILE_IsMobile`


## Binary Project

You can get all binaries from github [here](https://central.sonatype.com/artifact/io.github.adempiere/adempiere-template-project/1.0.0).
You can get all binaries from github [here](https://central.sonatype.com/artifact/io.github.adempiere/adempiere-mobile-changes/1.0.0).

All contruction is from github actions

Expand All @@ -44,21 +81,21 @@ Is very easy.
- Gradle

```Java
implementation 'io.github.adempiere:adempiere-template-project:1.0.0'
implementation 'io.github.adempiere:adempiere-mobile-changes:1.0.0'
```

- SBT

```
libraryDependencies += "io.github.adempiere" % "adempiere-template-project" % "1.0.0"
libraryDependencies += "io.github.adempiere" % "adempiere-mobile-changes" % "1.0.0"
```

- Apache Maven

```
<dependency>
<groupId>io.github.adempiere</groupId>
<artifactId>adempiere-template-project</artifactId>
<artifactId>adempiere-mobile-changes</artifactId>
<version>1.0.0</version>
</dependency>
```
14 changes: 7 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ version = System.getenv("ADEMPIERE_LIBRARY_VERSION") ?: "local-1.0.0"
jar {
manifest {
attributes(
"Implementation-Title": "ADempiere Template Management",
"Implementation-Title": "ADempiere Mobile Changes",
"Implementation-Version": version,
"EntityType": entityType
)
Expand All @@ -73,12 +73,12 @@ publishing {
publications {
mavenJava(MavenPublication) {
groupId = group
artifactId = 'adempiere-template-project'
artifactId = 'adempiere-mobile-changes'
version = version
from components.java
pom {
name = 'ADempiere Template Project'
description = 'Fill it with project description'
name = 'ADempiere Mobile Changes'
description = 'A project to make dictionary changes from ADempiere and reuse some entities inside mobile application'
url = 'http://adempiere.io/'
licenses {
license {
Expand All @@ -94,9 +94,9 @@ publishing {
}
}
scm {
connection = 'scm:git:git://github.com/adempiere/adempiere-template-project.git'
developerConnection = 'scm:git:ssh://github.com/adempiere/adempiere-template-project.git'
url = 'http://github.com/adempiere/adempiere-template-project'
connection = 'scm:git:git://github.com/adempiere/adempiere-mobile-changes.git'
developerConnection = 'scm:git:ssh://github.com/adempiere/adempiere-mobile-changes.git'
url = 'http://github.com/adempiere/adempiere-mobile-changes'
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rootProject.name = 'adempiere-template-project'
rootProject.name = 'adempiere-mobile-changes'
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
************************************************************************************/
package org.spin.template.model.validator;
package org.spin.mobile.model.validator;

import org.adempiere.core.domains.models.I_C_Order;
import org.adempiere.core.domains.models.I_C_OrderLine;
Expand All @@ -23,7 +23,7 @@
import org.compiere.model.ModelValidator;
import org.compiere.model.PO;
import org.compiere.util.CLogger;
import org.spin.template.util.Changes;
import org.spin.mobile.util.Changes;

/**
* Write here your change comment
Expand Down Expand Up @@ -86,7 +86,7 @@ public String docValidate(PO entity, int timing) {
MDocType documentType = MDocType.get(entity.getCtx(), order.getC_DocTypeTarget_ID());
if(order.isSOTrx()
&& !order.isReturnOrder()
&& documentType.get_ValueAsBoolean(Changes.COLUMNNAME_ColumAddedToCore)) {
&& documentType.get_ValueAsBoolean(Changes.COLUMNNAME_MOBILE_IsMobile)) {

}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
* All Rights Reserved. *
* Contributor(s): Yamel Senih www.erpya.com *
*****************************************************************************/
package org.spin.template.setup;
package org.spin.mobile.setup;

import java.util.Properties;

import org.compiere.model.Query;
import org.adempiere.core.domains.models.X_AD_ModelValidator;
import org.spin.template.model.validator.Validator;
import org.spin.mobile.model.validator.Validator;
import org.spin.util.ISetupDefinition;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,18 @@
* All Rights Reserved. *
* Contributor(s): Yamel Senih www.erpya.com *
*****************************************************************************/
package org.spin.template.util;
package org.spin.mobile.util;

/**
* Add here all changes for core and statci methods
* Please rename this class and package
* @author Yamel Senih, [email protected], ERPCyA http://www.erpya.com
*/
public class Changes {
/** Colum added to core */
public static final String COLUMNNAME_ColumAddedToCore = "ColumAddedToCore";
/** Is Mobile Feature */
public static final String COLUMNNAME_MOBILE_IsMobile = "MOBILE_IsMobile";
/** Form Slug */
public static final String COLUMNNAME_MOBILE_Slug = "MOBILE_Slug";
/** Image URL */
public static final String COLUMNNAME_MOBILE_ImageURL = "MOBILE_ImageURL";
}
26 changes: 26 additions & 0 deletions xml/migration/10330_ERPYA_Add_Entity_Type_MOBILE.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Migrations>
<Migration EntityType="D" Name="ERPYA Add Entity Type MOBILE" ReleaseNo="3.9.5" SeqNo="10330">
<Step SeqNo="10" StepType="AD">
<PO AD_Table_ID="882" Action="I" Record_ID="50161" Table="AD_EntityType">
<Data AD_Column_ID="15604" Column="Version" isNewNull="true"/>
<Data AD_Column_ID="84318" Column="UUID">272afb75-d76a-4df3-9847-6bee75c862f5</Data>
<Data AD_Column_ID="15600" Column="UpdatedBy">100</Data>
<Data AD_Column_ID="15599" Column="Updated">2024-03-05 17:17:18.157</Data>
<Data AD_Column_ID="15607" Column="Processing">false</Data>
<Data AD_Column_ID="15601" Column="Name">Spin Contribution (Mobile Support)</Data>
<Data AD_Column_ID="15605" Column="ModelPackage">org.spin.mobile.model</Data>
<Data AD_Column_ID="15596" Column="IsActive">true</Data>
<Data AD_Column_ID="15603" Column="Help">Contribution by E.R.P Consultores y Asociados, C.A</Data>
<Data AD_Column_ID="15592" Column="EntityType">MOBILE</Data>
<Data AD_Column_ID="15602" Column="Description">Spin Contribution (Mobile support definitions)</Data>
<Data AD_Column_ID="15598" Column="CreatedBy">100</Data>
<Data AD_Column_ID="15597" Column="Created">2024-03-05 17:17:18.157</Data>
<Data AD_Column_ID="15606" Column="Classpath" isNewNull="true"/>
<Data AD_Column_ID="15594" Column="AD_Org_ID">0</Data>
<Data AD_Column_ID="15595" Column="AD_EntityType_ID">50161</Data>
<Data AD_Column_ID="15593" Column="AD_Client_ID">0</Data>
</PO>
</Step>
</Migration>
</Migrations>
Loading

0 comments on commit af737b1

Please sign in to comment.