|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AttributeDescriptorInterface
AttributeDescriptorInterface describes an AttributeDescriptor for an Entity. Each AttributeDescriptor has several attributes:
Supplemental properties are user-defined properties that do not currently exist for the AttributeDescriptor. Supplemental properties allow users to expand the properties of the AttributeDescriptor to serve their needs. The following example creates two supplemental properties, "dynamic" and "command", and passes the map as a constructor argument to the Entity:
HashMap map = new HashMap(); map.put("dynamic", Boolean.TRUE); map.put("command", Boolean.FALSE); map.put("dynamic", Boolean.TRUE); Entity entity = new Entity(map);
The supplemental properties will be applied to all type-based (static) attributes when
the Entity is constructed. Supplemental properties are applied to instance-based (dynamic)
attributes whenever a setAttribute
occurs.
For attributes whose AttributeType is non-boolean (Types.BOOLEAN), users can simply pass a java.util.List as a parameter to
the setDefault
method. Use of a java.util.List
for receiving/sending multiple values would continue to allow the sql type to be used to identify the values stored
in the java.util.List (AttributeType does not have to be changed to have a sql type of Types.ARRAY).
Field Summary | |
---|---|
static java.lang.String |
DEFAULTVALUESET
Constant used to specify the isDefaultValueHasBeenSet() function. |
static java.lang.String |
EXPERT
Constant used to specify the isExpert() function. |
static java.lang.String |
MODIFIABLE
Constant used to specify the isModifiable() function. |
static java.lang.String |
PROPERTY
Constant used to specify the isProperty() function. |
static java.lang.String |
REQUIRED
Constant used to specify the isRequired() function. |
static java.lang.String |
VISIBLE
Constant used to specify the isVisible() function. |
Method Summary | |
---|---|
java.util.List |
getAttributeEditorContexts()
Returns a list of customizer contexts defined for the AttributeDescriptor. |
java.util.Map |
getAttributeEditors()
Returns a mapping of all of the editors defined for the AttributeDescriptor. |
java.lang.Object |
getDefault()
Return the default value. |
java.lang.String |
getEditor(java.lang.String context)
Returns the editor. |
java.lang.String |
getStringDefault()
Returns a string value for the default value. |
java.util.Map |
getSupplementalProperties()
Returns the supplemental properties of the AttributeDescriptor. |
java.lang.Object |
getSupplementalProperty(java.lang.String propertyName)
Returns the value of the supplemental property. |
AttributeTypeInterface |
getType()
Return the AttributeType. |
java.util.List |
getValidators(java.lang.String context)
Return the validators. |
java.util.List |
getValidatorsContexts()
Returns a list of validators contexts defined for the AttributeDescriptor. |
boolean |
isDefaultValueHasBeenSet()
Return true if a default value has been set (through a setDefault(Object defaultValue) call). |
boolean |
isExpert()
Returns true if the AttributeDescriptor is classified as expert. |
boolean |
isModifiable()
Returns true if the AttributeDescriptor is modifiable. |
boolean |
isProperty()
Returns false if the AttributeDescriptor is dynamic (instance-based). |
boolean |
isRequired()
Returns true if the attribute value is required. |
boolean |
isVisible()
Returns true if the AttributeDescriptor is visible. |
void |
setDefault(java.lang.Object defaultValue)
Set the default value. |
void |
setDefaultValueHasBeenSet(boolean defaultValueHasBeenSet)
Sets whether the default value has been set. |
void |
setEditor(java.lang.String context,
java.lang.String editor)
Set the editor. |
void |
setExpert(boolean expert)
Sets the expert state. |
void |
setModifiable(boolean modifiable)
Sets whether the AttributeDescriptor is modifiable. |
void |
setProperty(boolean property)
Set the AttributeDescriptor's property state. |
void |
setRequired(boolean required)
Set whether the AttributeDescriptor is required. |
void |
setSupplementalProperties(java.util.Map map)
Sets a group of supplemental properties of the AttributeDescriptor. |
void |
setSupplementalProperty(java.lang.String propertyName,
java.lang.Object value)
Sets the value of the supplemental property. |
void |
setType(AttributeTypeInterface attributeType)
Sets the AttributeType. |
void |
setValidators(java.lang.String context,
java.util.List validators)
Set the validators. |
void |
setVisible(boolean visible)
Sets whether the AttributeDescriptor should be visible. |
Methods inherited from interface com.sas.entities.BaseAttributeDescriptorInterface |
---|
getAttributeCustomizerContexts, getAttributeCustomizers, getConfigurationXML, getCustomizer, getDescription, getDescriptions, getLabel, getLabels, getLargeIconURL, getLargeIconURLs, getName, getSmallIconURL, getSmallIconURLs, setConfigurationXML, setCustomizer, setDescription, setLabel, setLargeIconURL, setName, setSmallIconURL |
Field Detail |
---|
static final java.lang.String REQUIRED
isRequired()
function.
RemoteEntityInterface.getBooleanSpecifiedAttributeDescriptors(Map map)
,
Constant Field Valuesstatic final java.lang.String VISIBLE
isVisible()
function.
RemoteEntityInterface.getBooleanSpecifiedAttributeDescriptors(Map map)
,
Constant Field Valuesstatic final java.lang.String EXPERT
isExpert()
function.
RemoteEntityInterface.getBooleanSpecifiedAttributeDescriptors(Map map)
,
Constant Field Valuesstatic final java.lang.String MODIFIABLE
isModifiable()
function.
RemoteEntityInterface.getBooleanSpecifiedAttributeDescriptors(Map map)
,
Constant Field Valuesstatic final java.lang.String PROPERTY
isProperty()
function.
RemoteEntityInterface.getBooleanSpecifiedAttributeDescriptors(Map map)
,
Constant Field Valuesstatic final java.lang.String DEFAULTVALUESET
isDefaultValueHasBeenSet()
function.
RemoteEntityInterface.getBooleanSpecifiedAttributeDescriptors(Map map)
,
Constant Field ValuesMethod Detail |
---|
boolean isVisible()
setVisible(boolean visible)
void setVisible(boolean visible)
visible
- a boolean
value.
If false, the AttributeDescriptor
should not be displayed in UI (User Interface) components.isVisible()
boolean isProperty()
setProperty(boolean property)
void setProperty(boolean property)
property
- a boolean
valueisProperty()
boolean isModifiable()
setModifiable(boolean modifiable)
void setModifiable(boolean modifiable)
modifiable
- a boolean
value.
If false, UI (User Interface) components can display the AttributeDescriptor
but should not allow it to be modified.isModifiable()
boolean isExpert()
setExpert(boolean expert)
void setExpert(boolean expert)
expert
- a boolean
value.
If true, under normal circumstances, UI (User Interface) components will not display
the AttributeDescriptor.isExpert()
boolean isRequired()
setRequired(boolean required)
void setRequired(boolean required)
required
- a boolean
value
If true, UI (User Interface) components should check that a value has been
assigned for the AttributeDescriptor.isRequired()
,
setDefault(Object defaultValue)
AttributeTypeInterface getType()
setType(AttributeTypeInterface attributeType)
,
AttributeTypeInterface
void setType(AttributeTypeInterface attributeType)
attributeType
- The AttributeType associated with this
AttributeDescriptor.getType()
java.lang.String getStringDefault()
java.lang.Object getDefault()
setDefault(Object defaultValue)
void setDefault(java.lang.Object defaultValue)
NOTE: To minimize the potential for internationalization errors, it is recommended that applications convert string values entered for numeric AttributeTypes to the appropriate numeric before setting the default value.
NOTE: When creating dates for a Date Attribute Type (sql type = Types.DATE), the date needs to created using the GMT timezone in order for it to be shared in a multi-timezone environment.
defaultValue
- default value for the attributeAttributeTypeInterface
,
getDefault()
,
setType
java.lang.String getEditor(java.lang.String context)
context
- the context in which the editor is instantiated/used;
it is a platform specification from EntityContextInterface
setEditor(String context, String editor)
,
EntityContextInterface
void setEditor(java.lang.String context, java.lang.String editor)
context
- the context in which the editor is instantiated/used;
it is a platform specification from EntityContextInterface
editor
- the class name of the editorgetEditor(String context)
java.util.Map getAttributeEditors()
java.util.List getAttributeEditorContexts()
EntityContextInterface
java.util.List getValidators(java.lang.String context)
context
- the context in which the validators are instantiated/used;
it is a platform specification from EntityContextInterface
setValidators(String context, List validators)
java.util.List getValidatorsContexts()
EntityContextInterface
void setValidators(java.lang.String context, java.util.List validators)
context
- the context in which the validators are instantiated/used;
it is a platform specification from EntityContextInterface
validators
- class names of the validatorsEntityContextInterface
,
getValidators(String context)
boolean isDefaultValueHasBeenSet()
setDefault(Object defaultValue)
call).
setDefaultValueHasBeenSet(boolean defaultValueHasBeenSet)
void setDefaultValueHasBeenSet(boolean defaultValueHasBeenSet)
defaultValueHasBeenSet
- indicates whether the default value has been setisDefaultValueHasBeenSet()
java.lang.Object getSupplementalProperty(java.lang.String propertyName)
propertyName
- name of the supplemental property
setSupplementalProperty(String propertyName, Object value)
void setSupplementalProperty(java.lang.String propertyName, java.lang.Object value)
- setSupplementalProperty("dynamic", Boolean.TRUE);
- setSupplementalProperty("command", "some value");
propertyName
- name of the supplemental propertyvalue
- property value
java.lang.IllegalArgumentException
- if propertyName is nullgetSupplementalProperty(String propertyName)
java.util.Map getSupplementalProperties()
setSupplementalProperties(Map map)
void setSupplementalProperties(java.util.Map map)
map
- name/value pairs (property name/property value)getSupplementalProperties()
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |