public class SecurityDescriptor extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DACL |
static int |
DACLAutoInherited |
static int |
DACLAutoInheritReq |
static int |
DACLDefaulted |
static int |
DACLPresent |
static int |
DACLProtected |
static int |
Directory |
static int |
File |
static int |
Group |
static int |
GroupDefaulted |
static int |
Kernel |
static int |
NamedPipe |
static int |
Owner |
static int |
OwnerDefaulted |
static int |
RegistryKey |
static int |
SACL |
static int |
SACLAutoInherited |
static int |
SACLAutoInheritReq |
static int |
SACLDefaulted |
static int |
SACLPresent |
static int |
SACLProtected |
static int |
SelfRelative |
static int |
User |
Constructor and Description |
---|
SecurityDescriptor()
Default constructor
|
SecurityDescriptor(String name,
int type)
Class constructor
|
SecurityDescriptor(String name,
int type,
SID owner,
SID group,
ACL dacl,
ACL sacl)
Class constructor
|
Modifier and Type | Method and Description |
---|---|
ACL |
getDACL()
Return the discretionary ACL
|
SID |
getGroup()
Return the group SID
|
SID |
getOwner()
Return the owner SID
|
int |
getRevision()
Return the revision
|
ACL |
getSACL()
Return the system ACL
|
protected boolean |
hasControlFlag(int flg)
Check if the specified control flag is set
|
boolean |
hasDACL()
Check if the security descriptor has a discretionary ACL
|
boolean |
hasGroup()
Check if the security descriptor has a group SID
|
boolean |
hasOwner()
Check if the security descriptor has an owner SID
|
boolean |
hasSACL()
Check if the security descriptor has a system ACL
|
boolean |
isSelfRelative()
Check if the descriptor is self-relative
|
int |
loadDescriptor(byte[] buf,
int off)
Load the security descriptor from the specified buffer
|
int |
loadDescriptor(DataBuffer buf)
Load the security descriptor from the specified buffer
|
int |
saveDescriptor(byte[] buf,
int off)
Save the security descriptor to the specified buffer
|
int |
saveDescriptor(DataBuffer buf)
Save the security descriptor to the specified buffer
|
void |
setControlFlags(int flg)
Set the control flags
|
void |
setDACL(ACL acl)
Set the discretionary ACL
|
void |
setGroup(SID sid)
Set the group SID
|
void |
setOwner(SID sid)
Set the owner SID
|
void |
setSACL(ACL acl)
Set the system ACL
|
String |
toString()
Return the security descriptor as a string
|
public static final int Owner
public static final int Group
public static final int DACL
public static final int SACL
public static final int OwnerDefaulted
public static final int GroupDefaulted
public static final int DACLPresent
public static final int DACLDefaulted
public static final int SACLPresent
public static final int SACLDefaulted
public static final int DACLAutoInheritReq
public static final int SACLAutoInheritReq
public static final int DACLAutoInherited
public static final int SACLAutoInherited
public static final int DACLProtected
public static final int SACLProtected
public static final int SelfRelative
public static final int File
public static final int Directory
public static final int NamedPipe
public static final int RegistryKey
public static final int User
public static final int Kernel
public SecurityDescriptor()
public SecurityDescriptor(String name, int type)
name
- Stringtype
- intpublic final boolean isSelfRelative()
public final int getRevision()
public final boolean hasOwner()
public final SID getOwner()
public final boolean hasGroup()
public final SID getGroup()
public final boolean hasDACL()
public final ACL getDACL()
public final boolean hasSACL()
public final ACL getSACL()
public final void setOwner(SID sid)
sid
- SIDpublic final void setGroup(SID sid)
sid
- SIDpublic final void setDACL(ACL acl)
acl
- ACLpublic final void setSACL(ACL acl)
acl
- ACLpublic final void setControlFlags(int flg)
flg
- intpublic final int loadDescriptor(byte[] buf, int off) throws LoadException
buf
- byte[]off
- intLoadException
public final int loadDescriptor(DataBuffer buf) throws LoadException
buf
- DataBufferLoadException
public final int saveDescriptor(byte[] buf, int off) throws SaveException
buf
- byte[]off
- intSaveException
public final int saveDescriptor(DataBuffer buf) throws SaveException
buf
- DataBufferSaveException
protected final boolean hasControlFlag(int flg)
flg
- intCopyright © 2005–2017 Alfresco Software. All rights reserved.