1 /***
2 * BaseWorkspace.java
3 *
4 * This file is part of the creme library.
5 * The creme library intends to ease the development effort of large
6 * applications by providing easy to use support classes.
7 *
8 * Copyright (C) 2003 Denis Bregeon
9 *
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
14 *
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 *
24 * contact information: dbregeon@sourceforge.net
25 */
26 package org.jcreme.swing.workspace;
27
28 /***
29 * This is the Base implementation for the workspaces. It only provides the
30 * methods related to the identifier.
31 *
32 * @author $Author: dbregeon $
33 * @version $Revision: 1.1 $
34 */
35 public abstract class BaseWorkspace implements Workspace {
36 /***
37 * Identifies the workspace.
38 */
39 private Object identifier = null;
40
41 /***
42 * Builds a BaseWorkspace.
43 *
44 * @param id
45 * the identifier for the workspace.
46 * @throws IllegalArgumentException
47 * if id is null.
48 */
49 public BaseWorkspace(Object id) throws IllegalArgumentException {
50 if (id == null) {
51 throw new IllegalArgumentException(
52 "Null is not a valid Workspace Identifier.");
53 }
54 this.identifier = id;
55 }
56
57 /***
58 * @see org.jcreme.swing.workspace.Workspace#getIdentifier()
59 */
60 public Object getIdentifier() {
61 return this.identifier;
62 }
63 }