01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: *
17: */
18:
19: /* $Id: AbstractRole.java 485769 2006-12-11 17:41:23Z andreas $ */
20:
21: package org.apache.lenya.ac.impl;
22:
23: import org.apache.avalon.framework.logger.Logger;
24: import org.apache.lenya.ac.ItemManager;
25: import org.apache.lenya.ac.Role;
26: import org.apache.lenya.util.Assert;
27:
28: /**
29: * A Role embodies the privilege to do certain things.
30: */
31: public abstract class AbstractRole extends AbstractItem implements Role {
32:
33: /**
34: * Creates a new instance of Role.
35: * @param itemManager The item manager.
36: * @param logger The logger.
37: */
38: public AbstractRole(ItemManager itemManager, Logger logger) {
39: super (itemManager, logger);
40: }
41:
42: /**
43: * Creates a new instance of Role.
44: * @param itemManager The item manager.
45: * @param logger The logger.
46: * @param name The role name.
47: */
48: public AbstractRole(ItemManager itemManager, Logger logger,
49: String name) {
50: this (itemManager, logger);
51: Assert.notNull("name", name);
52: setName(name);
53: }
54:
55: }
|