BEA Systems, Inc.

com.beasys.commerce.user.jsp.beans
Class PropertyBean

java.lang.Object
  |
  +--com.beasys.commerce.user.jsp.beans.PropertyBean

public class PropertyBean
extends java.lang.Object
implements UserManagementConstants, com.beasys.commerce.user.jsp.UserManagementJspPages, JspConstants

Jsp bean class to help with Property management tools


Field Summary
static java.lang.String MULTIPLE_VALUE
           
static java.lang.String RESTRICTED
           
static java.lang.String SINGLE_VALUE
           
static java.lang.String UNRESTRICTED
           
 
Fields inherited from interface com.beasys.commerce.axiom.contact.UserManagementConstants
ANONYMOUS_PROFILE, CACHED_PROFILE, CONTENT_TYPE, DEFAULT_SCOPE, DEFAULT_SUCCESSOR, DEFAULT_SUCCESSOR_HOME, DEFAULT_SUCCESSOR_JNDI, DEFAULT_SUCCESSOR_PK, DEFAULT_USER, DEFAULT_USER_HOME, DEFAULT_USER_JNDI, DEFAULT_USER_PK, GROUP, GROUP_ENTITY_HOME, PROFILE_MGR, PROFILE_SUCCESSOR, PROFILE_USER, REALM_CONFIG, REQUEST_TYPE, RESERVED_SCOPE, SCHEMA, SESSION_TYPE, USER, USER_ENTITY_HOME, USER_MGR, USER_MGR_PROPERTIES, USER_TYPE
 
Fields inherited from interface com.beasys.commerce.user.jsp.UserManagementJspPages
BOOLEAN_PROPERTY_EDITOR, CREATE_PROFILE_TYPE_JSP, CREATE_PROPERTY_JSP, CREATE_PROPSET_JSP, DATE_PROPERTY_EDITOR, DELETE_PROPERTY_JSP, EDIT_PROFILE_TYPE_JSP, EDIT_PROPERTY_DESC_JSP, EDIT_PROPSET_DESCRIPTION_JSP, GROUP_ADD_REMOVE_USERS_JSP, GROUP_CREATE_JSP, GROUP_EDIT_JSP, GROUP_LIST_JSP, GROUP_SCOPE_PROPERTY_JSP, GROUP_SEARCH_JSP, LDAP_ADD_GROUP_ATTRIBUTE_JSP, LDAP_ADD_USER_ATTRIBUTE_JSP, LDAP_CONFIG_JSP, LIST_PROFILE_TYPE_JSP, NUMBER_PROPERTY_EDITOR, PROPERTY_TOOLS_DIRECTORY, PROPSET_JSP, REALM_CONFIG_GROUP_JSP, REALM_CONFIG_JSP, REALM_CONFIG_USER_JSP, REALM_MAP_GROUP_JSP, SEARCH_SCOPE_JSP, STRING_PROPERTY_EDITOR, UM_TOOLS_BASE_DIR, UM_TOOLS_HOME_JSP, USER_CREATE_JSP, USER_EDIT_INFO_JSP, USER_EDIT_PROP1_JSP, USER_EDIT_PROP2_JSP, USER_EDIT_PROP3_JSP, USER_SCOPE_PROPERTY_JSP, USER_SEARCH_JSP, VIEW_PROPERTY_JSP, VIEW_PROPSET_JSP
 
Fields inherited from interface com.beasys.commerce.axiom.jsp.JspConstants
DATE_FORMAT, DEFAULT_DESTINATION, DEFAULT_SUCCESSOR, DESTINATION_URI, IMMUTABLE_SERVICEMANAGER_HOME_PAGE, JSP_CALENDAR_FEATURES, JSP_PORTALS_BASE_DIRECTORY, JSP_TOOLS_ADMIN_HOME, JSP_TOOLS_BASE_DIRECTORY, JSP_TOOLS_DOC_RTR, JSP_TOOLS_GUIDE_FEATURES, JSP_TOOLS_PROPERTYMGMT_ADMIN_HOME, JSP_TOOLS_USERMGMT_ADMIN_HOME, JSP_TOOLS_UTIL_DIRECTORY, P13N_CACHED_REQUEST, P13N_CACHED_SESSION, REPOSITORY_DIR, SERVICEMANAGER_COOKIE_TIMEOUT, SERVICEMANAGER_CURRENT_PAGE, SERVICEMANAGER_HOME_PAGE, SERVICEMANAGER_LOGGED_IN, SERVICEMANAGER_SESSION_TIMEOUT, SERVICEMANAGER_SUCCESSOR, SERVICEMANAGER_USER, TRAFFIC_URI, TRANSACTION_SERVICE, TRANSACTION_TIMEOUT, WORKING_DIR, WORKING_DIR_FILES
 
Fields inherited from interface com.beasys.commerce.axiom.jsp.JspConstants
DATE_FORMAT, DEFAULT_DESTINATION, DEFAULT_SUCCESSOR, DESTINATION_URI, IMMUTABLE_SERVICEMANAGER_HOME_PAGE, JSP_CALENDAR_FEATURES, JSP_PORTALS_BASE_DIRECTORY, JSP_TOOLS_ADMIN_HOME, JSP_TOOLS_BASE_DIRECTORY, JSP_TOOLS_DOC_RTR, JSP_TOOLS_GUIDE_FEATURES, JSP_TOOLS_PROPERTYMGMT_ADMIN_HOME, JSP_TOOLS_USERMGMT_ADMIN_HOME, JSP_TOOLS_UTIL_DIRECTORY, P13N_CACHED_REQUEST, P13N_CACHED_SESSION, REPOSITORY_DIR, SERVICEMANAGER_COOKIE_TIMEOUT, SERVICEMANAGER_CURRENT_PAGE, SERVICEMANAGER_HOME_PAGE, SERVICEMANAGER_LOGGED_IN, SERVICEMANAGER_SESSION_TIMEOUT, SERVICEMANAGER_SUCCESSOR, SERVICEMANAGER_USER, TRAFFIC_URI, TRANSACTION_SERVICE, TRANSACTION_TIMEOUT, WORKING_DIR, WORKING_DIR_FILES
 
Constructor Summary
PropertyBean()
           
 
Method Summary
 java.lang.String addDefaultValue()
          Adds the value in defaultValue to the list of default values for the property if it is multi-valued; otherwise returns an error message
 java.lang.String addRestrictedValue()
          Adds the value in newValue to the list of restricted values in the property
 boolean canAddValues(PropertyMetaData property)
           
 boolean canRemoveValues(PropertyMetaData property)
           
 java.lang.String createProperty()
          Creates a property with the local attributes, and adds it to the schema.
 java.lang.Object createTypedValue(PropertyMetaData property, java.lang.String value)
           
 java.lang.String deleteProperty()
          Deletes the property named by propertyName from the current scope
 java.lang.String formatPropertyValue(PropertyMetaData property, java.lang.Object value)
          Tries to format a given value based on the type of the property.
 java.util.Collection getAsCollection(java.lang.Object o)
           
 java.lang.Object getAsObject(java.lang.String currentValue)
          Takes in an string and converts it to object.
 java.lang.String getCategory()
           
 java.lang.String getCategoryForDisplay(PropertyMetaData property)
           
 java.util.Collection getCurrentPropertyValue()
           
 PropertyMetaData getDefaultPropertyMetaDataForGroup(java.lang.String groupname)
          Return a synthesized PropertyMetaData object for a value from the default scope based on its object type
 PropertyMetaData getDefaultPropertyMetaDataForUser(java.lang.String username)
          Return a synthesized PropertyMetaData object for a value from the default scope based on its object type
 java.lang.String getDefaultValue()
           
 java.lang.String getGroupUserPropertyEditor(PropertyMetaData property)
           
 java.lang.String getGroupUserPropertyRenderer(PropertyMetaData property)
           
 java.lang.String getNewValue()
           
 java.lang.String getOption()
           
 java.lang.String getPropertyDescription()
           
 java.lang.String getPropertyEditor(PropertyMetaData property)
           
 java.lang.String getPropertyName()
           
 java.lang.String[] getPropertyNames()
           
 PropertyMetaData getPropertyObject()
          Returns the PropertyMetaData referenced by the local propertyName and scopeName attributes.
 java.lang.String getPropertyRenderer(PropertyMetaData property)
          Returns the name of the JSP used to render information about the property associated with the provided PropertyMetaData
 java.lang.String[][] getPropertyTypes()
           
 java.lang.String getPropertyValueEditor(PropertyMetaData property)
          Returns the name of the page used to edit the property associated with the provided PropertyMetaData
 java.lang.String getRemoveValue()
           
 java.lang.String getSchemaGroupName()
           
 java.lang.String getScopeName()
           
 java.lang.String getSelectionOptionForDisplay(PropertyMetaData property)
           
 java.lang.String getType()
           
 java.lang.String getTypeForDisplay(PropertyMetaData property)
           
 boolean isBlank(java.lang.String input)
           
 java.lang.String removeDefaultValue()
          Removes the value in defaultValue from the list of default values for the property if it is multi-valued.
 java.lang.String removeRestrictedValue()
          Removes the value in removeValue from the list of restricted values in the property
 void setCategory(java.lang.String s)
           
 void setCurrentPropertyValue(java.util.Collection cpv)
           
 void setDefaultValue(java.lang.String s)
           
 void setNewValue(java.lang.String s)
           
 void setOption(java.lang.String s)
           
 void setPropertyDescription(java.lang.String s)
           
 void setPropertyMetaData(PropertyMetaData pmd)
          Sets the PropertyMetaData for the bean.
 void setPropertyName(java.lang.String s)
           
 void setRemoveValue(java.lang.String s)
           
 void setSchemaGroupName(java.lang.String s)
           
 void setScopeName(java.lang.String s)
           
 void setType(java.lang.String s)
           
 java.lang.String updatePropertyDefault(javax.servlet.http.HttpServletRequest request)
          Sets the default value(s) for a PropertyMetaData object.
 java.lang.String updatePropertyDescription()
          Updates the description of the property referenced by the local attributes
 java.lang.String updateSinglePropertyDefault(java.lang.String theValue)
          Sets the default value(s) for a PropertyMetaData object.
 java.lang.String validate()
          Validates the entered property meta data -- type, restriction, multiple/single value.
 java.lang.String validateDescription()
          Validates the entered property description.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SINGLE_VALUE

