Novell exteNd
Director 5.2 API

com.sssw.fw.usermgr.api
Interface EbiUserMeta

All Superinterfaces:
Cloneable, EbiElement, EbiFrameworkElement, Serializable

public interface EbiUserMeta
extends EbiFrameworkElement

This provides an interface for the User Extended MetaData object which contains user extended attribute metadata information.


Field Summary
static String EL_FW_USERMETA
          User Meta element type
static String USER_ATTR_META
          Key (FWELEMENTTYPE) for User Meta in PROFILEUSERMETA table.
 
Method Summary
 boolean addUserAttribute(String attrName, String attrDescr, boolean displayable)
          Adds a user attribute to the user meta.
 boolean addUserBlobAttribute(String attrName, String attrDescr)
          Adds a user blob attribute to the user meta.
 String getBlobFieldID(String attrname)
          Gets the field ID for a specified blob attribute.
 String[] getDisplayableUserAttributes()
          Gets the list of attributes to be displayable from the registration form
 String getSearchableFieldID(String attrname)
          Gets the searchable field ID for a specified attribute.
 String getUserAttributeDescription(String attrname)
          Gets the description for an attribute
 String[] getUserAttributes()
          Gets the list of user custom attributes defined in the user meta.
 String getUserBlobAttributeDescription(String attrname)
          Gets the description for an blob attribute
 String[] getUserBlobAttributes()
          Gets the list of user blob attributes defined in the user meta.
 boolean isBaseUserAttribute(String attrName)
          Checks if the specified attribute is a base attribute
 boolean isUserAttributeDisplayable(String attrname)
          Gets displayable flag for an attribute
 boolean isUserAttributeSingleValued(String attrname)
          Checks to see if an attribute is a single valued attribute.
 boolean isUserMetaDefined()
          Checks if the user meta is defined
 boolean isUserMetaUsed()
          Check if the userMeta is already used.
 void removeUserAttribute(String attrName)
          Removes an existing user attribute from the framework.
 void removeUserBlobAttribute(String attrName)
          Removes an existing user blob attribute from the user meta.
 void renameUserAttribute(String oldAttrName, String newAttrName)
          Renames a user attribute.
 void renameUserBlobAttribute(String oldAttrName, String newAttrName)
          Renames a user blob attribute.
 void setUserAttributeDescription(String attrName, String attrDescr)
          Sets the description of a specified attribute
 boolean setUserAttributeDisplayable(String attrName, boolean displayable)
          Sets the displayable flag.
 void setUserBlobAttributeDescription(String attrName, String attrDescr)
          Sets the description of a specified blob attribute
 void setUserMetaUsed()
          Sets a flag in the userMeta to tell that the user defined attributes are used in user info data.
 boolean validateUserAttribute(String attrName)
          Validates a specified attribute.
 boolean validateUserBlobAttribute(String attrName)
          Validates a specified blob attribute.
 
Methods implemented from interface com.sssw.fw.api.EbiFrameworkElement
getElementUUID, getLastModified, getLastModifiedBy, isEqualTo, isReadOnly, resetReadOnly, setLastModified, setLastModifiedBy, setReadOnly
 
Methods implemented from interface com.sssw.fw.api.EbiElement
getType
 

Field Detail

EL_FW_USERMETA

public static final String EL_FW_USERMETA
User Meta element type

USER_ATTR_META

public static final String USER_ATTR_META
Key (FWELEMENTTYPE) for User Meta in PROFILEUSERMETA table.
Method Detail

getUserAttributes

public String[] getUserAttributes()
Gets the list of user custom attributes defined in the user meta.
Returns:
a String array of attribute names.

validateUserAttribute

public boolean validateUserAttribute(String attrName)
Validates a specified attribute.
Parameters:
attrName - an attribute name
Returns:
true if the specified attribute name is defined in the user meta.

getDisplayableUserAttributes

public String[] getDisplayableUserAttributes()
Gets the list of attributes to be displayable from the registration form

isUserAttributeDisplayable

public boolean isUserAttributeDisplayable(String attrname)
Gets displayable flag for an attribute
Parameters:
attrname - an attribute name.
Returns:
true if the attribute is displayable.

isUserAttributeSingleValued

public boolean isUserAttributeSingleValued(String attrname)
Checks to see if an attribute is a single valued attribute.
Returns:
true if the atttribute is single valued.

getUserAttributeDescription

public String getUserAttributeDescription(String attrname)
Gets the description for an attribute
Parameters:
attrname - an attribute name.
Returns:
the description of an attribute.

