public abstract class AccessControl extends Object
Controls access to a shared filesystem.
Modifier and Type | Field and Description |
---|---|
static int |
Default |
static int |
MaxLevel |
static int |
NoAccess |
static int |
ReadOnly |
static int |
ReadWrite |
Modifier | Constructor and Description |
---|---|
protected |
AccessControl(String name,
String type,
int access)
Class constructor
|
Modifier and Type | Method and Description |
---|---|
abstract int |
allowsAccess(SrvSession sess,
SharedDevice share,
AccessControlManager mgr)
Check if the specified session has access to the shared device.
|
static String |
asAccessString(int access)
Return the access control type as a string
|
int |
getAccess()
Return the access control check type
|
String |
getAccessString()
Return the access control check type as a string
|
String |
getName()
Return the access control name
|
String |
getType()
Return the access control type
|
protected static int |
indexFromList(String val,
String[] valid,
boolean caseSensitive)
Return the index of a value from a list of valid values, or 01 if not valid
|
protected static String[] |
listFromString(String str)
Create a list of valid strings from a comma delimeted list
|
protected void |
setName(String name)
Set the access control name
|
protected void |
setType(String typ)
Set the access control type
|
String |
toString()
Return the access control as a string
|
public static final int NoAccess
public static final int ReadOnly
public static final int ReadWrite
public static final int MaxLevel
public static final int Default
public final String getName()
public final String getType()
public final int getAccess()
public final String getAccessString()
public abstract int allowsAccess(SrvSession sess, SharedDevice share, AccessControlManager mgr)
sess
- SrvSessionshare
- SharedDevicemgr
- AccessControlManagerprotected static final int indexFromList(String val, String[] valid, boolean caseSensitive)
val
- Stringvalid
- String[]caseSensitive
- booleanprotected static final String[] listFromString(String str)
str
- Stringprotected final void setType(String typ)
typ
- Stringprotected final void setName(String name)
name
- Stringpublic static final String asAccessString(int access)
access
- intCopyright © 2005–2017 Alfresco Software. All rights reserved.