IDEMPIERE-4598 Disable obsolete IsServer* fields (#467)

* IDEMPIERE-4598 Disable obsolete IsServer* fields

* IDEMPIERE-4598 Disable obsolete IsServer* fields

- Fix wrong migration script name
This commit is contained in:
hengsin 2020-12-14 22:10:29 +08:00 committed by GitHub
parent d9f0c43af8
commit 1df6f63341
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 136 additions and 168 deletions

View File

@ -0,0 +1,66 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- Dec 14, 2020, 10:18:10 AM MYT
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, IsActive='N', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsDisplayedGrid='N', SeqNoGrid=0, IsToolbarButton=NULL,Updated=TO_DATE('2020-12-14 10:18:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=12100
;
-- Dec 14, 2020, 10:19:05 AM MYT
UPDATE AD_Column SET IsMandatory='N', IsUpdateable='N', IsAllowLogging='N', IsAllowCopy='N',Updated=TO_DATE('2020-12-14 10:19:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=14084
;
-- Dec 14, 2020, 10:19:12 AM MYT
ALTER TABLE AD_Process MODIFY IsServerProcess CHAR(1) DEFAULT NULL
;
-- Dec 14, 2020, 10:19:12 AM MYT
ALTER TABLE AD_Process MODIFY IsServerProcess NULL
;
-- Dec 14, 2020, 10:19:37 AM MYT
UPDATE AD_Column SET IsActive='N',Updated=TO_DATE('2020-12-14 10:19:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=14084
;
-- Dec 14, 2020, 10:21:10 AM MYT
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, IsActive='N', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsDisplayedGrid='N', SeqNoGrid=0, IsToolbarButton=NULL,Updated=TO_DATE('2020-12-14 10:21:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=12099
;
-- Dec 14, 2020, 10:21:26 AM MYT
UPDATE AD_Column SET IsMandatory='N', IsUpdateable='N', IsAllowLogging='N', IsAllowCopy='N',Updated=TO_DATE('2020-12-14 10:21:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=14085
;
-- Dec 14, 2020, 10:21:29 AM MYT
ALTER TABLE AD_Client MODIFY IsServerEMail CHAR(1) DEFAULT NULL
;
-- Dec 14, 2020, 10:21:29 AM MYT
ALTER TABLE AD_Client MODIFY IsServerEMail NULL
;
-- Dec 14, 2020, 10:21:34 AM MYT
UPDATE AD_Column SET IsActive='N',Updated=TO_DATE('2020-12-14 10:21:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=14085
;
-- Dec 14, 2020, 10:22:16 AM MYT
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, IsActive='N', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsDisplayedGrid='N', SeqNoGrid=0, IsToolbarButton=NULL,Updated=TO_DATE('2020-12-14 10:22:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=12105
;
-- Dec 14, 2020, 10:22:28 AM MYT
UPDATE AD_Column SET IsMandatory='N', IsUpdateable='N', IsAllowLogging='N', IsAllowCopy='N',Updated=TO_DATE('2020-12-14 10:22:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=14090
;
-- Dec 14, 2020, 10:22:31 AM MYT
ALTER TABLE AD_Task MODIFY IsServerProcess CHAR(1) DEFAULT 'N'
;
-- Dec 14, 2020, 10:22:31 AM MYT
ALTER TABLE AD_Task MODIFY IsServerProcess NULL
;
-- Dec 14, 2020, 10:22:36 AM MYT
UPDATE AD_Column SET IsActive='N',Updated=TO_DATE('2020-12-14 10:22:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=14090
;
SELECT register_migration_script('202012140240_IDEMPIERE-4598.sql') FROM dual
;

View File

@ -0,0 +1,63 @@
-- Dec 14, 2020, 10:18:10 AM MYT
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, IsActive='N', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsDisplayedGrid='N', SeqNoGrid=0, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-12-14 10:18:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=12100
;
-- Dec 14, 2020, 10:19:05 AM MYT
UPDATE AD_Column SET IsMandatory='N', IsUpdateable='N', IsAllowLogging='N', IsAllowCopy='N',Updated=TO_TIMESTAMP('2020-12-14 10:19:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=14084
;
-- Dec 14, 2020, 10:19:12 AM MYT
INSERT INTO t_alter_column values('ad_process','IsServerProcess','CHAR(1)',null,'NULL')
;
-- Dec 14, 2020, 10:19:12 AM MYT
INSERT INTO t_alter_column values('ad_process','IsServerProcess',null,'NULL',null)
;
-- Dec 14, 2020, 10:19:37 AM MYT
UPDATE AD_Column SET IsActive='N',Updated=TO_TIMESTAMP('2020-12-14 10:19:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=14084
;
-- Dec 14, 2020, 10:21:10 AM MYT
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, IsActive='N', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsDisplayedGrid='N', SeqNoGrid=0, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-12-14 10:21:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=12099
;
-- Dec 14, 2020, 10:21:26 AM MYT
UPDATE AD_Column SET IsMandatory='N', IsUpdateable='N', IsAllowLogging='N', IsAllowCopy='N',Updated=TO_TIMESTAMP('2020-12-14 10:21:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=14085
;
-- Dec 14, 2020, 10:21:29 AM MYT
INSERT INTO t_alter_column values('ad_client','IsServerEMail','CHAR(1)',null,'NULL')
;
-- Dec 14, 2020, 10:21:29 AM MYT
INSERT INTO t_alter_column values('ad_client','IsServerEMail',null,'NULL',null)
;
-- Dec 14, 2020, 10:21:34 AM MYT
UPDATE AD_Column SET IsActive='N',Updated=TO_TIMESTAMP('2020-12-14 10:21:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=14085
;
-- Dec 14, 2020, 10:22:16 AM MYT
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, IsActive='N', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsDisplayedGrid='N', SeqNoGrid=0, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-12-14 10:22:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=12105
;
-- Dec 14, 2020, 10:22:28 AM MYT
UPDATE AD_Column SET IsMandatory='N', IsUpdateable='N', IsAllowLogging='N', IsAllowCopy='N',Updated=TO_TIMESTAMP('2020-12-14 10:22:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=14090
;
-- Dec 14, 2020, 10:22:31 AM MYT
INSERT INTO t_alter_column values('ad_task','IsServerProcess','CHAR(1)',null,'N')
;
-- Dec 14, 2020, 10:22:31 AM MYT
INSERT INTO t_alter_column values('ad_task','IsServerProcess',null,'NULL',null)
;
-- Dec 14, 2020, 10:22:36 AM MYT
UPDATE AD_Column SET IsActive='N',Updated=TO_TIMESTAMP('2020-12-14 10:22:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=14090
;
SELECT register_migration_script('202012140240_IDEMPIERE-4598.sql') FROM dual
;

View File

@ -230,19 +230,6 @@ public interface I_AD_Client
*/ */
public boolean isSecureSMTP(); public boolean isSecureSMTP();
/** Column name IsServerEMail */
public static final String COLUMNNAME_IsServerEMail = "IsServerEMail";
/** Set Server EMail.
* Send EMail from Server
*/
public void setIsServerEMail (boolean IsServerEMail);
/** Get Server EMail.
* Send EMail from Server
*/
public boolean isServerEMail();
/** Column name IsSmtpAuthorization */ /** Column name IsSmtpAuthorization */
public static final String COLUMNNAME_IsSmtpAuthorization = "IsSmtpAuthorization"; public static final String COLUMNNAME_IsSmtpAuthorization = "IsSmtpAuthorization";

View File

@ -329,19 +329,6 @@ public interface I_AD_Process
*/ */
public boolean isReport(); public boolean isReport();
/** Column name IsServerProcess */
public static final String COLUMNNAME_IsServerProcess = "IsServerProcess";
/** Set Server Process.
* Run this Process on Server only
*/
public void setIsServerProcess (boolean IsServerProcess);
/** Get Server Process.
* Run this Process on Server only
*/
public boolean isServerProcess();
/** Column name JasperReport */ /** Column name JasperReport */
public static final String COLUMNNAME_JasperReport = "JasperReport"; public static final String COLUMNNAME_JasperReport = "JasperReport";

View File

@ -178,19 +178,6 @@ public interface I_AD_Task
*/ */
public boolean isActive(); public boolean isActive();
/** Column name IsServerProcess */
public static final String COLUMNNAME_IsServerProcess = "IsServerProcess";
/** Set Server Process.
* Run this Process on Server only
*/
public void setIsServerProcess (boolean IsServerProcess);
/** Get Server Process.
* Run this Process on Server only
*/
public boolean isServerProcess();
/** Column name Name */ /** Column name Name */
public static final String COLUMNNAME_Name = "Name"; public static final String COLUMNNAME_Name = "Name";

View File

@ -31,7 +31,6 @@ import java.util.logging.Level;
import javax.mail.internet.InternetAddress; import javax.mail.internet.InternetAddress;
import org.compiere.db.CConnection;
import org.compiere.util.CLogger; import org.compiere.util.CLogger;
import org.compiere.util.DB; import org.compiere.util.DB;
import org.compiere.util.EMail; import org.compiere.util.EMail;
@ -159,7 +158,6 @@ public class MClient extends X_AD_Client implements ImmutablePOSupport
setIsMultiLingualDocument (false); setIsMultiLingualDocument (false);
setIsSmtpAuthorization (false); setIsSmtpAuthorization (false);
setIsUseBetaFunctions (true); setIsUseBetaFunctions (true);
setIsServerEMail(false);
setAD_Language(Language.getBaseAD_Language()); setAD_Language(Language.getBaseAD_Language());
setAutoArchive(AUTOARCHIVE_None); setAutoArchive(AUTOARCHIVE_None);
setMMPolicy (MMPOLICY_FiFo); // F setMMPolicy (MMPOLICY_FiFo); // F
@ -540,15 +538,7 @@ public class MClient extends X_AD_Client implements ImmutablePOSupport
} }
try try
{ {
String msg = null; String msg = email.send();
if (isServerEMail())
{
msg = CConnection.get().getServer().sendEMail(Env.getRemoteCallCtx(Env.getCtx()), email);
}
else
{
msg = email.send();
}
if (EMail.SENT_OK.equals (msg)) if (EMail.SENT_OK.equals (msg))
{ {
if (log.isLoggable(Level.INFO)) log.info("Sent Test EMail to " + getRequestEMail()); if (log.isLoggable(Level.INFO)) log.info("Sent Test EMail to " + getRequestEMail());
@ -718,15 +708,7 @@ public class MClient extends X_AD_Client implements ImmutablePOSupport
email.addAttachment(attachment); email.addAttachment(attachment);
try try
{ {
String msg = null; String msg = email.send();
if (isServerEMail())
{
msg = CConnection.get().getServer().sendEMail(Env.getRemoteCallCtx(Env.getCtx()), email);
}
else
{
msg = email.send();
}
if (EMail.SENT_OK.equals (msg)) if (EMail.SENT_OK.equals (msg))
{ {
if (log.isLoggable(Level.INFO)) log.info("Sent EMail " + subject + " to " + to); if (log.isLoggable(Level.INFO)) log.info("Sent EMail " + subject + " to " + to);
@ -804,15 +786,7 @@ public class MClient extends X_AD_Client implements ImmutablePOSupport
*/ */
public boolean sendEmailNow(MUser from, MUser to, EMail email) public boolean sendEmailNow(MUser from, MUser to, EMail email)
{ {
String msg = null; String msg = email.send();
if (isServerEMail())
{
msg = CConnection.get().getServer().sendEMail(Env.getRemoteCallCtx(Env.getCtx()), email);
}
else
{
msg = email.send();
}
// //
X_AD_UserMail um = new X_AD_UserMail(getCtx(), 0, to.get_TrxName()); X_AD_UserMail um = new X_AD_UserMail(getCtx(), 0, to.get_TrxName());
um.setClientOrg(this); um.setClientOrg(this);

View File

@ -173,7 +173,6 @@ public class MProcess extends X_AD_Process implements ImmutablePOSupport
// setValue (null); // setValue (null);
// setName (null); // setName (null);
setIsReport (false); setIsReport (false);
setIsServerProcess(false);
setAccessLevel (ACCESSLEVEL_All); setAccessLevel (ACCESSLEVEL_All);
setEntityType (ENTITYTYPE_UserMaintained); setEntityType (ENTITYTYPE_UserMaintained);
setIsBetaFunctionality(false); setIsBetaFunctionality(false);
@ -587,7 +586,6 @@ public class MProcess extends X_AD_Process implements ImmutablePOSupport
setIsBetaFunctionality(source.isBetaFunctionality()); setIsBetaFunctionality(source.isBetaFunctionality());
setIsDirectPrint(source.isDirectPrint()); setIsDirectPrint(source.isDirectPrint());
setIsReport(source.isReport()); setIsReport(source.isReport());
setIsServerProcess(source.isServerProcess());
setJasperReport(source.getJasperReport()); setJasperReport(source.getJasperReport());
setProcedureName(source.getProcedureName()); setProcedureName(source.getProcedureName());
setShowHelp(source.getShowHelp()); setShowHelp(source.getShowHelp());

View File

@ -72,8 +72,6 @@ public class MTask extends X_AD_Task
if (cmd == null || cmd.equals("")) if (cmd == null || cmd.equals(""))
return "Cannot execute '" + getOS_Command() + "'"; return "Cannot execute '" + getOS_Command() + "'";
// //
if (isServerProcess())
return executeRemote(cmd);
return executeLocal(cmd); return executeLocal(cmd);
} // execute } // execute
@ -117,18 +115,6 @@ public class MTask extends X_AD_Task
return sb.toString(); return sb.toString();
} // executeLocal } // executeLocal
/**
* Execute Task locally and wait
* @param cmd command
* @return execution info
*/
public String executeRemote(String cmd)
{
log.config(cmd);
return "Remote:\n";
} // executeRemote
/** /**
* String Representation * String Representation
* @return info * @return info
@ -138,7 +124,6 @@ public class MTask extends X_AD_Task
StringBuilder sb = new StringBuilder ("MTask["); StringBuilder sb = new StringBuilder ("MTask[");
sb.append(get_ID()) sb.append(get_ID())
.append("-").append(getName()) .append("-").append(getName())
.append(";Server=").append(isServerProcess())
.append(";").append(getOS_Command()) .append(";").append(getOS_Command())
.append ("]"); .append ("]");
return sb.toString (); return sb.toString ();

View File

@ -30,7 +30,7 @@ public class X_AD_Client extends PO implements I_AD_Client, I_Persistent
/** /**
* *
*/ */
private static final long serialVersionUID = 20201103L; private static final long serialVersionUID = 20201214L;
/** Standard Constructor */ /** Standard Constructor */
public X_AD_Client (Properties ctx, int AD_Client_ID, String trxName) public X_AD_Client (Properties ctx, int AD_Client_ID, String trxName)
@ -45,7 +45,6 @@ public class X_AD_Client extends PO implements I_AD_Client, I_Persistent
// N // N
setIsSecureSMTP (false); setIsSecureSMTP (false);
// N // N
setIsServerEMail (false);
setIsSmtpAuthorization (false); setIsSmtpAuthorization (false);
// N // N
setIsUseASP (false); setIsUseASP (false);
@ -325,30 +324,6 @@ public class X_AD_Client extends PO implements I_AD_Client, I_Persistent
return false; return false;
} }
/** Set Server EMail.
@param IsServerEMail
Send EMail from Server
*/
public void setIsServerEMail (boolean IsServerEMail)
{
set_Value (COLUMNNAME_IsServerEMail, Boolean.valueOf(IsServerEMail));
}
/** Get Server EMail.
@return Send EMail from Server
*/
public boolean isServerEMail ()
{
Object oo = get_Value(COLUMNNAME_IsServerEMail);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set SMTP Authentication. /** Set SMTP Authentication.
@param IsSmtpAuthorization @param IsSmtpAuthorization
Your mail server requires Authentication Your mail server requires Authentication

View File

@ -30,7 +30,7 @@ public class X_AD_Process extends PO implements I_AD_Process, I_Persistent
/** /**
* *
*/ */
private static final long serialVersionUID = 20201103L; private static final long serialVersionUID = 20201214L;
/** Standard Constructor */ /** Standard Constructor */
public X_AD_Process (Properties ctx, int AD_Process_ID, String trxName) public X_AD_Process (Properties ctx, int AD_Process_ID, String trxName)
@ -44,7 +44,6 @@ public class X_AD_Process extends PO implements I_AD_Process, I_Persistent
// @SQL=select get_sysconfig('DEFAULT_ENTITYTYPE','U',0,0) from dual // @SQL=select get_sysconfig('DEFAULT_ENTITYTYPE','U',0,0) from dual
setIsBetaFunctionality (false); setIsBetaFunctionality (false);
setIsReport (false); setIsReport (false);
setIsServerProcess (false);
setName (null); setName (null);
setValue (null); setValue (null);
} */ } */
@ -492,30 +491,6 @@ public class X_AD_Process extends PO implements I_AD_Process, I_Persistent
return false; return false;
} }
/** Set Server Process.
@param IsServerProcess
Run this Process on Server only
*/
public void setIsServerProcess (boolean IsServerProcess)
{
set_Value (COLUMNNAME_IsServerProcess, Boolean.valueOf(IsServerProcess));
}
/** Get Server Process.
@return Run this Process on Server only
*/
public boolean isServerProcess ()
{
Object oo = get_Value(COLUMNNAME_IsServerProcess);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Jasper Report. /** Set Jasper Report.
@param JasperReport Jasper Report */ @param JasperReport Jasper Report */
public void setJasperReport (String JasperReport) public void setJasperReport (String JasperReport)

View File

@ -30,7 +30,7 @@ public class X_AD_Task extends PO implements I_AD_Task, I_Persistent
/** /**
* *
*/ */
private static final long serialVersionUID = 20201103L; private static final long serialVersionUID = 20201214L;
/** Standard Constructor */ /** Standard Constructor */
public X_AD_Task (Properties ctx, int AD_Task_ID, String trxName) public X_AD_Task (Properties ctx, int AD_Task_ID, String trxName)
@ -42,8 +42,6 @@ public class X_AD_Task extends PO implements I_AD_Task, I_Persistent
setAD_Task_ID (0); setAD_Task_ID (0);
setEntityType (null); setEntityType (null);
// @SQL=select get_sysconfig('DEFAULT_ENTITYTYPE','U',0,0) from dual // @SQL=select get_sysconfig('DEFAULT_ENTITYTYPE','U',0,0) from dual
setIsServerProcess (false);
// N
setName (null); setName (null);
setOS_Command (null); setOS_Command (null);
} */ } */
@ -225,30 +223,6 @@ public class X_AD_Task extends PO implements I_AD_Task, I_Persistent
return (String)get_Value(COLUMNNAME_Help); return (String)get_Value(COLUMNNAME_Help);
} }
/** Set Server Process.
@param IsServerProcess
Run this Process on Server only
*/
public void setIsServerProcess (boolean IsServerProcess)
{
set_Value (COLUMNNAME_IsServerProcess, Boolean.valueOf(IsServerProcess));
}
/** Get Server Process.
@return Run this Process on Server only
*/
public boolean isServerProcess ()
{
Object oo = get_Value(COLUMNNAME_IsServerProcess);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Name. /** Set Name.
@param Name @param Name
Alphanumeric identifier of the entity Alphanumeric identifier of the entity

View File

@ -87,10 +87,7 @@ public class WTask extends Window implements EventListener<Event>, IHelpContext
// //
m_task = task; m_task = task;
if (task.isServerProcess()) info.setContent("Executing task ...");
info.setContent("Executing on Server ...");
else
info.setContent("Executing locally ...");
addEventListener(WindowContainer.ON_WINDOW_CONTAINER_SELECTION_CHANGED_EVENT, this); addEventListener(WindowContainer.ON_WINDOW_CONTAINER_SELECTION_CHANGED_EVENT, this);