details: /erp/stable/2.50/rev/c9920d64c443 changeset: 9455:c9920d64c443 user: Stefan Hühner <stefan.huehner <at> openbravo.com> date: Thu May 26 20:36:30 2011 +0200 summary: Fix line endings using dos2unix applied to files having crlf style line-ending
diffstat: src-core/utils/rmi/src/rmi/RenderFo.java | 206 +++--- src-core/utils/rmi/src/rmi/RenderFoI.java | 42 +- src/org/openbravo/base/exception/OBException.java | 126 +- src/org/openbravo/base/exception/OBSecurityException.java | 94 +- src/org/openbravo/base/provider/OBNotSingleton.java | 58 +- src/org/openbravo/base/provider/OBProvidable.java | 56 +- src/org/openbravo/base/provider/OBProviderConfigReader.java | 210 +++--- src/org/openbravo/base/provider/OBProviderException.java | 96 +- src/org/openbravo/base/provider/OBSingleton.java | 58 +- src/org/openbravo/base/util/ArgumentException.java | 98 +- src/org/openbravo/base/util/Check.java | 350 +++++----- src/org/openbravo/base/util/CheckException.java | 98 +- src/org/openbravo/base/validation/ValidationException.java | 136 ++-- src/org/openbravo/dal/xml/EntityNotFoundException.java | 96 +- src/org/openbravo/dal/xml/EntityXMLException.java | 100 +- src/org/openbravo/service/OBServiceException.java | 96 +- src/org/openbravo/service/web/InvalidContentException.java | 96 +- src/org/openbravo/service/web/InvalidRequestException.java | 96 +- src/org/openbravo/service/web/ResourceNotFoundException.java | 96 +- 19 files changed, 1104 insertions(+), 1104 deletions(-) diffs (truncated from 2286 to 300 lines): diff -r 7c2971cc4926 -r c9920d64c443 src-core/utils/rmi/src/rmi/RenderFo.java --- a/src-core/utils/rmi/src/rmi/RenderFo.java Thu May 26 18:34:24 2011 +0200 +++ b/src-core/utils/rmi/src/rmi/RenderFo.java Thu May 26 20:36:30 2011 +0200 @@ -1,103 +1,103 @@ -/* - ************************************************************************************ - * Copyright (C) 2001-2006 Openbravo S.L.U. - * Licensed under the Apache Software License version 2.0 - * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - ************************************************************************************ - */ - -package rmi; - -import java.rmi.server.*; -import java.rmi.registry.*; - -import java.io.*; -import java.lang.*; -import org.apache.fop.apps.Driver; -import org.apache.fop.apps.Version; -import java.net.*; -import java.rmi.*; -import java.util.Date; -import java.text.SimpleDateFormat; -import rmi.*; -import org.xml.sax.*; -import org.apache.log4j.Level; -import org.apache.log4j.Logger; -import org.apache.log4j.SimpleLayout; -import org.apache.log4j.FileAppender; - -public class RenderFo extends UnicastRemoteObject implements RenderFoI{ - - private String strFo; - static Logger logger = Logger.getLogger(RenderFo.class); - - public RenderFo() throws RemoteException { - } - - public RenderFo(String strFo) throws RemoteException{ - this.strFo = strFo; - } - - public Object execute() throws RemoteException { - return computeRenderFo(strFo); - } - - - public byte[] computeRenderFo(String strFo) throws RemoteException{ - byte[] content = null; - try { - StringReader sr = new StringReader(strFo); - InputSource inputFo = new InputSource(sr); - ByteArrayOutputStream out = new ByteArrayOutputStream(); - Driver driver = new Driver(inputFo, out); - driver.run(); - content = out.toByteArray(); - out.close(); - } catch (Exception e) { - Throwable t = (Throwable) e; - logger.error("computeRenderFo exception: " + e.getMessage()); - e.printStackTrace(); - } - return content; - } - - // Registration for RMI serving: - public static void main(String[] args) { - SimpleLayout layout = new SimpleLayout(); - - FileAppender appender = null; - - - Date today = new Date(); - - // format the date in the form "Wed 27 Aug, 2003" - SimpleDateFormat formatter = new SimpleDateFormat( "ddMMyyyy" ); - String strToday = formatter.format( today ); - - String strFileName = "renderFo"+strToday+".log"; - - try { - appender = new FileAppender(layout,"@basepath@\\logs\\"+strFileName,false); // eg. @basepath@ = c:\\rmi - } catch(Exception e) {} - - logger.addAppender(appender); - logger.setLevel((Level) Level.WARN); - - System.setSecurityManager( - new RMISecurityManager()); - - try { - RenderFo render = new RenderFo(); - Naming.bind("//@RenderFoAddress@/RenderFo", render); - logger.warn("RenderFo ready"); - } catch(Exception e) { - logger.error("Error binding:"+e.getMessage()); - e.printStackTrace(); - } - } -} - +/* + ************************************************************************************ + * Copyright (C) 2001-2006 Openbravo S.L.U. + * Licensed under the Apache Software License version 2.0 + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software distributed + * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + ************************************************************************************ + */ + +package rmi; + +import java.rmi.server.*; +import java.rmi.registry.*; + +import java.io.*; +import java.lang.*; +import org.apache.fop.apps.Driver; +import org.apache.fop.apps.Version; +import java.net.*; +import java.rmi.*; +import java.util.Date; +import java.text.SimpleDateFormat; +import rmi.*; +import org.xml.sax.*; +import org.apache.log4j.Level; +import org.apache.log4j.Logger; +import org.apache.log4j.SimpleLayout; +import org.apache.log4j.FileAppender; + +public class RenderFo extends UnicastRemoteObject implements RenderFoI{ + + private String strFo; + static Logger logger = Logger.getLogger(RenderFo.class); + + public RenderFo() throws RemoteException { + } + + public RenderFo(String strFo) throws RemoteException{ + this.strFo = strFo; + } + + public Object execute() throws RemoteException { + return computeRenderFo(strFo); + } + + + public byte[] computeRenderFo(String strFo) throws RemoteException{ + byte[] content = null; + try { + StringReader sr = new StringReader(strFo); + InputSource inputFo = new InputSource(sr); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + Driver driver = new Driver(inputFo, out); + driver.run(); + content = out.toByteArray(); + out.close(); + } catch (Exception e) { + Throwable t = (Throwable) e; + logger.error("computeRenderFo exception: " + e.getMessage()); + e.printStackTrace(); + } + return content; + } + + // Registration for RMI serving: + public static void main(String[] args) { + SimpleLayout layout = new SimpleLayout(); + + FileAppender appender = null; + + + Date today = new Date(); + + // format the date in the form "Wed 27 Aug, 2003" + SimpleDateFormat formatter = new SimpleDateFormat( "ddMMyyyy" ); + String strToday = formatter.format( today ); + + String strFileName = "renderFo"+strToday+".log"; + + try { + appender = new FileAppender(layout,"@basepath@\\logs\\"+strFileName,false); // eg. @basepath@ = c:\\rmi + } catch(Exception e) {} + + logger.addAppender(appender); + logger.setLevel((Level) Level.WARN); + + System.setSecurityManager( + new RMISecurityManager()); + + try { + RenderFo render = new RenderFo(); + Naming.bind("//@RenderFoAddress@/RenderFo", render); + logger.warn("RenderFo ready"); + } catch(Exception e) { + logger.error("Error binding:"+e.getMessage()); + e.printStackTrace(); + } + } +} + diff -r 7c2971cc4926 -r c9920d64c443 src-core/utils/rmi/src/rmi/RenderFoI.java --- a/src-core/utils/rmi/src/rmi/RenderFoI.java Thu May 26 18:34:24 2011 +0200 +++ b/src-core/utils/rmi/src/rmi/RenderFoI.java Thu May 26 20:36:30 2011 +0200 @@ -1,22 +1,22 @@ -/* - ************************************************************************************ - * Copyright (C) 2001-2006 Openbravo S.L.U. - * Licensed under the Apache Software License version 2.0 - * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - ************************************************************************************ - */ - -//: c15:rmi:PerfectTimeI.java -// The PerfectTime remote interface. -package rmi; -import java.rmi.*; -import java.io.*; -import org.xml.sax.*; - -public interface RenderFoI extends Remote { - byte[] computeRenderFo(String strFo) throws RemoteException; +/* + ************************************************************************************ + * Copyright (C) 2001-2006 Openbravo S.L.U. + * Licensed under the Apache Software License version 2.0 + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software distributed + * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + ************************************************************************************ + */ + +//: c15:rmi:PerfectTimeI.java +// The PerfectTime remote interface. +package rmi; +import java.rmi.*; +import java.io.*; +import org.xml.sax.*; + +public interface RenderFoI extends Remote { + byte[] computeRenderFo(String strFo) throws RemoteException; } ///:~ \ No newline at end of file diff -r 7c2971cc4926 -r c9920d64c443 src/org/openbravo/base/exception/OBException.java --- a/src/org/openbravo/base/exception/OBException.java Thu May 26 18:34:24 2011 +0200 +++ b/src/org/openbravo/base/exception/OBException.java Thu May 26 20:36:30 2011 +0200 @@ -1,63 +1,63 @@ -/* - ************************************************************************* - * The contents of this file are subject to the Openbravo Public License - * Version 1.1 (the "License"), being the Mozilla Public License - * Version 1.1 with a permitted attribution clause; you may not use this - * file except in compliance with the License. You may obtain a copy of - * the License at http://www.openbravo.com/legal/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 Openbravo ERP. - * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2008 Openbravo SLU - * All Rights Reserved. - * Contributor(s): ______________________________________. - ************************************************************************ - */ - -package org.openbravo.base.exception; - -import org.apache.log4j.Logger; - -/** - * This is the base exception for all exceptions in Openbravo. It is an unchecked exception which - * also logs itself. - * - * @author mtaal - */ -public class OBException extends RuntimeException { - - private static final long serialVersionUID = 1L; - - public OBException() { - super(); - getLogger().error("Exception", this); - } - ------------------------------------------------------------------------------ vRanger cuts backup time in half-while increasing security. With the market-leading solution for virtual backup and recovery, you get blazing-fast, flexible, and affordable data protection. Download your free trial now. http://p.sf.net/sfu/quest-d2dcopy1 _______________________________________________ Openbravo-commits mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbravo-commits
