From: Jorg J. <jj...@us...> - 2005-12-31 06:33:30
|
Update of /cvsroot/compiere/dbPort/src/org/compiere/process In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11331/src/org/compiere/process Modified Files: IssueReport.java SvrProcess.java Added Files: SystemValidate.java Log Message: --- NEW FILE: SystemValidate.java --- /****************************************************************************** * The contents of this file are subject to the Compiere License Version 1.1 * ("License"); You may not use this file except in compliance with the License * You may obtain a copy of the License at http://www.compiere.org/license.html * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for * the specific language governing rights and limitations under the License. * The Original Code is Compiere ERP & CRM Smart Business Solution. The Initial * Developer of the Original Code is Jorg Janke. Portions created by Jorg Janke * are Copyright (C) 1999-2005 Jorg Janke. * All parts are Copyright (C) 1999-2005 ComPiere, Inc. All Rights Reserved. * Contributor(s): ______________________________________. *****************************************************************************/ package org.compiere.process; //import org.compiere.util.*; /** * Validate Support * * @author Jorg Janke * @version $Id: SystemValidate.java,v 1.1 2005/12/31 06:33:22 jjanke Exp $ */ public class SystemValidate extends SvrProcess { /** * Prepare */ protected void prepare () { } // prepare /** * Process * @return - * @throws Exception */ protected String doIt () throws Exception { return ""; } // doIt } // SystemValidate Index: IssueReport.java =================================================================== RCS file: /cvsroot/compiere/dbPort/src/org/compiere/process/IssueReport.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IssueReport.java 17 Dec 2005 19:56:49 -0000 1.1 --- IssueReport.java 31 Dec 2005 06:33:21 -0000 1.2 *************** *** 14,17 **** --- 14,20 ---- package org.compiere.process; + import org.compiere.model.*; + import org.compiere.util.*; + /** * Report System Issue *************** *** 22,33 **** public class IssueReport extends SvrProcess { ! protected void prepare () { } // prepare protected String doIt () throws Exception { ! return null; } // doIt --- 25,60 ---- public class IssueReport extends SvrProcess { ! /** Issue to report */ ! private int m_AD_Issue_ID = 0; ! ! /** ! * Prepare ! */ protected void prepare () { + m_AD_Issue_ID = getRecord_ID(); } // prepare + /** + * Do It + * @return info + * @throws Exception + */ protected String doIt () throws Exception { ! log.info("AD_Issue_ID=" + m_AD_Issue_ID); ! if (!MSystem.get(getCtx()).isAutoErrorReport()) ! return "NOT reported - Enable Error Reporting in Window System"; ! // ! MIssue issue = new MIssue(getCtx(), m_AD_Issue_ID, get_TrxName()); ! if (issue.get_ID() == 0) ! return "No Issue to report - ID=" + m_AD_Issue_ID; ! // ! String error = issue.report(); ! if (error != null) ! throw new CompiereSystemError(error); ! if (issue.save()) ! return "Issue Reported: " + issue.getRequestDocumentNo(); ! throw new CompiereSystemError("Issue Not Saved"); } // doIt Index: SvrProcess.java =================================================================== RCS file: /cvsroot/compiere/dbPort/src/org/compiere/process/SvrProcess.java,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** SvrProcess.java 19 Dec 2005 01:21:07 -0000 1.38 --- SvrProcess.java 31 Dec 2005 06:33:22 -0000 1.39 *************** *** 36,39 **** --- 36,40 ---- public SvrProcess() { + // Env.ZERO.divide(Env.ZERO); } // SvrProcess |