com.googlecode.fascinator.common.authentication
Class GenericUser

java.lang.Object
  extended by com.googlecode.fascinator.common.authentication.GenericUser
All Implemented Interfaces:
User

public class GenericUser
extends Object
implements User

A basic user object, does not define its metadata schema, that is left to extending classes, but creates access methods against an unknown schema.

Author:
Greg Pendlebury

Constructor Summary
GenericUser()
           
 
Method Summary
 String describeMetadata()
          Will return a JSON string description of an extending classes' fields.
 String get(String property)
          Retrieves a given property for this user object.
 String getSource()
          Used by the authentication manager to track the user's origin
 String getUsername()
          Retrieve the user's name
 String realName()
          Retrieves how the user should be shown on-screen.
 void set(String property, String value)
          Sets a given property for this user object.
 void setSource(String plugin)
          Used by the authentication manager to track the user's origin
 void setUsername(String newName)
          Set user's name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericUser

public GenericUser()
Method Detail

describeMetadata

public final String describeMetadata()
Will return a JSON string description of an extending classes' fields.

Specified by:
describeMetadata in interface User
Parameters:
property - The class field to retrieve
Returns:
The value of the property

get

public final String get(String property)
Retrieves a given property for this user object.

Specified by:
get in interface User
Parameters:
property - The class field to retrieve
Returns:
The value of the property

set

public final void set(String property,
                      String value)
Sets a given property for this user object.

Specified by:
set in interface User
Parameters:
property - The class field to retrieve

realName

public String realName()
Retrieves how the user should be shown on-screen.

Specified by:
realName in interface User
Returns:
The value of the property

setUsername

public void setUsername(String newName)
Set user's name

Parameters:
newName -

getUsername

public String getUsername()
Retrieve the user's name

Returns:
The value of user's name

setSource

public void setSource(String plugin)
Used by the authentication manager to track the user's origin

Specified by:
setSource in interface User
Parameters:
plugin - The id of the authentication plugin

getSource

public String getSource()
Used by the authentication manager to track the user's origin

Specified by:
getSource in interface User
Returns:
The id of the authentication plugin


Copyright © 2009-2012. All Rights Reserved.