Package org.togglz.core.user
Class SimpleFeatureUser
java.lang.Object
org.togglz.core.user.SimpleFeatureUser
- All Implemented Interfaces:
FeatureUser
Default implementation of
FeatureUser.- Author:
- Christian Kaltepoth
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleFeatureUser(String name) Constructor ofDefaultFeatureManager.SimpleFeatureUser(String name, boolean featureAdmin) Constructor ofDefaultFeatureManager. -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute(String name) This method allows to retrieve attributes associated with a user.getName()Get the unique name for this usebooleanIs the user a feature admin, which means that he is able to use the Togglz Admin Console.setAttribute(String name, Object value) This method can be used to set attributes of the user.
-
Constructor Details
-
SimpleFeatureUser
- Parameters:
name- The name of the user
-
SimpleFeatureUser
Constructor ofDefaultFeatureManager.- Parameters:
name- The name of the userfeatureAdmin-trueif the user is a feature admin
-
-
Method Details
-
getName
Description copied from interface:FeatureUserGet the unique name for this use- Specified by:
getNamein interfaceFeatureUser- Returns:
- name of the user
-
isFeatureAdmin
public boolean isFeatureAdmin()Description copied from interface:FeatureUserIs the user a feature admin, which means that he is able to use the Togglz Admin Console.- Specified by:
isFeatureAdminin interfaceFeatureUser- Returns:
truefor feature admins,falseotherwise.
-
getAttribute
Description copied from interface:FeatureUserThis method allows to retrieve attributes associated with a user.- Specified by:
getAttributein interfaceFeatureUser- Parameters:
name- The name of the attribute- Returns:
- the value of the attribute or
nullif there is no such attribute.
-
setAttribute
This method can be used to set attributes of the user.- Parameters:
name- The name of the attributevalue- The value of the attribute- Returns:
thisfor fluent object creation
-