Package africa.absa.inception.security
Class UserAttribute
java.lang.Object
africa.absa.inception.security.UserAttribute
- All Implemented Interfaces:
Serializable
The UserAttribute class stores a user attribute as a name-value pair.
- Author:
- Marcus Portmann
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new UserAttribute.UserAttribute(String name, byte[] value) Constructs a new UserAttribute.UserAttribute(String name, double value) Constructs a new UserAttribute.UserAttribute(String name, long value) Constructs a new UserAttribute.UserAttribute(String name, africa.absa.inception.core.util.BinaryBuffer value) Constructs a new UserAttribute.UserAttribute(String name, String value) Constructs a new UserAttribute.UserAttribute(String name, BigDecimal value) Constructs a new UserAttribute. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancontains(List<UserAttribute> list, String name) Returns whether the list of user attributes contains a user attribute whose name matches the specified name.byte[]Returns the binary value for the user attribute.static byte[]getBinaryValue(List<UserAttribute> list, String name) Returns the binary value for the user attribute with the specified name in the specified list.Returns the BigDecimal value for the user attribute.static BigDecimalgetDecimalValue(List<UserAttribute> list, String name) Returns the BigDecimal value for the user attribute with the specified name in the specified list.doubleReturns the double value for the user attribute.static doublegetDoubleValue(List<UserAttribute> list, String name) Returns the double value for the user attribute with the specified name in the specified list.intReturns the int value for the user attribute.static intgetIntegerValue(List<UserAttribute> list, String name) Returns the int value for the user attribute with the specified name in the specified list.longReturns the long value for the user attribute.static longgetLongValue(List<UserAttribute> list, String name) Returns the long value for the user attribute with the specified name in the specified list.getName()Returns the name of the user attribute.Returns the String value for the user attribute.static StringgetStringValue(List<UserAttribute> list, String name) Returns the String value for the user attribute with the specified name in the specified list.getValue()Returns the String value for the user attribute.voidsetBinaryValue(byte[] value) Set the binary value for the user attribute.voidsetBinaryValue(africa.absa.inception.core.util.BinaryBuffer value) Set the binary value for the user attribute.static voidsetBinaryValue(List<UserAttribute> list, String name, byte[] value) Set the binary value for the user attribute with the specified name in the specified list.static voidsetBinaryValue(List<UserAttribute> list, String name, africa.absa.inception.core.util.BinaryBuffer value) Set the binary value for the user attribute with the specified name in the specified list.voidsetDecimalValue(BigDecimal value) Set the BigDecimal value for the user attribute.static voidsetDecimalValue(List<UserAttribute> list, String name, BigDecimal value) Set the BigDecimal value for the user attribute with the specified name in the specified list.voidsetDoubleValue(double value) Set the double value for the user attribute.static voidsetDoubleValue(List<UserAttribute> list, String name, double value) Set the double value for the user attribute with the specified name in the specified list.voidsetIntegerValue(int value) Set the int value for the user attribute.static voidsetIntegerValue(List<UserAttribute> list, String name, int value) Set the int value for the user attribute with the specified name in the specified list.voidsetLongValue(long value) Set the long value for the user attribute.static voidsetLongValue(List<UserAttribute> list, String name, long value) Set the long value for the user attribute with the specified name in the specified list.voidSet the name of the user attribute.voidsetStringValue(String value) Set the String value for the user attribute.static voidsetStringValue(List<UserAttribute> list, String name, String value) Set the String value for the user attribute with the specified name in the specified list.
-
Constructor Details
-
UserAttribute
public UserAttribute()Constructs a new UserAttribute. -
UserAttribute
Constructs a new UserAttribute.- Parameters:
name- the name of the user attributevalue- the BigDecimal value for the user attribute
-
UserAttribute
Constructs a new UserAttribute.- Parameters:
name- the name of the user attributevalue- the binary value for the user attribute
-
UserAttribute
Constructs a new UserAttribute.- Parameters:
name- the name of the user attributevalue- the binary value for the user attribute
-
UserAttribute
Constructs a new UserAttribute.- Parameters:
name- the name of the user attributevalue- the double value for the user attribute
-
UserAttribute
Constructs a new UserAttribute.- Parameters:
name- the name of the user attributevalue- the long value for the user attribute
-
UserAttribute
Constructs a new UserAttribute.- Parameters:
name- the name of the user attributevalue- the String value for the user attribute
-
-
Method Details
-
contains
Returns whether the list of user attributes contains a user attribute whose name matches the specified name.- Parameters:
list- the user attributes to searchname- the name of the attribute- Returns:
- true if the list of user attributes contains a user attribute whose name matches the specified name or false otherwise
-
getBinaryValue
public static byte[] getBinaryValue(List<UserAttribute> list, String name) throws UserAttributeException Returns the binary value for the user attribute with the specified name in the specified list.- Parameters:
list- the user attributes to searchname- the name of the attribute- Returns:
- the binary value for the user attribute with the specified name in the specified list
- Throws:
UserAttributeException- if the binary value could not be retrieved for the user attribute
-
getDecimalValue
public static BigDecimal getDecimalValue(List<UserAttribute> list, String name) throws UserAttributeException Returns the BigDecimal value for the user attribute with the specified name in the specified list.- Parameters:
list- the user attributes to searchname- the name of the attribute- Returns:
- the BigDecimal value for the user attribute with the specified name in the specified list
- Throws:
UserAttributeException- if the decimal value could not be retrieved for the user attribute
-
getDoubleValue
public static double getDoubleValue(List<UserAttribute> list, String name) throws UserAttributeException Returns the double value for the user attribute with the specified name in the specified list.- Parameters:
list- the user attributes to searchname- the name of the attribute- Returns:
- the double value for the user attribute with the specified name in the specified list
- Throws:
UserAttributeException- if the double value could not be retrieved for the user attribute
-
getIntegerValue
public static int getIntegerValue(List<UserAttribute> list, String name) throws UserAttributeException Returns the int value for the user attribute with the specified name in the specified list.- Parameters:
list- the user attributes to searchname- the name of the attribute- Returns:
- the int value for the user attribute with the specified name in the specified list
- Throws:
UserAttributeException- if the integer value could not be retrieved for the user attribute
-
getLongValue
public static long getLongValue(List<UserAttribute> list, String name) throws UserAttributeException Returns the long value for the user attribute with the specified name in the specified list.- Parameters:
list- the user attributes to searchname- the name of the attribute- Returns:
- the long value for the user attribute with the specified name in the specified list
- Throws:
UserAttributeException- if the long value could not be retrieved for the user attribute
-
getStringValue
public static String getStringValue(List<UserAttribute> list, String name) throws UserAttributeException Returns the String value for the user attribute with the specified name in the specified list.- Parameters:
list- the user attributes to searchname- the name of the attribute- Returns:
- the String value for the user attribute with the specified name in the specified list
- Throws:
UserAttributeException- if the string value could not be retrieved for the user attribute
-
setBinaryValue
public static void setBinaryValue(List<UserAttribute> list, String name, africa.absa.inception.core.util.BinaryBuffer value) throws UserAttributeException Set the binary value for the user attribute with the specified name in the specified list.- Parameters:
list- the user attributes to searchname- the name of the attributevalue- the binary value for the user attribute- Throws:
UserAttributeException- if the binary value could not be set for the user attribute
-
setBinaryValue
public static void setBinaryValue(List<UserAttribute> list, String name, byte[] value) throws UserAttributeException Set the binary value for the user attribute with the specified name in the specified list.- Parameters:
list- the user attributes to searchname- the name of the attributevalue- the binary value for the user attribute- Throws:
UserAttributeException- if the binary value could not be set for the user attribute
-
setDecimalValue
public static void setDecimalValue(List<UserAttribute> list, String name, BigDecimal value) throws UserAttributeException Set the BigDecimal value for the user attribute with the specified name in the specified list.- Parameters:
list- the user attributes to searchname- the name of the attributevalue- the BigDecimal value for the user attribute- Throws:
UserAttributeException- if the decimal value could not be set for the user attribute
-
setDoubleValue
public static void setDoubleValue(List<UserAttribute> list, String name, double value) throws UserAttributeException Set the double value for the user attribute with the specified name in the specified list.- Parameters:
list- the user attributes to searchname- the name of the attributevalue- the double value for the user attribute- Throws:
UserAttributeException- if the double value could not be set for the user attribute
-
setIntegerValue
public static void setIntegerValue(List<UserAttribute> list, String name, int value) throws UserAttributeException Set the int value for the user attribute with the specified name in the specified list.- Parameters:
list- the user attributes to searchname- the name of the attributevalue- the int value for the user attribute- Throws:
UserAttributeException- if the integer value could not be set for the user attribute
-
setLongValue
public static void setLongValue(List<UserAttribute> list, String name, long value) throws UserAttributeException Set the long value for the user attribute with the specified name in the specified list.- Parameters:
list- the user attributes to searchname- the name of the attributevalue- the long value for the user attribute- Throws:
UserAttributeException- if the long value could not be set for the user attribute
-
setStringValue
public static void setStringValue(List<UserAttribute> list, String name, String value) throws UserAttributeException Set the String value for the user attribute with the specified name in the specified list.- Parameters:
list- the user attributes to searchname- the name of the attributevalue- the String value for the user attribute- Throws:
UserAttributeException- if the string value could not be set for the user attribute
-
getBinaryValue
Returns the binary value for the user attribute.- Returns:
- the binary value for the user attribute
- Throws:
UserAttributeException- if the binary value could not be retrieved for the user attribute
-
getDecimalValue
Returns the BigDecimal value for the user attribute.- Returns:
- the BigDecimal value for the user attribute
- Throws:
UserAttributeException- if the decimal value could not be retrieved for the user attribute
-
getDoubleValue
Returns the double value for the user attribute.- Returns:
- the double value for the user attribute
- Throws:
UserAttributeException- if the double value could not be retrieved for the user attribute
-
getIntegerValue
Returns the int value for the user attribute.- Returns:
- the int value for the user attribute
- Throws:
UserAttributeException- if the integer value could not be retrieved for the user attribute
-
getLongValue
Returns the long value for the user attribute.- Returns:
- the long value for the user attribute
- Throws:
UserAttributeException- if the long value could not be retrieved for the user attribute
-
getName
Returns the name of the user attribute.- Returns:
- the name of the user attribute
-
getStringValue
Returns the String value for the user attribute.- Returns:
- the String value for the user attribute
-
getValue
Returns the String value for the user attribute.- Returns:
- the String value for the user attribute
-
setBinaryValue
public void setBinaryValue(africa.absa.inception.core.util.BinaryBuffer value) Set the binary value for the user attribute.- Parameters:
value- the binary value for the user attribute
-
setBinaryValue
public void setBinaryValue(byte[] value) Set the binary value for the user attribute.- Parameters:
value- the binary value for the user attribute
-
setDecimalValue
Set the BigDecimal value for the user attribute.- Parameters:
value- the BigDecimal value for the user attribute
-
setDoubleValue
public void setDoubleValue(double value) Set the double value for the user attribute.- Parameters:
value- the double value for the user attribute
-
setIntegerValue
public void setIntegerValue(int value) Set the int value for the user attribute.- Parameters:
value- the int value for the user attribute
-
setLongValue
public void setLongValue(long value) Set the long value for the user attribute.- Parameters:
value- the long value for the user attribute
-
setName
Set the name of the user attribute.- Parameters:
name- the name of the user attribute
-
setStringValue
Set the String value for the user attribute.- Parameters:
value- the String value for the user attribute
-