DATE_FORMAT, DEFAULT_DESTINATION, DEFAULT_SUCCESSOR, DESTINATION_URI, IMMUTABLE_SERVICEMANAGER_HOME_PAGE, JSP_CALENDAR_FEATURES, JSP_COMMERCE_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_OVERRIDE_BOOK, SERVICEMANAGER_SESSION_TIMEOUT, SERVICEMANAGER_SUCCESSOR, SERVICEMANAGER_USER, SERVLET_CONFIG, TRAFFIC_URI, TRANSACTION_SERVICE, TRANSACTION_TIMEOUT, USER_TRANS_TIMEOUT,
|
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 Property Set. |
java.lang.Object |
createTypedValue(PropertyMetaData property,
java.lang.String value)
Create an object of the type defined in the given PropertyMetaData
object with the value given in the string. |
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)
Convenience method to make a Collection out of any Object. |
java.lang.Object |
getAsObject(java.lang.String currentValue)
Takes in a string and converts it to object based on the property type
in the current propertyMetaData. |
java.lang.String |
getCategory()
Get whether this property is restricted |
java.lang.String |
getCategoryForDisplay(PropertyMetaData property)
|
java.util.Collection |
getCurrentPropertyValue()
Get the current property value object - for multiple/unrestricted pages |
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()
Get a default value, or list of values |
PropertyMetaData |
getDynamicPropertyMetaDataForGroup(java.lang.String groupname)
Return a synthesized PropertyMetaData object for a value from the default
scope based on its object type |
PropertyMetaData |
getDynamicPropertyMetaDataForUser(java.lang.String username)
Return a synthesized PropertyMetaData object for a value from a dynamic
property based on its object type |
java.lang.String |
getGroupUserPropertyEditor(PropertyMetaData property)
|
java.lang.String |
getGroupUserPropertyRenderer(PropertyMetaData property)
|
java.lang.String |
getNewValue()
Get a new value for a restricted property |
java.lang.String |
getOption()
Get whether this property is single or multi valued |
java.lang.String |
getPropertyDescription()
Get the description of the property |
java.lang.String |
getPropertyEditor(PropertyMetaData property)
|
java.lang.String |
getPropertyName()
Get the name of the Property itself |
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()
Return an array of property type constants and their names, as
defined in com.beasys.commerce.util.TypesHelper |
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()
Get a value to remove from a restricted property |
java.lang.String |
getSchemaGroupName()
Get the name of the schema group |
java.lang.String |
getScopeName()
Get the name of the PropertySet |
java.lang.String |
getSelectionOptionForDisplay(PropertyMetaData property)
|
java.lang.String |
getType()
Get the property's datatype, as defined in com.beasys.commerce.util.TypesHelper |
protected int |
getTypeAsInt()
Parses the given propertyType string into an int |
java.lang.String |
getTypeForDisplay(PropertyMetaData property)
Get the name of the type of this 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)
Set whether this property is restricted. |
void |
setCurrentPropertyValue(java.util.Collection cpv)
Set the current property value object - for multiple/unrestricted pages |
void |
setDefaultValue(java.lang.String s)
Set a default value, or list of values |
void |
setNewValue(java.lang.String s)
Set a new value for a restricted property |
void |
setOption(java.lang.String s)
Set whether this property is single or multi valued. |
void |
setPropertyDescription(java.lang.String s)
Set the description of the property |
void |
setPropertyMetaData(PropertyMetaData pmd)
Sets the PropertyMetaData for the bean. |
void |
setPropertyName(java.lang.String s)
Set the name of the Property itself |
void |
setRemoveValue(java.lang.String s)
Set a value to remove from a restricted property |
void |
setSchemaGroupName(java.lang.String s)
Set the name of the schema group |
void |
setScopeName(java.lang.String s)
Set the name of the PropertySet |
void |
setType(java.lang.String s)
Set the property's datatype, as defined in com.beasys.commerce.util.TypesHelper |
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 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
PropertyBean
public PropertyBean()
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
getTypeAsInt
protected int getTypeAsInt()
- Parses the given propertyType string into an int
createProperty
public java.lang.String createProperty()
- Creates a property with the local attributes, and adds
it to the Property Set. If a boolean property is created,
this will automatically create true and false restricted values.
- 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 a string and converts it to object based on the property type
in the current propertyMetaData.
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
getDynamicPropertyMetaDataForGroup
public PropertyMetaData getDynamicPropertyMetaDataForGroup(java.lang.String groupname)
- Return a synthesized PropertyMetaData object for a value from the default
scope based on its object type
getDynamicPropertyMetaDataForUser
public PropertyMetaData getDynamicPropertyMetaDataForUser(java.lang.String username)
- Return a synthesized PropertyMetaData object for a value from a dynamic
property 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 uses any request parameter
starting with the string "defaultValue" 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. A null value will return an
empty string.
- Parameters:
property - used to determine how to format the objectvalue - 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)
- Returns:
- the name of the JSP to include to edit a property definition
getGroupUserPropertyEditor
public java.lang.String getGroupUserPropertyEditor(PropertyMetaData property)
- Returns:
- the name of the JSP to include to edit a property value
getPropertyNames
public java.lang.String[] getPropertyNames()
- Returns:
- an array of properties from the current scope
getPropertyTypes
public java.lang.String[][] getPropertyTypes()
- Return an array of property type constants and their names, as
defined in com.beasys.commerce.util.TypesHelper
getTypeForDisplay
public java.lang.String getTypeForDisplay(PropertyMetaData property)
- Get the name of the type of this property.
getSelectionOptionForDisplay
public java.lang.String getSelectionOptionForDisplay(PropertyMetaData property)
- Returns:
- a description of the property's selection option (Single or Multiple)
getCategoryForDisplay
public java.lang.String getCategoryForDisplay(PropertyMetaData property)
- Returns:
- a description of the property's category (Restricted or Unrestricted)
canAddValues
public boolean canAddValues(PropertyMetaData property)
- Returns:
- true if new restricted values can be added to this property
canRemoveValues
public boolean canRemoveValues(PropertyMetaData property)
- Returns:
- true if restricted values can be removed from this property
getAsCollection
public java.util.Collection getAsCollection(java.lang.Object o)
- Convenience method to make a Collection out of any Object. If the object
passed in is null, an empty collection will be returned. If the object is
already a collection, it will be returned as is. Otherwise, a new collection
containing only this object will be returned.
createTypedValue
public java.lang.Object createTypedValue(PropertyMetaData property,
java.lang.String value)
- Create an object of the type defined in the given PropertyMetaData
object with the value given in the string. If the string cannot
be converted to the correct type, an IllegalArgumentException
will be thrown.
- Parameters:
property - the PropertyMetaData to determine the typevalue - the value to convert
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)
- Set the name of the Property itself
getPropertyName
public java.lang.String getPropertyName()
- Get the name of the Property itself
setScopeName
public void setScopeName(java.lang.String s)
- Set the name of the PropertySet
getScopeName
public java.lang.String getScopeName()
- Get the name of the PropertySet
setPropertyDescription
public void setPropertyDescription(java.lang.String s)
- Set the description of the property
getPropertyDescription
public java.lang.String getPropertyDescription()
- Get the description of the property
setType
public void setType(java.lang.String s)
- Set the property's datatype, as defined in com.beasys.commerce.util.TypesHelper
getType
public java.lang.String getType()
- Get the property's datatype, as defined in com.beasys.commerce.util.TypesHelper
setOption
public void setOption(java.lang.String s)
- Set whether this property is single or multi valued. Valid values are SINGLE_VALUE and
MULTIPLE_VALUE
getOption
public java.lang.String getOption()
- Get whether this property is single or multi valued
setCategory
public void setCategory(java.lang.String s)
- Set whether this property is restricted. Valid values are RESTRICTED and
UNRESTRICTED
getCategory
public java.lang.String getCategory()
- Get whether this property is restricted
setDefaultValue
public void setDefaultValue(java.lang.String s)
- Set a default value, or list of values
getDefaultValue
public java.lang.String getDefaultValue()
- Get a default value, or list of values
setNewValue
public void setNewValue(java.lang.String s)
- Set a new value for a restricted property
getNewValue
public java.lang.String getNewValue()
- Get a new value for a restricted property
setRemoveValue
public void setRemoveValue(java.lang.String s)
- Set a value to remove from a restricted property
getRemoveValue
public java.lang.String getRemoveValue()
- Get a value to remove from a restricted property
setSchemaGroupName
public void setSchemaGroupName(java.lang.String s)
- Set the name of the schema group
getSchemaGroupName
public java.lang.String getSchemaGroupName()
- Get the name of the schema group
setCurrentPropertyValue
public void setCurrentPropertyValue(java.util.Collection cpv)
- Set the current property value object - for multiple/unrestricted pages
getCurrentPropertyValue
public java.util.Collection getCurrentPropertyValue()
- Get the current property value object - for multiple/unrestricted pages
Copyright © 2000 BEA Systems, Inc. All Rights Reserved