isBaseUserAttribute

public boolean isBaseUserAttribute(String attrName)
Checks if the specified attribute is a base attribute
Parameters:
attrName - name of an attribute.

getSearchableFieldID

public String getSearchableFieldID(String attrname)
Gets the searchable field ID for a specified attribute.

Field ID is either a base user table column identifier or a UUID used in the extended user table to allow search on the specified attribute. In the base user table (PROFILEUSERS), there are five columns: KEY1, KEY2, KEY3, KEY4, and KEY5 that can be assigned to an attribute. The return of this method might be "FWUSERS.KEY1", etc. If more than 5 custom attributes are defined in the user meta, the extended user table (PROFILEUSERFIELDVALUES) is used. The field ID is a 32 byte universal unique indentifier assigned at the time the attribute is defined.

Parameters:
attrname - an attribute name
Returns:
searchable FieldID of the attribute.

addUserAttribute

public boolean addUserAttribute(String attrName,
                                String attrDescr,
                                boolean displayable)
Adds a user attribute to the user meta.

Design Tip: There are 5 columns in the base user table which provide fast performance. You should add the most frequently accessed attributes first.

Parameters:
attrName - the name of the newly specified attribute.
attrDescr - an description of the new attribute.
displayable - true if want user to enter data
Returns:
true if the attribute is added successfully, false otherwise

renameUserAttribute

public void renameUserAttribute(String oldAttrName,
                                String newAttrName)
Renames a user attribute.
Parameters:
oldAttrName - the name of the attribute to be modified.
newAttrName - the new attribute name

setUserAttributeDescription

public void setUserAttributeDescription(String attrName,
                                        String attrDescr)
Sets the description of a specified attribute
Parameters:
attrName - name of an attribute
attrDescr - the description of the specified attribute.

setUserAttributeDisplayable

public boolean setUserAttributeDisplayable(String attrName,
                                           boolean displayable)
Sets the displayable flag.
Parameters:
attrName - name of the specified attribute.
displayable - true if want to show in the registration form.

removeUserAttribute

public void removeUserAttribute(String attrName)
Removes an existing user attribute from the framework.
Parameters:
attrName - the name of an existing attribute.

getUserBlobAttributes

public String[] getUserBlobAttributes()
Gets the list of user blob attributes defined in the user meta.

Different from the user attributes, the user blob attributes can have unlimited size, but are not searchable.

Returns:
a String array of blob attribute names.

validateUserBlobAttribute

public boolean validateUserBlobAttribute(String attrName)
Validates a specified blob attribute.
Parameters:
attrName - an attribute name for a blob attribute.
Returns:
true if the specified blob attribute is defined in the user meta.

getBlobFieldID

public String getBlobFieldID(String attrname)
Gets the field ID for a specified blob attribute.
Parameters:
attrname - a blob attribute name
Returns:
the FieldID of the specified blob attribute.

getUserBlobAttributeDescription

public String getUserBlobAttributeDescription(String attrname)
Gets the description for an blob attribute
Parameters:
attrname - an attribute name of a blob attribute.
Returns:
the description of a blob attribute.

addUserBlobAttribute

public boolean addUserBlobAttribute(String attrName,
                                    String attrDescr)
Adds a user blob attribute to the user meta.
Parameters:
attrName - the name of the newly specified blob attribute.
attrDescr - an description of the new blob attribute.
Returns:
true if the blob attribute is added successfully, false otherwise

renameUserBlobAttribute

public void renameUserBlobAttribute(String oldAttrName,
                                    String newAttrName)
Renames a user blob attribute.
Parameters:
oldAttrName - the name of the blob attribute to be modified.
newAttrName - the new attribute name

setUserBlobAttributeDescription

public void setUserBlobAttributeDescription(String attrName,
                                            String attrDescr)
Sets the description of a specified blob attribute
Parameters:
attrName - name of a blob attribute
attrDescr - the description of the specified blob attribute.

removeUserBlobAttribute

public void removeUserBlobAttribute(String attrName)
Removes an existing user blob attribute from the user meta.
Parameters:
attrName - the name of an existing blob attribute.

isUserMetaDefined

public boolean isUserMetaDefined()
Checks if the user meta is defined
Returns:
true if the user meta is defined, false otherwise.

setUserMetaUsed

public void setUserMetaUsed()
Sets a flag in the userMeta to tell that the user defined attributes are used in user info data.

isUserMetaUsed

public boolean isUserMetaUsed()
Check if the userMeta is already used.

Novell exteNd
Director 5.2 API