-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #264: Added deleted client gradle task process.
EPL-1146: Also fixed issues with source format modules with dependencies to JAR format modules unable to find their tables.
- Loading branch information
Matias Bernal
committed
Dec 27, 2023
1 parent
170f3dd
commit 7897e05
Showing
3 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/org/openbravo/service/system/SystemDeleteClientTask.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package org.openbravo.service.system; | ||
|
||
import org.apache.logging.log4j.LogManager; | ||
import org.apache.logging.log4j.Logger; | ||
import org.openbravo.base.exception.OBException; | ||
import org.openbravo.dal.core.DalInitializingTask; | ||
import org.openbravo.dal.service.OBDal; | ||
import org.openbravo.model.ad.system.Client; | ||
|
||
/** | ||
* Performs delete client process. | ||
* | ||
* @author szapata | ||
*/ | ||
public class SystemDeleteClientTask extends DalInitializingTask { | ||
private static final Logger log = LogManager.getLogger("SystemDeleteClientTask"); | ||
protected String clientId; | ||
|
||
public void setClientId(String clientId) { | ||
this.clientId = clientId; | ||
} | ||
|
||
@Override | ||
protected void doExecute() { | ||
// Validate module | ||
Client client = OBDal.getInstance().get(Client.class, clientId); | ||
if (client == null) { | ||
throw new OBException("Client not found"); | ||
} | ||
log.info("Deleting Client: {}", client.getName()); | ||
|
||
SystemService.getInstance().deleteClient(client); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters