org.equanda.auth
Class ParsedAuthAndConfigProvider
java.lang.Object
org.equanda.auth.AuthAndConfigProviderAdapter
org.equanda.auth.MapAuthAndConfigProvider
org.equanda.auth.ParsedAuthAndConfigProvider
- All Implemented Interfaces:
- MutableAuthAndConfigProvider, AuthAndConfigProvider
public class ParsedAuthAndConfigProvider
- extends MapAuthAndConfigProvider
...
- Author:
- Joachim Van der Auwera
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ParsedAuthAndConfigProvider
public ParsedAuthAndConfigProvider(String data)
getAuthKey
public String getAuthKey(String data)
- Given a full rights string (e.g "Table.table=RW") return the Table.table part
- Parameters:
data
- The auth string
- Returns:
- The key part
getAuthValue
public String getAuthValue(String data)
- Given a full rights string (e.g "Table.table=RW") return the "RW" part
- Parameters:
data
- The auth string
- Returns:
- The value part
addOrUpdate
public void addOrUpdate(String key,
int aacValue)
- This method will add a new right, or update an existing
- Parameters:
key
- The key to be used, e.g table.TableaacValue
- An integer representing the rights.
getAuthAndConfigString
public String getAuthAndConfigString()
- This method returns the current full list of rights. Each right is separated by a newline.
The keys are sorted to assure consistent output and make it easier to search in long lists.
- Returns:
- A string containing the list of rights.
Copyright © 2007-2009. All Rights Reserved.