KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > info > magnolia > cms > core > ContentHandler


1 /**
2  *
3  * Magnolia and its source-code is licensed under the LGPL.
4  * You may copy, adapt, and redistribute this file for commercial or non-commercial use.
5  * When copying, adapting, or redistributing this document in keeping with the guidelines above,
6  * you are required to provide proper attribution to obinary.
7  * If you reproduce or distribute the document without making any substantive modifications to its content,
8  * please use the following attribution line:
9  *
10  * Copyright 1993-2006 obinary Ltd. (http://www.obinary.com) All rights reserved.
11  *
12  */

13 package info.magnolia.cms.core;
14
15 import info.magnolia.cms.security.AccessManager;
16
17 import org.apache.commons.lang.exception.NestableRuntimeException;
18
19
20 /**
21  * @author Sameer Charles
22  * @version $Revision $ ($Author $) $Id: ContentHandler.java 6341 2006-09-12 09:18:27Z philipp $
23  */

24 public abstract class ContentHandler implements Cloneable JavaDoc {
25
26     /**
27      * AccessManager instance.
28      */

29     protected AccessManager accessManager;
30
31     /**
32      * package private constructor
33      */

34     ContentHandler() {
35     }
36
37     /**
38      * Set access manager for this object
39      * @param manager
40      */

41     public void setAccessManager(AccessManager manager) {
42         this.accessManager = manager;
43     }
44
45     /**
46      * Get access manager if previously set for this object
47      * @return AccessManager
48      */

49     public AccessManager getAccessManager() {
50         return this.accessManager;
51     }
52
53     /**
54      * Bit by bit copy of the current object.
55      * @return Object cloned object
56      */

57     protected Object JavaDoc clone() {
58         try {
59             return super.clone();
60         }
61         catch (CloneNotSupportedException JavaDoc e) {
62             // should never happen
63
throw new NestableRuntimeException(e);
64         }
65     }
66
67 }
68
Popular Tags