public static final java.lang.String SINGLE_VALUE

MULTIPLE_VALUE

public static final java.lang.String MULTIPLE_VALUE

RESTRICTED

public static final java.lang.String RESTRICTED

UNRESTRICTED

public static final java.lang.String UNRESTRICTED
Constructor Detail

PropertyBean

public PropertyBean()
Method Detail

setCurrentPropertyValue

public void setCurrentPropertyValue(java.util.Collection cpv)

getCurrentPropertyValue

public java.util.Collection getCurrentPropertyValue()

validate

public java.lang.String validate()
Validates the entered property meta data -- type, restriction, multiple/single value.

validateDescription

public java.lang.String validateDescription()
Validates the entered property description.
Returns:
error message : null if no error

createProperty

public java.lang.String createProperty()
Creates a property with the local attributes, and adds it to the schema.
Returns:
error message if any : null if no error

deleteProperty

public java.lang.String deleteProperty()
Deletes the property named by propertyName from the current scope
Returns:
an error message : null if no error

getAsObject

public java.lang.Object getAsObject(java.lang.String currentValue)
Takes in an string and converts it to object. The object is used to set the property using um:setProperty tag. Returns a null in case of an error

setPropertyMetaData

public void setPropertyMetaData(PropertyMetaData pmd)
Sets the PropertyMetaData for the bean.
Parameters:
pmd - the new PropertyMetaData

getPropertyObject

public PropertyMetaData getPropertyObject()
Returns the PropertyMetaData referenced by the local propertyName and scopeName attributes.
Returns:
the PropertyMetaData referenced by the local propertyName and scopeName attributes : null if an error is encountered

getDefaultPropertyMetaDataForGroup

public PropertyMetaData getDefaultPropertyMetaDataForGroup(java.lang.String groupname)
Return a synthesized PropertyMetaData object for a value from the default scope based on its object type

getDefaultPropertyMetaDataForUser

public PropertyMetaData getDefaultPropertyMetaDataForUser(java.lang.String username)
Return a synthesized PropertyMetaData object for a value from the default scope based on its object type

updatePropertyDescription

public java.lang.String updatePropertyDescription()
Updates the description of the property referenced by the local attributes
Returns:
error message : null if no error

updatePropertyDefault

public java.lang.String updatePropertyDefault(javax.servlet.http.HttpServletRequest request)
Sets the default value(s) for a PropertyMetaData object. Looks up the schema and PropertyMetaData based on this bean's attributes; if the property is mutli-valued it assumes the defaultValue attribute is a comma-delimited list of values and sets the default value to a collection containing those values.
Returns:
error message : null if no error

