Revision 1539
Added by Jing Tao over 21 years ago
src/edu/ucsb/nceas/metacat/AccessSection.java | ||
---|---|---|
34 | 34 |
* A Class that represents an XML access rule. It include principal and |
35 | 35 |
* permission |
36 | 36 |
*/ |
37 |
public class AccessSection |
|
37 |
public class AccessSection extends SubTree
|
|
38 | 38 |
{ |
39 |
private String accessSectionId = null; |
|
39 |
//private String accessSectionId = null;
|
|
40 | 40 |
private String permissionOrder = null; |
41 | 41 |
private Vector accessRules = new Vector(); |
42 | 42 |
private String references = null; |
43 |
private long accessSectionStartNodeId = -1; |
|
44 |
private long accessSectionEndNodeId = -1; |
|
43 |
private String controlLevel = null; |
|
45 | 44 |
|
46 |
/** Set the a accessSectionId */ |
|
47 |
public void setAccessSectionId(String myId) |
|
45 |
/** |
|
46 |
* Set a controllevel |
|
47 |
*/ |
|
48 |
public void setControlLevel(String myLevel) |
|
48 | 49 |
{ |
49 |
this.accessSectionId = myId;
|
|
50 |
this.controlLevel = myLevel;
|
|
50 | 51 |
} |
51 |
|
|
52 |
/** Get the accessSectionId */ |
|
53 |
public String getAccessSectionId() |
|
52 |
|
|
53 |
/** |
|
54 |
* Get controllevel |
|
55 |
*/ |
|
56 |
public String getControlLevel() |
|
54 | 57 |
{ |
55 |
return this.accessSectionId;
|
|
58 |
return this.controlLevel;
|
|
56 | 59 |
} |
57 |
|
|
58 |
/**
|
|
60 |
|
|
61 |
/** |
|
59 | 62 |
* Set a permissionOrder |
60 | 63 |
*/ |
61 | 64 |
public void setPermissionOrder(String myOrder) |
... | ... | |
95 | 98 |
return this.references; |
96 | 99 |
} |
97 | 100 |
|
98 |
/** Set start node id */ |
|
99 |
public void setAccessSectionStartNodeId(long startId) |
|
100 |
{ |
|
101 |
this.accessSectionStartNodeId = startId; |
|
102 |
} |
|
103 |
|
|
104 |
/** Get the start node id */ |
|
105 |
public long getAccessSectionStartNodeId() |
|
106 |
{ |
|
107 |
return this.accessSectionStartNodeId; |
|
108 |
} |
|
101 |
|
|
109 | 102 |
|
110 |
/** Set end node id */ |
|
111 |
public void setAccessSectionEndNodeId(long endId) |
|
112 |
{ |
|
113 |
this.accessSectionEndNodeId = endId; |
|
114 |
} |
|
115 |
|
|
116 |
/** Get the start node id */ |
|
117 |
public long getAccessSectionEndNodeId() |
|
118 |
{ |
|
119 |
return this.accessSectionEndNodeId; |
|
120 |
} |
|
121 |
|
|
122 |
|
|
123 | 103 |
/** Method to copy a accesssection object to a new one */ |
124 | 104 |
public Object clone() |
125 | 105 |
{ |
... | ... | |
127 | 107 |
AccessSection newAccessSection = new AccessSection(); |
128 | 108 |
// set parameters |
129 | 109 |
MetaCatUtil.debugMessage("Copy Access Section Id: " + |
130 |
this.getAccessSectionId(), 35);
|
|
131 |
newAccessSection.setAccessSectionId(this.getAccessSectionId());
|
|
110 |
this.getSubTreeId(), 35);
|
|
111 |
newAccessSection.setSubTreeId(this.getSubTreeId());
|
|
132 | 112 |
MetaCatUtil.debugMessage("Copy permission order: " + |
133 | 113 |
this.getPermissionOrder(), 35); |
134 | 114 |
newAccessSection.setPermissionOrder(this.getPermissionOrder()); |
Also available in: Unified diff
Extends this class from subtree and changed some methods.