Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / JAVA / classes / org / openafs / jafs / PTSEntry.java
1 /*
2 * @(#)PTSEntry.java 1.2 10/23/2001
3 *
4 * Copyright (c) 2001 International Business Machines Corp.
5 * All rights reserved.
6 *
7 * This software has been released under the terms of the IBM Public
8 * License. For details, see the LICENSE file in the top-level source
9 * directory or online at http://www.openafs.org/dl/license10.html
10 *
11 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
12 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
13 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
14 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
15 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
16 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
17 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
18 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
19 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
20 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
21 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22 */
23
24 package org.openafs.jafs;
25
26 /**
27 * An interface representation of a PTS entry as it applies to
28 * AFS users and groups. This interface is implemented in both
29 * {@link User} and {@link Group} object abstractions.
30 * <BR><BR>
31 *
32 *
33 * @version 1.0, 3/31/02
34 * @see User
35 * @see Group
36 */
37 public interface PTSEntry
38 {
39 /**
40 * Constant for {@link User} object implementers,
41 * used with {@link #getType()}
42 */
43 public static final short PTS_USER = 0;
44 /**
45 * Constant for {@link Group} object implementers,
46 * used with {@link #getType()}
47 */
48 public static final short PTS_GROUP = 1;
49 /**
50 * Returns the Cell this PTS user or group belongs to.
51 *
52 * @return the Cell this PTS user or group belongs to
53 */
54 public Cell getCell();
55 /**
56 * Returns the creator of this PTS user or group.
57 *
58 * @return the creator of this PTS user or group
59 * @exception AFSException If an error occurs in the native code
60 */
61 public PTSEntry getCreator() throws AFSException;
62 /**
63 * Returns the name of this PTS user or group.
64 *
65 * @return the name of this PTS user or group
66 */
67 public String getName();
68 /**
69 * Returns the owner of this PTS user or group.
70 *
71 * @return the owner of this PTS user or group
72 * @exception AFSException If an error occurs in the native code
73 */
74 public PTSEntry getOwner() throws AFSException;
75 /**
76 * Returns the type of PTS entry the implementing object represents.
77 *
78 * <P>Possible values are:<BR>
79 * <ul>
80 * <li><code>{@link #PTS_USER}</code>
81 * -- a {@link User} object</li>
82 * <li><code>{@link #PTS_GROUP}</code>
83 * -- a {@link Group} object</li>
84 * </ul>
85 *
86 * @return the name of this PTS user or group
87 */
88 public short getType();
89 /**
90 * Returns the numeric AFS id of this user or group.
91 *
92 * @return the AFS id of this user/group
93 * @exception AFSException If an error occurs in the native code
94 */
95 public int getUID() throws AFSException;
96 }
97
98
99