KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > dream > control > logger > BasicLoggerInternalBaseNameMixin


1 /**
2  * Dream
3  * Copyright (C) 2003-2004 INRIA Rhone-Alpes
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Contact: dream@objectweb.org
20  *
21  * Initial developer(s): Matthieu Leclercq
22  * Contributor(s):
23  */

24
25 package org.objectweb.dream.control.logger;
26
27 import org.objectweb.fractal.julia.InitializationContext;
28
29 /**
30  * Basic mixin implementing the <code>LoggerInternalBaseName</code> interface.
31  * <br>
32  * <br>
33  * <b>Requirements </b>
34  * <ul>
35  * <li>this mixin requires the {@link BasicLoggerControllerMixin }mixin.</li>
36  * </ul>
37  */

38 public abstract class BasicLoggerInternalBaseNameMixin
39     implements
40       LoggerInternalBaseName
41 {
42
43   boolean externalAssignedBaseName;
44
45   // -------------------------------------------------------------------------
46
// Fields and methods added and overriden by the mixin class
47
// -------------------------------------------------------------------------
48

49   /**
50    * @see org.objectweb.fractal.julia.Controller#initFcController(InitializationContext)
51    */

52   public void initFcController(InitializationContext ic)
53       throws InstantiationException JavaDoc
54   {
55     _super_initFcController(ic);
56     externalAssignedBaseName = false;
57   }
58
59   /**
60    * @see LoggerController#setBaseName(String)
61    */

62   public void setBaseName(String JavaDoc name)
63   {
64     externalAssignedBaseName = true;
65     _super_setBaseName(name);
66   }
67
68   /**
69    * @see LoggerInternalBaseName#internalSetBaseName(String)
70    */

71   public void internalSetBaseName(String JavaDoc name)
72   {
73     if (!externalAssignedBaseName)
74     {
75       _super_setBaseName(name);
76     }
77   }
78
79   // ---------------------------------------------------------------------------
80
// Fields and methods required by the mixin class in the base class
81
// ---------------------------------------------------------------------------
82

83   /**
84    * The
85    * {@link org.objectweb.fractal.julia.Controller#initFcController(InitializationContext) initFcController }
86    * method overriden by this mixin.
87    *
88    * @see org.objectweb.fractal.julia.Controller#initFcController(InitializationContext)
89    */

90   public abstract void _super_initFcController(InitializationContext ic)
91       throws InstantiationException JavaDoc;
92
93   /**
94    * The {@link LoggerController#setBaseName(String) setBaseName }method
95    * overriden by this mixin
96    *
97    * @see LoggerController#setBaseName(String)
98    */

99   public abstract void _super_setBaseName(String JavaDoc name);
100
101 }
Popular Tags