org.equanda.auth
Class ParsedAuthAndConfigProvider

java.lang.Object
  extended by org.equanda.auth.AuthAndConfigProviderAdapter
      extended by org.equanda.auth.MapAuthAndConfigProvider
          extended by org.equanda.auth.ParsedAuthAndConfigProvider
All Implemented Interfaces:
MutableAuthAndConfigProvider, AuthAndConfigProvider

public class ParsedAuthAndConfigProvider
extends MapAuthAndConfigProvider

...

Author:
Joachim Van der Auwera

Constructor Summary
ParsedAuthAndConfigProvider(String data)
           
 
Method Summary
 void addOrUpdate(String key, int aacValue)
          This method will add a new right, or update an existing
 String getAuthAndConfigString()
          This method returns the current full list of rights.
 String getAuthKey(String data)
          Given a full rights string (e.g "Table.table=RW") return the Table.table part
 String getAuthValue(String data)
          Given a full rights string (e.g "Table.table=RW") return the "RW" part
 
Methods inherited from class org.equanda.auth.MapAuthAndConfigProvider
getKeys, put, remove, setDelete, setDisplayList, setDisplayPrint, setDisplaySummary, setHidden, setReadable, setWritable
 
Methods inherited from class org.equanda.auth.AuthAndConfigProviderAdapter
hasKey, isDeletable, isDisplayList, isDisplayPrint, isDisplaySummary, isReadable, isWritable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.equanda.client.AuthAndConfigProvider
hasKey, isDeletable, isDisplayList, isDisplayPrint, isDisplaySummary, isReadable, isWritable
 

Constructor Detail

ParsedAuthAndConfigProvider

public ParsedAuthAndConfigProvider(String data)
Method Detail

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.Table
aacValue - 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.