org.pentaho.platform.engine.security
Class SecurityParameterProvider

java.lang.Object
  extended by org.pentaho.platform.engine.security.SecurityParameterProvider
All Implemented Interfaces:
IParameterProvider

public class SecurityParameterProvider
extends Object
implements IParameterProvider


Field Summary
static String SCOPE_SECURITY
           
static List SecurityNames
           
static List SecurityTypes
           
 
Fields inherited from interface org.pentaho.platform.api.engine.IParameterProvider
SCOPE_REQUEST, SCOPE_SESSION
 
Constructor Summary
SecurityParameterProvider(IPentahoSession session)
           
 
Method Summary
 String arrayToString(org.springframework.security.GrantedAuthority[] anArray)
           
 String arrayToString(String[] anArray)
           
 Object[] getArrayParameter(String name, Object[] defaultValue)
          Retrieve the requested parameter as an Object array
 Date getDateParameter(String name, Date defaultValue)
          Retrieve the requested parameter as type java.util.Date.
 BigDecimal getDecimalParameter(String name, BigDecimal defaultValue)
          Retrieve the requested parameter as decimal, returning a java.lang.Object.
 String getListSeparator()
           
 long getLongParameter(String name, long defaultValue)
          Retrieve the requested parameter as primitive Java type long.
 Object getParameter(String name)
          Gets the named parameter from the provider as it's native type
 Iterator getParameterNames()
          Return list of all avialable parameter names in this provider
 String getParameterType(String name)
           
 String[] getStringArrayParameter(String name, String[] defaultValue)
          Retrieve the requested parameter as a String array
 String getStringParameter(String name, String defaultValue)
          Retrieve the requested parameter as type java.lang.String
 boolean hasParameter(String name)
           
 String listToString(List aList)
           
 void setListSeparator(String value)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SecurityNames

public static final List SecurityNames

SecurityTypes

public static final List SecurityTypes

SCOPE_SECURITY

public static final String SCOPE_SECURITY
See Also:
Constant Field Values
Constructor Detail

SecurityParameterProvider

public SecurityParameterProvider(IPentahoSession session)
Method Detail

setListSeparator

public void setListSeparator(String value)

getListSeparator

public String getListSeparator()

getStringParameter

public String getStringParameter(String name,
                                 String defaultValue)
Description copied from interface: IParameterProvider
Retrieve the requested parameter as type java.lang.String

Specified by:
getStringParameter in interface IParameterProvider
Parameters:
name - name of parameter to retrieve
defaultValue - value to return if the named parameter can not be found
Returns:
value of requested parameter, or the defaultValue if not found

listToString

public String listToString(List aList)

arrayToString

public String arrayToString(String[] anArray)

arrayToString

public String arrayToString(org.springframework.security.GrantedAuthority[] anArray)

getLongParameter

public long getLongParameter(String name,
                             long defaultValue)
Description copied from interface: IParameterProvider
Retrieve the requested parameter as primitive Java type long.

Specified by:
getLongParameter in interface IParameterProvider
Parameters:
name - name of parameter to retrieve
defaultValue - value to return if the named parameter can not be found
Returns:
value of requested parameter, or the defaultValue if not found

getDateParameter

public Date getDateParameter(String name,
                             Date defaultValue)
Description copied from interface: IParameterProvider
Retrieve the requested parameter as type java.util.Date.

Specified by:
getDateParameter in interface IParameterProvider
Parameters:
name - name of parameter to retrieve
defaultValue - value to return if the named parameter can not be found
Returns:
value of requested parameter, or the defaultValue if not found

getDecimalParameter

public BigDecimal getDecimalParameter(String name,
                                      BigDecimal defaultValue)
Description copied from interface: IParameterProvider
Retrieve the requested parameter as decimal, returning a java.lang.Object.

Specified by:
getDecimalParameter in interface IParameterProvider
Parameters:
name - name of parameter to retrieve
defaultValue - value to return if the named parameter can not be found
Returns:
value of requested parameter, or the defaultValue if not found

getArrayParameter

public Object[] getArrayParameter(String name,
                                  Object[] defaultValue)
Description copied from interface: IParameterProvider
Retrieve the requested parameter as an Object array

Specified by:
getArrayParameter in interface IParameterProvider
Parameters:
name - name of parameter to retrieve
defaultValue - value to return if the named parameter can not be found
Returns:
value of requested parameter converted to an array if it wasn't already an array, or the defaultValue if not found

getStringArrayParameter

public String[] getStringArrayParameter(String name,
                                        String[] defaultValue)
Description copied from interface: IParameterProvider
Retrieve the requested parameter as a String array

Specified by:
getStringArrayParameter in interface IParameterProvider
Parameters:
name - name of parameter to retrieve
defaultValue - value to return if the named parameter can not be found
Returns:
value of requested parameter converted to a String array if it wasn't already a String array, or the defaultValue if not found

getParameterNames

public Iterator getParameterNames()
Description copied from interface: IParameterProvider
Return list of all avialable parameter names in this provider

Specified by:
getParameterNames in interface IParameterProvider
Returns:
Set of parameter names

getParameterType

public String getParameterType(String name)

getParameter

public Object getParameter(String name)
Description copied from interface: IParameterProvider
Gets the named parameter from the provider as it's native type

Specified by:
getParameter in interface IParameterProvider
Parameters:
name - The name of the parameter to retrieve
Returns:
The native object

hasParameter

public boolean hasParameter(String name)
Specified by:
hasParameter in interface IParameterProvider
Parameters:
name - Name of the parameter to look up
Returns:
true if the parameter exists in the parameter provider