Class SimpleFeatureUser

java.lang.Object
org.togglz.core.user.SimpleFeatureUser
All Implemented Interfaces:
FeatureUser

public class SimpleFeatureUser extends Object implements FeatureUser
Default implementation of FeatureUser.
Author:
Christian Kaltepoth
  • Constructor Details

    • SimpleFeatureUser

      public SimpleFeatureUser(String name)
      Constructor of DefaultFeatureManager. The featureAdmin flag will be set to false.
      Parameters:
      name - The name of the user
    • SimpleFeatureUser

      public SimpleFeatureUser(String name, boolean featureAdmin)
      Constructor of DefaultFeatureManager.
      Parameters:
      name - The name of the user
      featureAdmin - true if the user is a feature admin
  • Method Details

    • getName

      public String getName()
      Description copied from interface: FeatureUser
      Get the unique name for this use
      Specified by:
      getName in interface FeatureUser
      Returns:
      name of the user
    • isFeatureAdmin

      public boolean isFeatureAdmin()
      Description copied from interface: FeatureUser
      Is the user a feature admin, which means that he is able to use the Togglz Admin Console.
      Specified by:
      isFeatureAdmin in interface FeatureUser
      Returns:
      true for feature admins, false otherwise.
    • getAttribute

      public Object getAttribute(String name)
      Description copied from interface: FeatureUser
      This method allows to retrieve attributes associated with a user.
      Specified by:
      getAttribute in interface FeatureUser
      Parameters:
      name - The name of the attribute
      Returns:
      the value of the attribute or null if there is no such attribute.
    • setAttribute

      public SimpleFeatureUser setAttribute(String name, Object value)
      This method can be used to set attributes of the user.
      Parameters:
      name - The name of the attribute
      value - The value of the attribute
      Returns:
      this for fluent object creation