KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > info > magnolia > cms > security > Security


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.security;
14
15 import info.magnolia.cms.util.FactoryUtil;
16
17
18 /**
19  * Get the current role or user manager.
20  * @author philipp
21  * @version $Revision: 6341 $ ($Author: philipp $)
22  */

23 public class Security {
24
25     /**
26      * Returns the configured RoleManager.
27      */

28     public static RoleManager getRoleManager() {
29         return (RoleManager) FactoryUtil.getSingleton(RoleManager.class);
30     }
31
32     /**
33      * Returns the configured UserManager.
34      */

35     public static UserManager getUserManager() {
36         return (UserManager) FactoryUtil.getSingleton(UserManager.class);
37     }
38
39     /**
40      * Returns the configured GroupManager.
41      */

42     public static GroupManager getGroupManager() {
43         return (GroupManager) FactoryUtil.getSingleton(GroupManager.class);
44     }
45
46 }
47
Popular Tags