01: /*
02: * Copyright 2001-2006 C:1 Financial Services GmbH
03: *
04: * This software is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU Lesser General Public
06: * License Version 2.1, as published by the Free Software Foundation.
07: *
08: * This software is distributed in the hope that it will be useful,
09: * but WITHOUT ANY WARRANTY; without even the implied warranty of
10: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11: * Lesser General Public License for more details.
12: *
13: * You should have received a copy of the GNU Lesser General Public
14: * License along with this library; if not, write to the Free Software
15: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
16: */
17:
18: package de.finix.contelligent;
19:
20: /**
21: * The <code>CopyMode</code> class holds constants to specify the mode the
22: * {@link ComponentManager#copyComponentTree(CallData,ComponentPath,ComponentPath,String,boolean,CopyMode)}
23: * method uses when copying components.
24: */
25: final public class CopyMode {
26: final static public CopyMode ALL = new CopyMode(0);
27:
28: final static public CopyMode NO_FINALS = new CopyMode(1);
29:
30: final static public CopyMode LINK_FINALS = new CopyMode(2);
31:
32: final static public CopyMode BLUEPRINT = new CopyMode(3);
33:
34: final static public CopyMode ALL_ACLS = new CopyMode(4);
35:
36: final private int mode;
37:
38: private CopyMode(int mode) {
39: this .mode = mode;
40: }
41:
42: public int hashCode() {
43: return mode;
44: }
45:
46: public String toString() {
47: switch (mode) {
48: case 0:
49: return "ALL";
50: case 1:
51: return "NO_FINALS";
52: case 2:
53: return "LINK_FINALS";
54: case 3:
55: return "BLUEPRINT";
56: case 4:
57: return "ALL_ACLS";
58: default:
59: return "UNKNOWN";
60: }
61: }
62:
63: public boolean equals(Object anObject) {
64: return (this == anObject);
65: }
66:
67: }
|