2 * @(#)PTSEntry.java 1.2 10/23/2001
4 * Copyright (c) 2001 International Business Machines Corp.
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
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.
24 package org
.openafs
.jafs
;
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.
33 * @version 1.0, 3/31/02
37 public interface PTSEntry
40 * Constant for {@link User} object implementers,
41 * used with {@link #getType()}
43 public static final short PTS_USER
= 0;
45 * Constant for {@link Group} object implementers,
46 * used with {@link #getType()}
48 public static final short PTS_GROUP
= 1;
50 * Returns the Cell this PTS user or group belongs to.
52 * @return the Cell this PTS user or group belongs to
54 public Cell
getCell();
56 * Returns the creator of this PTS user or group.
58 * @return the creator of this PTS user or group
59 * @exception AFSException If an error occurs in the native code
61 public PTSEntry
getCreator() throws AFSException
;
63 * Returns the name of this PTS user or group.
65 * @return the name of this PTS user or group
67 public String
getName();
69 * Returns the owner of this PTS user or group.
71 * @return the owner of this PTS user or group
72 * @exception AFSException If an error occurs in the native code
74 public PTSEntry
getOwner() throws AFSException
;
76 * Returns the type of PTS entry the implementing object represents.
78 * <P>Possible values are:<BR>
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>
86 * @return the name of this PTS user or group
88 public short getType();
90 * Returns the numeric AFS id of this user or group.
92 * @return the AFS id of this user/group
93 * @exception AFSException If an error occurs in the native code
95 public int getUID() throws AFSException
;