public interface UserPrincipal extends Principal
Principal
表示用来确定在一个文件系统对象的访问权限的身份。
在许多平台和文件系统中,一个实体需要适当的访问权限或权限以访问文件系统中的对象。访问权限通常是通过检查实体的身份来执行的。例如,在实现中,使用访问控制列表(ACL)来执行特权分离然后在文件系统中的文件有一个相关的ACL,ACL中的身份确定指定的访问权限。
一个UserPrincipal
对象是一个身份的抽象表示。它有一个name
,通常是用户名或帐户名称,它代表。用户主体对象可以使用UserPrincipalLookupService
得到,或由FileAttributeView
实现提供身份相关的属性。例如,在AclFileAttributeView
和PosixFileAttributeView
提供访问一个文件的owner
。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.