KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas_lib > deployment > api > AbsDeploymentDesc


1 /**
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 1999 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * Initial developer(s): Ludovic BERT & Florent BENOIT
22  * --------------------------------------------------------------------------
23  * $Id: AbsDeploymentDesc.java,v 1.2 2004/05/11 08:07:50 sauthieg Exp $
24  * --------------------------------------------------------------------------
25  */

26
27
28 package org.objectweb.jonas_lib.deployment.api;
29
30 // SAX imports
31
import org.xml.sax.SAXParseException JavaDoc;
32
33
34 /**
35  * This class provides an abstract implementation of the
36  * DeploymentDescriptor interface of JOnAS
37  * @author Ludovic Bert
38  * @author Florent Benoit
39  */

40
41 public abstract class AbsDeploymentDesc implements DeploymentDesc {
42
43
44     /**
45      * The displayName field
46      */

47     protected String JavaDoc displayName = null;
48
49
50     /**
51      * Get the display name of the deployment descriptor.
52      * @return the display name of the deployment descriptor.
53      */

54     public String JavaDoc getDisplayName() {
55         return displayName;
56     }
57
58     /**
59      * Return a String representation of the DeploymentDesc.
60      * @return a String representation of the DeploymentDesc.
61      */

62     public abstract String JavaDoc toString();
63
64     /**
65      * build a message from SAX Exception in a consistent style, consistent
66      * with emacs compile mode (same as grep, cc, javac, etc).
67      * @param fileName name of the file
68      * @param exception the SAX exception
69      * @param msg the string message
70      * @return a message which is in a consistent style
71      */

72     protected static String JavaDoc getSAXMsg(String JavaDoc fileName,
73                                        SAXParseException JavaDoc exception, String JavaDoc msg) {
74         String JavaDoc ret = fileName + ":" + exception.getLineNumber() + ":"
75             + exception.getColumnNumber() + ": ";
76         ret += msg;
77         return ret;
78     }
79
80 }
81
Popular Tags