Project

General

Profile

« Previous | Next » 

Revision 1400

Added by Jing Tao over 21 years ago

A new class to reprent a eml access module.

View differences:

src/edu/ucsb/nceas/metacat/AccessSection.java
1
/**
2
 *  '$RCSfile$'
3
 *    Purpose: A Class that represents an XML Text node and its contents,
4
 *             and can build itself from a database connection
5
 *  Copyright: 2000 Regents of the University of California and the
6
 *             National Center for Ecological Analysis and Synthesis
7
 *    Authors: Matt Jones
8
 *    Release: @release@
9
 *
10
 *   '$Author$'
11
 *     '$Date$'
12
 * '$Revision$'
13
 *
14
 * This program is free software; you can redistribute it and/or modify
15
 * it under the terms of the GNU General Public License as published by
16
 * the Free Software Foundation; either version 2 of the License, or
17
 * (at your option) any later version.
18
 *
19
 * This program is distributed in the hope that it will be useful,
20
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
 * GNU General Public License for more details.
23
 *
24
 * You should have received a copy of the GNU General Public License
25
 * along with this program; if not, write to the Free Software
26
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
27
 */
28

  
29
package edu.ucsb.nceas.metacat;
30

  
31
import java.util.Vector;
32

  
33
/**
34
 * A Class that represents an XML access rule. It include principal and 
35
 * permission
36
 */
37
public class AccessSection
38
{
39
  private String accessSectionId = null;
40
  private String permissionOrder = null;
41
  private Vector allowRules = new Vector();
42
  private Vector denyRules = new Vector();
43
 
44
    /** Set the a accessSectionId */
45
    public void addPrinciple(String myId) 
46
    {
47
      this.accessSectionId = myId;
48
    }
49

  
50
    /** Get the accessSectionId */
51
    public String getAccessSectionId() 
52
    {
53
      return this.accessSectionId;
54
    }
55

  
56
    /** 
57
     * Set a permissionOrder
58
     */
59
    public void setPermissionOrder(String myOrder) 
60
    {
61
      this.permissionOrder = myOrder;
62
    }
63
    
64
    /**
65
     * Get permissionOrder
66
     */
67
    public String getPermissionOrder()
68
    {
69
      return this.permissionOrder;
70
    }
71
    
72
    /** Add a allow rule */
73
    public void addAllowRule(AccessRule rule)
74
    {
75
      this.allowRules.addElement(rule);
76
    }
77
    
78
    /** Get all allow rule */
79
    public Vector getAllowRules()
80
    {
81
      return this.allowRules;
82
    }
83
    
84
    /** Add a deny rule */
85
    public void addDenyRule(AccessRule rule)
86
    {
87
      this.denyRules.addElement(rule);
88
    }
89
    
90
    /** Return all deny rule */
91
    public Vector getDenyRules()
92
    {
93
      return this.denyRules;
94
    }
95
}
0 96

  

Also available in: Unified diff