source: release-kits/lirk3/resources/gs3-release-maker/ant/docs/manual/api/org/apache/tools/ant/types/Permissions.html@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

File size: 15.1 KB
RevLine 
[14982]1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<!--NewPage-->
3<HTML>
4<HEAD>
5<!-- Generated by javadoc (build 1.4.2_13) on Mon Oct 01 14:33:32 NZST 2007 -->
6<TITLE>
7Permissions (Apache Ant API)
8</TITLE>
9
10<META NAME="keywords" CONTENT="org.apache.tools.ant.types.Permissions class">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
13
14<SCRIPT type="text/javascript">
15function windowTitle()
16{
17 parent.document.title="Permissions (Apache Ant API)";
18}
19</SCRIPT>
20
21</HEAD>
22
23<BODY BGCOLOR="white" onload="windowTitle();">
24
25
26<!-- ========= START OF TOP NAVBAR ======= -->
27<A NAME="navbar_top"><!-- --></A>
28<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
29<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
30<TR>
31<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
32<A NAME="navbar_top_firstrow"><!-- --></A>
33<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
34 <TR ALIGN="center" VALIGN="top">
35 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
36 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
37 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
38 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
39 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
42 </TR>
43</TABLE>
44</TD>
45<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
46</EM>
47</TD>
48</TR>
49
50<TR>
51<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
52&nbsp;<A HREF="../../../../../org/apache/tools/ant/types/PatternSet.NameEntry.html" title="class in org.apache.tools.ant.types"><B>PREV CLASS</B></A>&nbsp;
53&nbsp;<A HREF="../../../../../org/apache/tools/ant/types/Permissions.Permission.html" title="class in org.apache.tools.ant.types"><B>NEXT CLASS</B></A></FONT></TD>
54<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
55 <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
56&nbsp;<A HREF="Permissions.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
57&nbsp;<SCRIPT type="text/javascript">
58 <!--
59 if(window==top) {
60 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
61 }
62 //-->
63</SCRIPT>
64<NOSCRIPT>
65 <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
66</NOSCRIPT>
67
68</FONT></TD>
69</TR>
70<TR>
71<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
72 SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
73<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
74DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
75</TR>
76</TABLE>
77<A NAME="skip-navbar_top"></A>
78<!-- ========= END OF TOP NAVBAR ========= -->
79
80<HR>
81<!-- ======== START OF CLASS DATA ======== -->
82<H2>
83<FONT SIZE="-1">
84org.apache.tools.ant.types</FONT>
85<BR>
86Class Permissions</H2>
87<PRE>
88java.lang.Object
89 <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><B>org.apache.tools.ant.types.Permissions</B>
90</PRE>
91<HR>
92<DL>
93<DT>public class <B>Permissions</B><DT>extends java.lang.Object</DL>
94
95<P>
96This class implements a security manager meant for useage by tasks that run inside the
97 ant VM. An examples are the Java Task and JUnitTask.
98
99 The basic functionality is that nothing (except for a base set of permissions) is allowed, unless
100 the permission is granted either explicitly or implicitly.
101 If an permission is granted this can be overruled by explicitly revoking the permission.
102
103 It is not permissible to add permissions (either granted or revoked) while the Security Manager
104 is active (after calling setSecurityManager() but before calling restoreSecurityManager()).
105<P>
106
107<P>
108<DL>
109<DT><B>Since:</B></DT>
110 <DD>Ant 1.6</DD>
111</DL>
112<HR>
113
114<P>
115<!-- ======== NESTED CLASS SUMMARY ======== -->
116
117<A NAME="nested_class_summary"><!-- --></A>
118<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
119<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
120<TD COLSPAN=2><FONT SIZE="+2">
121<B>Nested Class Summary</B></FONT></TD>
122</TR>
123<TR BGCOLOR="white" CLASS="TableRowColor">
124<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
125<CODE>static&nbsp;class</CODE></FONT></TD>
126<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/types/Permissions.Permission.html" title="class in org.apache.tools.ant.types">Permissions.Permission</A></B></CODE>
127
128<BR>
129&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Represents a permission.</TD>
130</TR>
131</TABLE>
132&nbsp;
133<!-- =========== FIELD SUMMARY =========== -->
134
135
136<!-- ======== CONSTRUCTOR SUMMARY ======== -->
137
138<A NAME="constructor_summary"><!-- --></A>
139<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
140<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
141<TD COLSPAN=2><FONT SIZE="+2">
142<B>Constructor Summary</B></FONT></TD>
143</TR>
144<TR BGCOLOR="white" CLASS="TableRowColor">
145<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/types/Permissions.html#Permissions()">Permissions</A></B>()</CODE>
146
147<BR>
148&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;default constructor</TD>
149</TR>
150<TR BGCOLOR="white" CLASS="TableRowColor">
151<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/types/Permissions.html#Permissions(boolean)">Permissions</A></B>(boolean&nbsp;delegateToOldSM)</CODE>
152
153<BR>
154&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create a new set of permissions</TD>
155</TR>
156</TABLE>
157&nbsp;
158<!-- ========== METHOD SUMMARY =========== -->
159
160<A NAME="method_summary"><!-- --></A>
161<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
162<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
163<TD COLSPAN=2><FONT SIZE="+2">
164<B>Method Summary</B></FONT></TD>
165</TR>
166<TR BGCOLOR="white" CLASS="TableRowColor">
167<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
168<CODE>&nbsp;void</CODE></FONT></TD>
169<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/types/Permissions.html#addConfiguredGrant(org.apache.tools.ant.types.Permissions.Permission)">addConfiguredGrant</A></B>(<A HREF="../../../../../org/apache/tools/ant/types/Permissions.Permission.html" title="class in org.apache.tools.ant.types">Permissions.Permission</A>&nbsp;perm)</CODE>
170
171<BR>
172&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a permission to be granted.</TD>
173</TR>
174<TR BGCOLOR="white" CLASS="TableRowColor">
175<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
176<CODE>&nbsp;void</CODE></FONT></TD>
177<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/types/Permissions.html#addConfiguredRevoke(org.apache.tools.ant.types.Permissions.Permission)">addConfiguredRevoke</A></B>(<A HREF="../../../../../org/apache/tools/ant/types/Permissions.Permission.html" title="class in org.apache.tools.ant.types">Permissions.Permission</A>&nbsp;perm)</CODE>
178
179<BR>
180&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a permission to be revoked.</TD>
181</TR>
182<TR BGCOLOR="white" CLASS="TableRowColor">
183<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
184<CODE>&nbsp;void</CODE></FONT></TD>
185<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/types/Permissions.html#restoreSecurityManager()">restoreSecurityManager</A></B>()</CODE>
186
187<BR>
188&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;To be used by tasks that just finished executing the parts subject to these permissions.</TD>
189</TR>
190<TR BGCOLOR="white" CLASS="TableRowColor">
191<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
192<CODE>&nbsp;void</CODE></FONT></TD>
193<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/types/Permissions.html#setSecurityManager()">setSecurityManager</A></B>()</CODE>
194
195<BR>
196&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;To be used by tasks wishing to use this security model before executing the part to be
197 subject to these Permissions.</TD>
198</TR>
199</TABLE>
200&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
201<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
202<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
203<TD><B>Methods inherited from class java.lang.Object</B></TD>
204</TR>
205<TR BGCOLOR="white" CLASS="TableRowColor">
206<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
207</TR>
208</TABLE>
209&nbsp;
210<P>
211
212<!-- ============ FIELD DETAIL =========== -->
213
214
215<!-- ========= CONSTRUCTOR DETAIL ======== -->
216
217<A NAME="constructor_detail"><!-- --></A>
218<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
219<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
220<TD COLSPAN=1><FONT SIZE="+2">
221<B>Constructor Detail</B></FONT></TD>
222</TR>
223</TABLE>
224
225<A NAME="Permissions()"><!-- --></A><H3>
226Permissions</H3>
227<PRE>
228public <B>Permissions</B>()</PRE>
229<DL>
230<DD>default constructor
231<P>
232</DL>
233<HR>
234
235<A NAME="Permissions(boolean)"><!-- --></A><H3>
236Permissions</H3>
237<PRE>
238public <B>Permissions</B>(boolean&nbsp;delegateToOldSM)</PRE>
239<DL>
240<DD>create a new set of permissions
241<P>
242<DT><B>Parameters:</B><DD><CODE>delegateToOldSM</CODE> - if <code>true</code> the old security manager
243 will be used if the permission has not been explicitly granted or revoked
244 in this instance
245 if false, it behaves like the default constructor</DL>
246
247<!-- ============ METHOD DETAIL ========== -->
248
249<A NAME="method_detail"><!-- --></A>
250<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
251<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
252<TD COLSPAN=1><FONT SIZE="+2">
253<B>Method Detail</B></FONT></TD>
254</TR>
255</TABLE>
256
257<A NAME="addConfiguredGrant(org.apache.tools.ant.types.Permissions.Permission)"><!-- --></A><H3>
258addConfiguredGrant</H3>
259<PRE>
260public void <B>addConfiguredGrant</B>(<A HREF="../../../../../org/apache/tools/ant/types/Permissions.Permission.html" title="class in org.apache.tools.ant.types">Permissions.Permission</A>&nbsp;perm)</PRE>
261<DL>
262<DD>Adds a permission to be granted.
263<P>
264<DD><DL>
265<DT><B>Parameters:</B><DD><CODE>perm</CODE> - The Permissions.Permission to be granted.</DL>
266</DD>
267</DL>
268<HR>
269
270<A NAME="addConfiguredRevoke(org.apache.tools.ant.types.Permissions.Permission)"><!-- --></A><H3>
271addConfiguredRevoke</H3>
272<PRE>
273public void <B>addConfiguredRevoke</B>(<A HREF="../../../../../org/apache/tools/ant/types/Permissions.Permission.html" title="class in org.apache.tools.ant.types">Permissions.Permission</A>&nbsp;perm)</PRE>
274<DL>
275<DD>Adds a permission to be revoked.
276<P>
277<DD><DL>
278<DT><B>Parameters:</B><DD><CODE>perm</CODE> - The Permissions.Permission to be revoked</DL>
279</DD>
280</DL>
281<HR>
282
283<A NAME="setSecurityManager()"><!-- --></A><H3>
284setSecurityManager</H3>
285<PRE>
286public void <B>setSecurityManager</B>()
287 throws <A HREF="../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></PRE>
288<DL>
289<DD>To be used by tasks wishing to use this security model before executing the part to be
290 subject to these Permissions. Note that setting the SecurityManager too early may
291 prevent your part from starting, as for instance changing classloaders may be prohibited.
292 The classloader for the new situation is supposed to be present.
293<P>
294<DD><DL>
295
296<DT><B>Throws:</B>
297<DD><CODE><A HREF="../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></CODE></DL>
298</DD>
299</DL>
300<HR>
301
302<A NAME="restoreSecurityManager()"><!-- --></A><H3>
303restoreSecurityManager</H3>
304<PRE>
305public void <B>restoreSecurityManager</B>()</PRE>
306<DL>
307<DD>To be used by tasks that just finished executing the parts subject to these permissions.
308<P>
309<DD><DL>
310</DL>
311</DD>
312</DL>
313<!-- ========= END OF CLASS DATA ========= -->
314<HR>
315
316
317<!-- ======= START OF BOTTOM NAVBAR ====== -->
318<A NAME="navbar_bottom"><!-- --></A>
319<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
320<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
321<TR>
322<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
323<A NAME="navbar_bottom_firstrow"><!-- --></A>
324<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
325 <TR ALIGN="center" VALIGN="top">
326 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
327 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
328 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
329 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
330 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
331 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
332 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
333 </TR>
334</TABLE>
335</TD>
336<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
337</EM>
338</TD>
339</TR>
340
341<TR>
342<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
343&nbsp;<A HREF="../../../../../org/apache/tools/ant/types/PatternSet.NameEntry.html" title="class in org.apache.tools.ant.types"><B>PREV CLASS</B></A>&nbsp;
344&nbsp;<A HREF="../../../../../org/apache/tools/ant/types/Permissions.Permission.html" title="class in org.apache.tools.ant.types"><B>NEXT CLASS</B></A></FONT></TD>
345<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
346 <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
347&nbsp;<A HREF="Permissions.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
348&nbsp;<SCRIPT type="text/javascript">
349 <!--
350 if(window==top) {
351 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
352 }
353 //-->
354</SCRIPT>
355<NOSCRIPT>
356 <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
357</NOSCRIPT>
358
359</FONT></TD>
360</TR>
361<TR>
362<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
363 SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
364<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
365DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
366</TR>
367</TABLE>
368<A NAME="skip-navbar_bottom"></A>
369<!-- ======== END OF BOTTOM NAVBAR ======= -->
370
371<HR>
372Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.
373</BODY>
374</HTML>
Note: See TracBrowser for help on using the repository browser.