/usr/share/doc/libosgi-compendium-java/api/info/dmtree/Acl.html is in libosgi-compendium-java-doc 4.3.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_23) on Wed Nov 09 19:45:53 UTC 2011 -->
<TITLE>
Acl
</TITLE>
<META NAME="date" CONTENT="2011-11-09">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Acl";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV CLASS
<A HREF="../../info/dmtree/DmtAdmin.html" title="interface in info.dmtree"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html?info/dmtree/Acl.html" target="_top"><B>FRAMES</B></A>
<A HREF="Acl.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
info.dmtree</FONT>
<BR>
Class Acl</H2>
<PRE>
java.lang.Object
<IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>info.dmtree.Acl</B>
</PRE>
<HR>
<DL>
<DT><PRE>public final class <B>Acl</B><DT>extends java.lang.Object</DL>
</PRE>
<P>
<code>Acl</code> is an immutable class representing structured access to DMT
ACLs. Under OMA DM the ACLs are defined as strings with an internal syntax.
<p>
The methods of this class taking a principal as parameter accept remote
server IDs (as passed to <A HREF="../../info/dmtree/DmtAdmin.html#getSession(java.lang.String, java.lang.String, int)"><CODE>DmtAdmin.getSession</CODE></A>), as well as " <code>*</code> " indicating any
principal.
<p>
The syntax for valid remote server IDs:<br>
<<i>server-identifier</i>> ::= All printable characters except
<code>'='</code>, <code>'&amp;'</code>, <code>'*'</code>, <code>'+'</code> or white-space
characters.
<P>
<P>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../info/dmtree/Acl.html#ADD">ADD</A></B></CODE>
<BR>
Principals holding this permission can issue ADD commands on the node
having this ACL.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../info/dmtree/Acl.html#ALL_PERMISSION">ALL_PERMISSION</A></B></CODE>
<BR>
Principals holding this permission can issue any command on the node
having this ACL.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../info/dmtree/Acl.html#DELETE">DELETE</A></B></CODE>
<BR>
Principals holding this permission can issue DELETE commands on the node
having this ACL.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../info/dmtree/Acl.html#EXEC">EXEC</A></B></CODE>
<BR>
Principals holding this permission can issue EXEC commands on the node
having this ACL.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../info/dmtree/Acl.html#GET">GET</A></B></CODE>
<BR>
Principals holding this permission can issue GET command on the node
having this ACL.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../info/dmtree/Acl.html#REPLACE">REPLACE</A></B></CODE>
<BR>
Principals holding this permission can issue REPLACE commands on the node
having this ACL.</TD>
</TR>
</TABLE>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../info/dmtree/Acl.html#Acl(java.lang.String)">Acl</A></B>(java.lang.String acl)</CODE>
<BR>
Create an instance of the ACL from its canonic string representation.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../info/dmtree/Acl.html#Acl(java.lang.String[], int[])">Acl</A></B>(java.lang.String[] principals,
int[] permissions)</CODE>
<BR>
Creates an instance with a specified list of principals and the
permissions they hold.</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../info/dmtree/Acl.html" title="class in info.dmtree">Acl</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../info/dmtree/Acl.html#addPermission(java.lang.String, int)">addPermission</A></B>(java.lang.String principal,
int permissions)</CODE>
<BR>
Create a new <code>Acl</code> instance from this <code>Acl</code> with
the given permission added for the given principal.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../info/dmtree/Acl.html" title="class in info.dmtree">Acl</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../info/dmtree/Acl.html#deletePermission(java.lang.String, int)">deletePermission</A></B>(java.lang.String principal,
int permissions)</CODE>
<BR>
Create a new <code>Acl</code> instance from this <code>Acl</code> with
the given permission revoked from the given principal.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../info/dmtree/Acl.html#equals(java.lang.Object)">equals</A></B>(java.lang.Object obj)</CODE>
<BR>
Checks whether the given object is equal to this <code>Acl</code>
instance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../info/dmtree/Acl.html#getPermissions(java.lang.String)">getPermissions</A></B>(java.lang.String principal)</CODE>
<BR>
Get the permissions associated to a given principal.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../info/dmtree/Acl.html#getPrincipals()">getPrincipals</A></B>()</CODE>
<BR>
Get the list of principals who have any kind of permissions on this node.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../info/dmtree/Acl.html#hashcode()">hashcode</A></B>()</CODE>
<BR>
<B>Deprecated.</B> <I>Use correct method <A HREF="../../info/dmtree/Acl.html#hashCode()"><CODE>hashCode()</CODE></A>;</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../info/dmtree/Acl.html#hashCode()">hashCode</A></B>()</CODE>
<BR>
Returns the hash code for this ACL instance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../info/dmtree/Acl.html#isPermitted(java.lang.String, int)">isPermitted</A></B>(java.lang.String principal,
int permissions)</CODE>
<BR>
Check whether the given permissions are granted to a certain principal.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../info/dmtree/Acl.html" title="class in info.dmtree">Acl</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../info/dmtree/Acl.html#setPermission(java.lang.String, int)">setPermission</A></B>(java.lang.String principal,
int permissions)</CODE>
<BR>
Create a new <code>Acl</code> instance from this <code>Acl</code> where
all permissions for the given principal are overwritten with the given
permissions.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../info/dmtree/Acl.html#toString()">toString</A></B>()</CODE>
<BR>
Give the canonic string representation of this ACL.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, finalize, getClass, notify, notifyAll, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="GET"><!-- --></A><H3>
GET</H3>
<PRE>
public static final int <B>GET</B></PRE>
<DL>
<DD>Principals holding this permission can issue GET command on the node
having this ACL.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../constant-values.html#info.dmtree.Acl.GET">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="ADD"><!-- --></A><H3>
ADD</H3>
<PRE>
public static final int <B>ADD</B></PRE>
<DL>
<DD>Principals holding this permission can issue ADD commands on the node
having this ACL.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../constant-values.html#info.dmtree.Acl.ADD">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="REPLACE"><!-- --></A><H3>
REPLACE</H3>
<PRE>
public static final int <B>REPLACE</B></PRE>
<DL>
<DD>Principals holding this permission can issue REPLACE commands on the node
having this ACL.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../constant-values.html#info.dmtree.Acl.REPLACE">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="DELETE"><!-- --></A><H3>
DELETE</H3>
<PRE>
public static final int <B>DELETE</B></PRE>
<DL>
<DD>Principals holding this permission can issue DELETE commands on the node
having this ACL.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../constant-values.html#info.dmtree.Acl.DELETE">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="EXEC"><!-- --></A><H3>
EXEC</H3>
<PRE>
public static final int <B>EXEC</B></PRE>
<DL>
<DD>Principals holding this permission can issue EXEC commands on the node
having this ACL.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../constant-values.html#info.dmtree.Acl.EXEC">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="ALL_PERMISSION"><!-- --></A><H3>
ALL_PERMISSION</H3>
<PRE>
public static final int <B>ALL_PERMISSION</B></PRE>
<DL>
<DD>Principals holding this permission can issue any command on the node
having this ACL. This permission is the logical OR of <A HREF="../../info/dmtree/Acl.html#ADD"><CODE>ADD</CODE></A>,
<A HREF="../../info/dmtree/Acl.html#DELETE"><CODE>DELETE</CODE></A>, <A HREF="../../info/dmtree/Acl.html#EXEC"><CODE>EXEC</CODE></A>, <A HREF="../../info/dmtree/Acl.html#GET"><CODE>GET</CODE></A> and <A HREF="../../info/dmtree/Acl.html#REPLACE"><CODE>REPLACE</CODE></A>
permissions.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../constant-values.html#info.dmtree.Acl.ALL_PERMISSION">Constant Field Values</A></DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="Acl(java.lang.String)"><!-- --></A><H3>
Acl</H3>
<PRE>
public <B>Acl</B>(java.lang.String acl)</PRE>
<DL>
<DD>Create an instance of the ACL from its canonic string representation.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>acl</CODE> - The string representation of the ACL as defined in OMA DM. If
<code>null</code> or empty then it represents an empty list of
principals with no permissions.
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - if acl is not a valid OMA DM ACL string</DL>
</DL>
<HR>
<A NAME="Acl(java.lang.String[], int[])"><!-- --></A><H3>
Acl</H3>
<PRE>
public <B>Acl</B>(java.lang.String[] principals,
int[] permissions)</PRE>
<DL>
<DD>Creates an instance with a specified list of principals and the
permissions they hold. The two arrays run in parallel, that is
<code>principals[i]</code> will hold <code>permissions[i]</code> in
the ACL.
<p>
A principal name may not appear multiple times in the 'principals'
argument. If the "*" principal appears in the array, the
corresponding permissions will be granted to all principals (regardless
of whether they appear in the array or not).
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>principals</CODE> - The array of principals<DD><CODE>permissions</CODE> - The array of permissions
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the length of the two arrays are not
the same, if any array element is invalid, or if a principal
appears multiple times in the <code>principals</code> array</DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="equals(java.lang.Object)"><!-- --></A><H3>
equals</H3>
<PRE>
public boolean <B>equals</B>(java.lang.Object obj)</PRE>
<DL>
<DD>Checks whether the given object is equal to this <code>Acl</code>
instance. Two <code>Acl</code> instances are equal if they allow the
same set of permissions for the same set of principals.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>equals</CODE> in class <CODE>java.lang.Object</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>obj</CODE> - the object to compare with this <code>Acl</code> instance
<DT><B>Returns:</B><DD><code>true</code> if the parameter represents the same ACL as
this instance</DL>
</DD>
</DL>
<HR>
<A NAME="hashCode()"><!-- --></A><H3>
hashCode</H3>
<PRE>
public int <B>hashCode</B>()</PRE>
<DL>
<DD>Returns the hash code for this ACL instance. If two <code>Acl</code>
instances are equal according to the <A HREF="../../info/dmtree/Acl.html#equals(java.lang.Object)"><CODE>equals(java.lang.Object)</CODE></A> method, then calling
this method on each of them must produce the same integer result.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>hashCode</CODE> in class <CODE>java.lang.Object</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>hash code for this ACL</DL>
</DD>
</DL>
<HR>
<A NAME="hashcode()"><!-- --></A><H3>
hashcode</H3>
<PRE>
public int <B>hashcode</B>()</PRE>
<DL>
<DD><B>Deprecated.</B> <I>Use correct method <A HREF="../../info/dmtree/Acl.html#hashCode()"><CODE>hashCode()</CODE></A>;</I>
<P>
<DD>Use <A HREF="../../info/dmtree/Acl.html#hashCode()"><CODE>hashCode()</CODE></A> instead.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>Result of <A HREF="../../info/dmtree/Acl.html#hashCode()"><CODE>hashCode()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="addPermission(java.lang.String, int)"><!-- --></A><H3>
addPermission</H3>
<PRE>
public <A HREF="../../info/dmtree/Acl.html" title="class in info.dmtree">Acl</A> <B>addPermission</B>(java.lang.String principal,
int permissions)</PRE>
<DL>
<DD>Create a new <code>Acl</code> instance from this <code>Acl</code> with
the given permission added for the given principal. The already existing
permissions of the principal are not affected.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>principal</CODE> - The entity to which permissions should be granted, or
"*" to grant permissions to all principals.<DD><CODE>permissions</CODE> - The permissions to be given. The parameter can be a
logical <code>or</code> of more permission constants defined in
this class.
<DT><B>Returns:</B><DD>a new <code>Acl</code> instance
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>principal</code> is not a
valid principal name or if <code>permissions</code> is not a
valid combination of the permission constants defined in this
class</DL>
</DD>
</DL>
<HR>
<A NAME="deletePermission(java.lang.String, int)"><!-- --></A><H3>
deletePermission</H3>
<PRE>
public <A HREF="../../info/dmtree/Acl.html" title="class in info.dmtree">Acl</A> <B>deletePermission</B>(java.lang.String principal,
int permissions)</PRE>
<DL>
<DD>Create a new <code>Acl</code> instance from this <code>Acl</code> with
the given permission revoked from the given principal. Other permissions
of the principal are not affected.
<p>
Note, that it is not valid to revoke a permission from a specific
principal if that permission is granted globally to all principals.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>principal</CODE> - The entity from which permissions should be revoked, or
"*" to revoke permissions from all principals.<DD><CODE>permissions</CODE> - The permissions to be revoked. The parameter can be a
logical <code>or</code> of more permission constants defined in
this class.
<DT><B>Returns:</B><DD>a new <code>Acl</code> instance
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>principal</code> is not a
valid principal name, if <code>permissions</code> is not a
valid combination of the permission constants defined in this
class, or if a globally granted permission would have been
revoked from a specific principal</DL>
</DD>
</DL>
<HR>
<A NAME="getPermissions(java.lang.String)"><!-- --></A><H3>
getPermissions</H3>
<PRE>
public int <B>getPermissions</B>(java.lang.String principal)</PRE>
<DL>
<DD>Get the permissions associated to a given principal.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>principal</CODE> - The entity whose permissions to query, or "*"
to query the permissions that are granted globally, to all
principals
<DT><B>Returns:</B><DD>The permissions of the given principal. The returned
<code>int</code> is a bitmask of the permission constants defined
in this class
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>principal</code> is not a
valid principal name</DL>
</DD>
</DL>
<HR>
<A NAME="isPermitted(java.lang.String, int)"><!-- --></A><H3>
isPermitted</H3>
<PRE>
public boolean <B>isPermitted</B>(java.lang.String principal,
int permissions)</PRE>
<DL>
<DD>Check whether the given permissions are granted to a certain principal.
The requested permissions are specified as a bitfield, for example
<code>(Acl.ADD | Acl.DELETE | Acl.GET)</code>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>principal</CODE> - The entity to check, or "*" to check whether
the given permissions are granted to all principals globally<DD><CODE>permissions</CODE> - The permissions to check
<DT><B>Returns:</B><DD><code>true</code> if the principal holds all the given permissions
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>principal</code> is not a
valid principal name or if <code>permissions</code> is not a
valid combination of the permission constants defined in this
class</DL>
</DD>
</DL>
<HR>
<A NAME="setPermission(java.lang.String, int)"><!-- --></A><H3>
setPermission</H3>
<PRE>
public <A HREF="../../info/dmtree/Acl.html" title="class in info.dmtree">Acl</A> <B>setPermission</B>(java.lang.String principal,
int permissions)</PRE>
<DL>
<DD>Create a new <code>Acl</code> instance from this <code>Acl</code> where
all permissions for the given principal are overwritten with the given
permissions.
<p>
Note, that when changing the permissions of a specific principal, it is
not allowed to specify a set of permissions stricter than the global set
of permissions (that apply to all principals).
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>principal</CODE> - The entity to which permissions should be granted, or
"*" to globally grant permissions to all principals.<DD><CODE>permissions</CODE> - The set of permissions to be given. The parameter is
a bitmask of the permission constants defined in this class.
<DT><B>Returns:</B><DD>a new <code>Acl</code> instance
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>principal</code> is not a
valid principal name, if <code>permissions</code> is not a
valid combination of the permission constants defined in this
class, or if a globally granted permission would have been
revoked from a specific principal</DL>
</DD>
</DL>
<HR>
<A NAME="getPrincipals()"><!-- --></A><H3>
getPrincipals</H3>
<PRE>
public java.lang.String[] <B>getPrincipals</B>()</PRE>
<DL>
<DD>Get the list of principals who have any kind of permissions on this node.
The list only includes those principals that have been explicitly
assigned permissions (so "*" is never returned), globally set
permissions naturally apply to all other principals as well.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The array of principals having permissions on this node.</DL>
</DD>
</DL>
<HR>
<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public java.lang.String <B>toString</B>()</PRE>
<DL>
<DD>Give the canonic string representation of this ACL. The operations are in
the following order: {Add, Delete, Exec, Get, Replace}, principal names
are sorted alphabetically.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>The string representation as defined in OMA DM.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV CLASS
<A HREF="../../info/dmtree/DmtAdmin.html" title="interface in info.dmtree"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html?info/dmtree/Acl.html" target="_top"><B>FRAMES</B></A>
<A HREF="Acl.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>
|