org.wamblee.security.authorization
Class GroupUserCondition

java.lang.Object
  extended by org.wamblee.security.authorization.AbstractUserCondition
      extended by org.wamblee.security.authorization.GroupUserCondition
All Implemented Interfaces:
UserCondition

@Entity
public class GroupUserCondition
extends AbstractUserCondition

Checks if a user against a specific group.

Author:
Erik Brakkee

Constructor Summary
protected GroupUserCondition()
          For OR mapping.
  GroupUserCondition(java.lang.String aGroup)
          Constructs the condition.
 
Method Summary
protected  java.lang.String getGroup()
           
 boolean matches(java.lang.String aUser)
          Determines if the condition matches.
protected  void setGroup(java.lang.String aGroup)
           
 void setUserAdmin(UserAdministration aAdmin)
          Sets the user administration object.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GroupUserCondition

public GroupUserCondition(java.lang.String aGroup)
Constructs the condition.

Parameters:
aGroup - Group the user must be in.

GroupUserCondition

protected GroupUserCondition()
For OR mapping.

Method Detail

setUserAdmin

public void setUserAdmin(UserAdministration aAdmin)
Description copied from interface: UserCondition
Sets the user administration object.

Parameters:
aAdmin - User administration.

matches

public boolean matches(java.lang.String aUser)
Description copied from interface: UserCondition
Determines if the condition matches.

Parameters:
aUser - user to check.
Returns:
True if the condition matches, false otherwise.

getGroup

protected java.lang.String getGroup()
Returns:
Returns the group.

setGroup

protected void setGroup(java.lang.String aGroup)
Parameters:
aGroup - The group to set.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2022. All Rights Reserved.