updateSinglePropertyDefault

public java.lang.String updateSinglePropertyDefault(java.lang.String theValue)
Sets the default value(s) for a PropertyMetaData object. Looks up the schema and PropertyMetaData based on this bean's attributes; Only intended for single valued properties.
Returns:
null if everything was ok, an error message otherwise

addDefaultValue

public java.lang.String addDefaultValue()
Adds the value in defaultValue to the list of default values for the property if it is multi-valued; otherwise returns an error message

removeDefaultValue

public java.lang.String removeDefaultValue()
Removes the value in defaultValue from the list of default values for the property if it is multi-valued.
Returns:
error message: null if no error

addRestrictedValue

public java.lang.String addRestrictedValue()
Adds the value in newValue to the list of restricted values in the property
Returns:
error message : null if no error

removeRestrictedValue

public java.lang.String removeRestrictedValue()
Removes the value in removeValue from the list of restricted values in the property
Returns:
error message : null if no error

formatPropertyValue

public java.lang.String formatPropertyValue(PropertyMetaData property,
                                            java.lang.Object value)
Tries to format a given value based on the type of the property. If the value is already a string, it will be cast as a String and returned without checking the type of the given property.
Parameters:
property - used to determine how to format the object
value - the object to format
Returns:
the formatted value

getPropertyValueEditor

public java.lang.String getPropertyValueEditor(PropertyMetaData property)
Returns the name of the page used to edit the property associated with the provided PropertyMetaData
Returns:
the name of the page to use to edit this property's datatype

getPropertyRenderer

public java.lang.String getPropertyRenderer(PropertyMetaData property)
Returns the name of the JSP used to render information about the property associated with the provided PropertyMetaData
Returns:
the JSP used render information about the given property

getGroupUserPropertyRenderer

public java.lang.String getGroupUserPropertyRenderer(PropertyMetaData property)
Returns:
the jsp to include to render infomration about the given property for a particular group or a user

getPropertyEditor

public java.lang.String getPropertyEditor(PropertyMetaData property)

getGroupUserPropertyEditor

public java.lang.String getGroupUserPropertyEditor(PropertyMetaData property)

getPropertyNames

public java.lang.String[] getPropertyNames()
Returns:
an array of properties from the current scope

getPropertyTypes

public java.lang.String[][] getPropertyTypes()

getTypeForDisplay

public java.lang.String getTypeForDisplay(PropertyMetaData property)

getSelectionOptionForDisplay

public java.lang.String getSelectionOptionForDisplay(PropertyMetaData property)

getCategoryForDisplay

public java.lang.String getCategoryForDisplay(PropertyMetaData property)

canAddValues

public boolean canAddValues(PropertyMetaData property)

canRemoveValues

public boolean canRemoveValues(PropertyMetaData property)

getAsCollection

public java.util.Collection getAsCollection(java.lang.Object o)

createTypedValue

public java.lang.Object createTypedValue(PropertyMetaData property,
                                         java.lang.String value)

isBlank

public boolean isBlank(java.lang.String input)
Returns:
true if the string is null, empty, or consists only of spaces

setPropertyName

public void setPropertyName(java.lang.String s)

getPropertyName

public java.lang.String getPropertyName()

setScopeName

public void setScopeName(java.lang.String s)

getScopeName

public java.lang.String getScopeName()

setPropertyDescription

public void setPropertyDescription(java.lang.String s)

getPropertyDescription

public java.lang.String getPropertyDescription()

setType

public void setType(java.lang.String s)

getType

public java.lang.String getType()

setOption

public void setOption(java.lang.String s)

getOption

public java.lang.String getOption()

setCategory

public void setCategory(java.lang.String s)

getCategory

public java.lang.String getCategory()

setDefaultValue

public void setDefaultValue(java.lang.String s)

getDefaultValue

public java.lang.String getDefaultValue()

setNewValue

public void setNewValue(java.lang.String s)

getNewValue

public java.lang.String getNewValue()

setRemoveValue

public void setRemoveValue(java.lang.String s)

getRemoveValue

public java.lang.String getRemoveValue()

setSchemaGroupName

public void setSchemaGroupName(java.lang.String s)

getSchemaGroupName

public java.lang.String getSchemaGroupName()

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved