Class Attribute
java.lang.Object
com.appiancorp.suiteapi.personalization.Attribute
- All Implemented Interfaces:
Serializable
This represents the Attribute object. ALL FIELDS are required.
The default attribute types supported are:
TYPE_BOOLEAN, TYPE_STRING, TYPE_INTEGER, TYPE_FLOAT, TYPE_DATE, TYPE_USER, TYPE_GROUP
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic AttributefindAttributeByName(Attribute[] attributes, String name) Finds an attribute in a list of attributes, searching by namestatic intfindAttributeIndexByName(Attribute[] attributes, String name) Finds the index of an attribute in a list of attributes, searching by namestatic LonggetAppianTypeFromAttributeType(Integer attributeType) static IntegergetAttributeTypeFromAppianType(Long appianType) getName()The attribute name (unique per group type, serves as the attribute handle).getType()Can be any one of the TYPE_XXX constants on this class.Returns the name of this Attribute's type.getValue()Returns the attribute value.inthashCode()voidSets the name.voidSets the type.voidSets the value.toString()
-
Field Details
-
TYPE_BOOLEAN
public static final int TYPE_BOOLEAN- See Also:
-
TYPE_STRING
public static final int TYPE_STRING- See Also:
-
TYPE_INTEGER
public static final int TYPE_INTEGER- See Also:
-
TYPE_FLOAT
public static final int TYPE_FLOAT- See Also:
-
TYPE_DATE
public static final int TYPE_DATE- See Also:
-
TYPE_USER
public static final int TYPE_USER- See Also:
-
TYPE_GROUP
public static final int TYPE_GROUP- See Also:
-
-
Constructor Details
-
Attribute
public Attribute() -
Attribute
-
Attribute
-
-
Method Details
-
getName
The attribute name (unique per group type, serves as the attribute handle).- Returns:
- String
-
setName
Sets the name.- Parameters:
name- The name to set
-
getType
Can be any one of the TYPE_XXX constants on this class.- Returns:
- Integer
-
setType
Sets the type.- Parameters:
type- The type to set
-
getValue
Returns the attribute value. -
setValue
Sets the value.- Parameters:
value- The value to set
-
equals
-
hashCode
public int hashCode() -
getAppianTypeFromAttributeType
-
getAttributeTypeFromAppianType
-
getTypeName
Returns the name of this Attribute's type. The name is just a String that can be displayed to the end-user instead of a raw integer; the name has no special meaning (it's not a key) and can change in the future. -
toString
-
findAttributeIndexByName
Finds the index of an attribute in a list of attributes, searching by name- Parameters:
attributes- the list of attributes to search inname- the name of the attribute to search for- Returns:
- the index of the attribute if found, -1 if not found
-
findAttributeByName
Finds an attribute in a list of attributes, searching by name- Parameters:
attributes- the list of attributes to search inname- the name of the attribute to search for- Returns:
- the attribute if found, null if not found
-