KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > web > ui > repo > tag > evaluator > PermissionEvaluatorTag


1 /*
2  * Copyright (C) 2005 Alfresco, Inc.
3  *
4  * Licensed under the Mozilla Public License version 1.1
5  * with a permitted attribution clause. You may obtain a
6  * copy of the License at
7  *
8  * http://www.alfresco.org/legal/license.txt
9  *
10  * Unless required by applicable law or agreed to in writing,
11  * software distributed under the License is distributed on an
12  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13  * either express or implied. See the License for the specific
14  * language governing permissions and limitations under the
15  * License.
16  */

17 package org.alfresco.web.ui.repo.tag.evaluator;
18
19 import javax.faces.component.UIComponent;
20
21 import org.alfresco.web.ui.common.tag.evaluator.GenericEvaluatorTag;
22
23 /**
24  * @author Kevin Roast
25  */

26 public class PermissionEvaluatorTag extends GenericEvaluatorTag
27 {
28    /**
29     * @see javax.faces.webapp.UIComponentTag#getComponentType()
30     */

31    public String JavaDoc getComponentType()
32    {
33       return "org.alfresco.faces.PermissionEvaluator";
34    }
35
36    /**
37     * @see javax.faces.webapp.UIComponentTag#setProperties(javax.faces.component.UIComponent)
38     */

39    protected void setProperties(UIComponent component)
40    {
41       super.setProperties(component);
42       setStringProperty(component, "allow", this.allow);
43       setStringProperty(component, "deny", this.deny);
44    }
45    
46    /**
47     * @see javax.servlet.jsp.tagext.Tag#release()
48     */

49    public void release()
50    {
51       super.release();
52       this.allow = null;
53       this.deny = null;
54    }
55    
56    /**
57     * Set the allow permissions
58     *
59     * @param allow the allow permissions
60     */

61    public void setAllow(String JavaDoc allow)
62    {
63       this.allow = allow;
64    }
65
66    /**
67     * Set the deny permissions
68     *
69     * @param deny the deny permissions
70     */

71    public void setDeny(String JavaDoc deny)
72    {
73       this.deny = deny;
74    }
75
76
77    /** the allow permissions */
78    private String JavaDoc allow;
79
80    /** the deny permissions */
81    private String JavaDoc deny;
82 }
83
Popular Tags