Jive API (3.0.13) Core Javadocs

com.jivesoftware.community.user.profile
Class ProfileField

java.lang.Object
  extended by com.jivesoftware.community.user.profile.ProfileField
All Implemented Interfaces:
com.tangosol.io.ExternalizableLite, Serializable, Comparable

public class ProfileField
extends Object
implements com.tangosol.io.ExternalizableLite, Comparable

A profile field defines a single field of a user's profile, such as 'Phone Number' or 'Job Title'. It does not contain any user data related to the field. A profile field can be a variety of types (textfield, select list, etc) and collectively create a user's profile.

See Also:
represents one of the possible options of a profile field, contains user data for a specific profile field, Serialized Form

Nested Class Summary
static class ProfileField.Type
          A typesafe enum class for ProfileField types.
 
Field Summary
static int DESCRIPTION_ATTRIBUTE
           
static int DISPLAY_NAME_ATTRIBUTE
           
 
Constructor Summary
ProfileField()
           
 
Method Summary
 int compareTo(Object o)
           
 boolean equals(Object o)
           
 int getCachedSize()
          Returns the estimated cache size of this object by calculating the size of each field.
 String getDescription(String localeCode)
          Gets the description of this profile field for the specified locale
 String getDescriptionKey()
           
 String getDisplayName(String localeCode)
          Gets the display name of this profile field for the specified locale.
 String getDisplayNameKey()
           
 Map<String,String> getExternalMapping()
          Returns the external configuration data as a map of attribute name -> configuration string pairs.
 List<Map<String,String>> getExternalMappings()
          Returns the external configuration data as a map of attribute name -> configuration string pairs.
 String getExternalMappingString()
          Returns a string which contains external configuration data (such as an LDAP field name) which is used to pull the field value into the system.
 long getID()
          Gets the id representing this profile field.
 int getIndex()
          Gets the index of this profile field.
 String getName()
          Gets the internal name of this profile field.
 List<ProfileFieldOption> getOptions()
          Gets a list of ProfileFieldOption objects for this profile field.
 List<JiveI18nText> getProfileFieldText()
           
 int getRegistrationIndex()
           
 String getSingleExternalMapping()
          GetExternalMapping for 1:1 mappings.
 List<String> getSingleExternalMappings()
           
 ProfileField.Type getType()
          Returns the ProfileField.Type of this profile field.
 int getTypeID()
          Gets the id of the ProfileField.Type of this profile field.
 boolean hasExternalMapping()
          Does this field have any external mapping?
 int hashCode()
           
 boolean hasSingleExternalMapping()
          Does this field have a single mapping?
protected  void initKeys()
           
 boolean isDefaultField()
          Returns true if this field is a member of the set of default fields which are shown during setup and are not deletable.
 boolean isEditable()
          Gets whether or not this profile field is editable by the user.
 boolean isExternallyManaged()
          Returns true if this field is managed by some external system such as LDAP.
 boolean isFilterable()
          Gets whether or not this profile field is filterable.
 boolean isListValues()
          Returns true if the values of this field are lists rather than single items.
 boolean isRequired()
          Gets whether or not this profile field is a required field.
 boolean isSearchable()
          Gets whether or not this profile field is searchable.
 boolean isVisible()
          Gets whether or not this profile field is visible by the public.
 void readExternal(DataInput in)
           
 void setDefaultField(boolean defaultField)
          Sets whether this field is a member of the set of default fields which are shown during setup and are not deletable.
 void setDescription(String localeCode, String description)
          Sets the description of this profile field for the specified loale
 void setDisplayName(String localeCode, String displayName)
           
 void setEditable(boolean editable)
          Sets whether or not this profile field is editable by the user.
 void setExternallyManaged(boolean externallyManaged)
          Sets whether this field is managed by some external system such as LDAP.
 void setExternalMapping(Map<String,String> externalMapping)
          Sets the external configuration data as a map of attribute name -> configuration string pairs.
 void setExternalMappings(List<Map<String,String>> externalMappings)
          Sets the external configuration data as a map of attribute name -> configuration string pairs.
 void setExternalMappingString(String externalMapping)
          Sets a string which contains external configuration data (such as an LDAP field name) which is used to pull the field value into the system.
 void setFilterable(boolean filterable)
          Sets whether or not this profile field is filterable.
 void setID(long ID)
          Sets the id representing this profile field.
 void setIndex(int index)
          Sets the index of this profile field.
 void setListValues(boolean listValues)
          Sets whether the values of this field are lists rather than single items.
 void setName(String name)
           
 void setOptions(List<ProfileFieldOption> options)
          Sets a list of ProfileFieldOption objects for this profile field.
 void setProfileFieldText(List<JiveI18nText> textList)
           
 ProfileField setRegistrationIndex(int index)
           
 void setRequired(boolean required)
          Sets whether or not this profile field is a required field.
 void setSearchable(boolean searchable)
          Sets whether or not this profile field is searchable.
 void setSingleExternalMapping(String value)
          SetExternalMapping for 1:1 mappings.
 void setSingleExternalMappings(List<String> values)
          SetExternalMapping for lists of 1:1 mappings.
 void setTypeID(int typeID)
          Sets the id of the ProfileField.Type of this profile field.
 void setVisible(boolean visible)
          Sets whether or not this profile field is visible by the public.
 String toString()
          Returns a String representation of the ProfileField object using the field name.
 void writeExternal(DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DISPLAY_NAME_ATTRIBUTE

public static final int DISPLAY_NAME_ATTRIBUTE
See Also:
Constant Field Values

DESCRIPTION_ATTRIBUTE

public static final int DESCRIPTION_ATTRIBUTE
See Also:
Constant Field Values
Constructor Detail

ProfileField

public ProfileField()
Method Detail

getID

public long getID()
Gets the id representing this profile field.

Returns:
the id representing this profile field.

setID

public void setID(long ID)
Sets the id representing this profile field.

Parameters:
ID - the id representing this profile field.

getProfileFieldText

public List<JiveI18nText> getProfileFieldText()

setProfileFieldText

public void setProfileFieldText(List<JiveI18nText> textList)

getName

public String getName()
Gets the internal name of this profile field. The internal name is unique and generally used for internal actions.

Returns:
the display name of this profile field

setName

public void setName(String name)

getDisplayName

public String getDisplayName(String localeCode)
Gets the display name of this profile field for the specified locale.

Parameters:
localeCode - locale code indicating the locale of the name
Returns:
the display name of this profile field for the specific locale

setDisplayName

public void setDisplayName(String localeCode,
                           String displayName)

getDescription

public String getDescription(String localeCode)
Gets the description of this profile field for the specified locale

Parameters:
localeCode - locale code indicating the locale of the description
Returns:
the description of this profile field

setDescription

public void setDescription(String localeCode,
                           String description)
Sets the description of this profile field for the specified loale

Parameters:
localeCode - locale code indicating the locale of the description
description - the description of this profile field

isRequired

public boolean isRequired()
Gets whether or not this profile field is a required field.

Returns:
true if this field is required, false otherwise.

setRequired

public void setRequired(boolean required)
Sets whether or not this profile field is a required field.

Parameters:
required - true if this field is required, false otherwise.

isFilterable

public boolean isFilterable()
Gets whether or not this profile field is filterable.

Returns:
true if this field is filterable, false otherwise.

setFilterable

public void setFilterable(boolean filterable)
Sets whether or not this profile field is filterable.

Parameters:
filterable - true if this field is filterable, false otherwise.

isSearchable

public boolean isSearchable()
Gets whether or not this profile field is searchable.

Returns:
true if this field is searchable, false otherwise.

setSearchable

public void setSearchable(boolean searchable)
Sets whether or not this profile field is searchable.

Parameters:
searchable - true if this field is searchable, false otherwise.

isVisible

public boolean isVisible()
Gets whether or not this profile field is visible by the public.

Returns:
true if this field is visible by the public, false otherwise.

setVisible

public void setVisible(boolean visible)
Sets whether or not this profile field is visible by the public.

Parameters:
visible - true if this field is visible by the public, false otherwise.

isEditable

public boolean isEditable()
Gets whether or not this profile field is editable by the user.

Returns:
true if this field is editable by the user, false otherwise.

setEditable

public void setEditable(boolean editable)
Sets whether or not this profile field is editable by the user.

Parameters:
editable - true if this field is editable by the user, false otherwise.

getTypeID

public int getTypeID()
Gets the id of the ProfileField.Type of this profile field. The Type object can be retreived by calling getType().

Returns:
the id of the ProfileField.Type of this profile field.

setTypeID

public void setTypeID(int typeID)
Sets the id of the ProfileField.Type of this profile field.

Parameters:
typeID - the id of the ProfileField.Type of this profile field.

getType

public ProfileField.Type getType()
Returns the ProfileField.Type of this profile field.

Returns:
the ProfileField.Type of this profile field.

getOptions

public List<ProfileFieldOption> getOptions()
Gets a list of ProfileFieldOption objects for this profile field.

Returns:
a list of ProfileFieldOption objects for this profile field.

setOptions

public void setOptions(List<ProfileFieldOption> options)
Sets a list of ProfileFieldOption objects for this profile field.

Parameters:
options - a list of ProfileFieldOption objects for this profile field.

getIndex

public int getIndex()
Gets the index of this profile field. The index specifies the order in which the profile fields will be displayed.

Returns:
the index of this profile field

setIndex

public void setIndex(int index)
Sets the index of this profile field. The index specifies the order in which the profile fields will be displayed.

Parameters:
index - the index of this profile field

setRegistrationIndex

public ProfileField setRegistrationIndex(int index)

getRegistrationIndex

public int getRegistrationIndex()

getExternalMappingString

public String getExternalMappingString()
Returns a string which contains external configuration data (such as an LDAP field name) which is used to pull the field value into the system. This property is used in conjunction with externally managed fields and is unused unless isExternallyManaged() returns true;

Returns:
a string which contains external configuration data (such as an LDAP field name)

getExternalMapping

public Map<String,String> getExternalMapping()
Returns the external configuration data as a map of attribute name -> configuration string pairs.

Returns:
the external configuration data as a map of attribute name -> configuration string pairs.

getExternalMappings

public List<Map<String,String>> getExternalMappings()
Returns the external configuration data as a map of attribute name -> configuration string pairs.

Returns:
the external configuration data as a map of attribute name -> configuration string pairs.

setExternalMappingString

public void setExternalMappingString(String externalMapping)
Sets a string which contains external configuration data (such as an LDAP field name) which is used to pull the field value into the system.

Parameters:
externalMapping - a string which contains external configuration data (such as an LDAP field name)

setExternalMapping

public void setExternalMapping(Map<String,String> externalMapping)
Sets the external configuration data as a map of attribute name -> configuration string pairs.

Parameters:
externalMapping - the external configuration data as a map of attribute name -> configuration string pairs.

setExternalMappings

public void setExternalMappings(List<Map<String,String>> externalMappings)
Sets the external configuration data as a map of attribute name -> configuration string pairs.

Parameters:
externalMappings - the external configuration data as a list of maps of attribute name -> configuration string pairs.

setSingleExternalMapping

public void setSingleExternalMapping(String value)
SetExternalMapping for 1:1 mappings.

Parameters:
value - the single mapping string

setSingleExternalMappings

public void setSingleExternalMappings(List<String> values)
SetExternalMapping for lists of 1:1 mappings.

Parameters:
values - a list of mapping strings

getSingleExternalMapping

public String getSingleExternalMapping()
GetExternalMapping for 1:1 mappings.

Returns:
GetExternalMapping for 1:1 mappings

getSingleExternalMappings

public List<String> getSingleExternalMappings()

hasExternalMapping

public boolean hasExternalMapping()
Does this field have any external mapping?

Returns:
true if this field has an external mapping

hasSingleExternalMapping

public boolean hasSingleExternalMapping()
Does this field have a single mapping?

Returns:
true if this field has a single mapping

isDefaultField

public boolean isDefaultField()
Returns true if this field is a member of the set of default fields which are shown during setup and are not deletable. They may still be hidden and may be unused in a given installation.

Returns:
true if this field is a member of the set of default fields which are shown during setup and are not deletable.

setDefaultField

public void setDefaultField(boolean defaultField)
Sets whether this field is a member of the set of default fields which are shown during setup and are not deletable. They may still be hidden and may be unused in a given installation.

Parameters:
defaultField - true if this field is a member of the set of default fields which are shown during setup and are not deletable.

isExternallyManaged

public boolean isExternallyManaged()
Returns true if this field is managed by some external system such as LDAP. If this method returns true, isEditable() will return false regardless of what is passed to setEditable(boolean).

Returns:
true if this field is managed by some external system such as LDAP.

setExternallyManaged

public void setExternallyManaged(boolean externallyManaged)
Sets whether this field is managed by some external system such as LDAP. If this method returns true, isEditable() will return false regardless of what is passed to setEditable(boolean).

Parameters:
externallyManaged - true if this field is managed by some external system such as LDAP.

isListValues

public boolean isListValues()
Returns true if the values of this field are lists rather than single items.

Returns:
true if the values of this field are lists rather than single items.

setListValues

public void setListValues(boolean listValues)
Sets whether the values of this field are lists rather than single items.

Parameters:
listValues - whether the values of this field are lists rather than single items.

getCachedSize

public int getCachedSize()
Returns the estimated cache size of this object by calculating the size of each field.

Returns:
the estimated cache size of this object by calculating the size of each field.

readExternal

public void readExternal(DataInput in)
                  throws IOException
Specified by:
readExternal in interface com.tangosol.io.ExternalizableLite
Throws:
IOException

writeExternal

public void writeExternal(DataOutput out)
                   throws IOException
Specified by:
writeExternal in interface com.tangosol.io.ExternalizableLite
Throws:
IOException

toString

public String toString()
Returns a String representation of the ProfileField object using the field name.

Overrides:
toString in class Object
Returns:
a String representation of the ProfileField object.

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable

getDisplayNameKey

public String getDisplayNameKey()

getDescriptionKey

public String getDescriptionKey()

initKeys

protected void initKeys()

Jive Product Page

Copyright © 1999-2007 Jive Software.