public class CustomAttributeImpl extends AttributeImpl implements CustomAttribute
Modifier and Type | Class and Description |
---|---|
static class |
BaseObject.ChildAlreadyExists |
protected static interface |
BaseObject.Manager |
protected static class |
BaseObject.Matcher |
protected static class |
BaseObject.STATE |
protected static class |
BaseObject.UnsupportedRestOperationException |
AttributeImpl.OtherFields
ADDL_LIST_DISPLAY_FIELDS, ADDL_LIST_SEARCH_FIELDS, API_NAME, BODY, CHILD_LOOKUP_CODES, DATA_FILTERS, DATETIME_DISPLAY_TYPE, DECIMAL_PLACES, DEFAULT_VALUE, DEFINITION, DEPENDENCY_FIELDS, DESCRIPTION, DISPLAY_HEIGHT, DISPLAY_LABEL, DISPLAY_LABEL_PLURAL, DISPLAY_SEQUENCE, DISPLAY_WIDTH, ENABLED, END_DATE_ACTIVE, ERROR_MESSAGE, EXAMPLE, EXPRESSION, FIELDS, FORMULA_TYPE, FULL_NAME, FUNCTION_ID, FUNCTIONS, GLOBAL_FUNCTIONS, HELP_TEXT, ID, INDEXED, IS_CUSTOM, IS_MULTISELECT_PICKLIST, LIST_DISPLAY_FIELD, LIST_OBJECT, LOOKUP_CODE, LOOKUP_TYPE, LOOKUP_TYPES, LOOKUPS, MATCH_CASE, MAX_LENGTH, MAX_VALUE, MEANING, MIN_LENGTH, MIN_VALUE, NAME, OBJECTS, OPERATOR, PARAMETERS, PARENT_BUSINESS_OBJECT, PARENT_LOOKUP_CODE, PARENT_PICKLIST, PICKLIST_LOOKUP_TYPE, PRIVILEGE, PUBLISHED_AS_REST, RECORD_NAME_LABEL, REQUIRED, REQUIRED_EXPRESSION, RETURN_TYPE, SEARCH_FIELD_API_NAME, SORT_BY, SORT_BY_ASCENDING, START_DATE_ACTIVE, TRIGGERS, TYPE, UPDATABLE, UPDATABLE_EXPRESSION, VALIDATORS, VALUE_MAP, VALUE1, VALUE2, VISIBILITY_PROPERTY
Constructor and Description |
---|
CustomAttributeImpl(BusinessObjectImpl owner,
org.codehaus.jettison.json.JSONObject attr) |
Modifier and Type | Method and Description |
---|---|
void |
activate()
Activate an attribute
|
DataFilter |
addDataFilter(Attribute attr,
ComparisonOperator operator,
java.lang.Object[] values)
Add a data filter to further refine the set of data appearing within
the list of value used by dynamic choice list.
|
DataFilter |
addDataFilter(Attribute attr,
java.lang.String operator,
java.lang.Object[] values)
Add a data filter to further refine the set of data appearing within
the list of value used by dynamic choice list.
|
void |
addDisplayAttribute(Attribute attr)
Adds an attribute to be included in the List of Values window for
context.
|
void |
addSearchAttribute(Attribute attr)
Adds an attribute to be included as search criteria in addition to the
selection display value.
|
protected org.codehaus.jettison.json.JSONObject |
convertToJSON(java.lang.Object... attrNameAndValues) |
protected <T> T |
createChild(java.lang.String accessorName,
java.lang.Class<T> type,
org.codehaus.jettison.json.JSONObject obj) |
protected void |
deleteChild(BaseObject.Matcher matcher) |
protected void |
deleteChild(java.lang.String accessorName,
java.lang.String childName) |
void |
deprecate()
Deprecate an attribute
|
void |
doCreateNewChildren() |
void |
doDeleteChildren() |
void |
doSetAttributes() |
boolean |
equals(java.lang.Object obj) |
protected <T> T |
findChild(java.lang.Class<T> type,
BaseObject.Matcher matcher) |
protected <T> T |
findChild(java.lang.String accessorName,
java.lang.String childName,
java.lang.Class<T> type) |
protected <T> java.util.List<T> |
findChildren(java.lang.Class<T> type,
BaseObject.Matcher matcher)
Find all children objects matching the given Matcher.
|
java.lang.String |
getApiName()
Returns the API name of the custom attribte.
|
protected java.lang.Object |
getAttribute(java.lang.String attrName) |
protected java.lang.Object |
getAttribute(java.lang.String attrName,
java.lang.Object defaultValue)
Get the attribute value for the given attribute name.
|
protected <T> java.util.Collection<T> |
getChildren(java.lang.String accessorName,
java.lang.Class<T> type) |
protected java.util.List<oracle.adfinternal.businesseditor.restapi.BaseObject> |
getChildrenDeleted(BaseObject.Matcher childMatcher) |
protected org.codehaus.jettison.json.JSONArray |
getChildrenJSON(java.lang.String accessorName)
Get all children of a given type defined by accessorName.
|
protected java.util.List<oracle.adfinternal.businesseditor.restapi.BaseObject> |
getChildrenNew(BaseObject.Matcher childMatcher) |
java.util.List<DataFilter> |
getDataFilters()
Return list of data filter that are used to refine the set of data
appearing within the list of value used by dynamic choice list.
|
DatetimeDisplayType |
getDatetimeDisplayType()
Returns the display type of this attribute.
|
int |
getDecimalPlace()
Returns the decimal place of this attribute
|
java.lang.String |
getDefaultValue()
Returns the default value of this attribute.
|
java.lang.String |
getDescription() |
java.util.List<Attribute> |
getDisplayAttributes()
Returns list of display attributes that is included in the List of
Values window for context.
|
java.util.List<java.lang.String> |
getDisplayAttrs()
Returns list of display attributes that is included in the List of
Values window for context.
|
int |
getDisplayHeight()
Returns the display height of this attribute.
|
int |
getDisplayWidth()
Returns the display width of this attribute.
|
java.lang.String |
getExpression()
Returns the expression of this attribute.
|
protected java.lang.String |
getFinderKey(java.lang.String accessorName)
Get the key whose value defines the resource name for this object in URL path
|
protected java.lang.String |
getInternalName()
Name that will represent the resource id for this object.
|
Attribute |
getListDisplayAttribute()
Retursn the list display attribute used by a dynamic choice list.
|
static java.lang.String |
getLocalizedString(java.lang.String key,
java.lang.Object... args) |
protected oracle.adfinternal.model.logging.contextual.logger.functional.FunctionalLogger |
getLogger() |
BaseObject.Matcher |
getMatcher()
Get a Matcher that is used to compare with another object.
|
int |
getMaxLength()
Returns the maximum length of this attribute.
|
java.math.BigDecimal |
getMaxValue()
Returns the maximum value of this attribute.
|
int |
getMinLength()
Returns the minimum length of this attribute.
|
java.math.BigDecimal |
getMinValue()
Returns the minimum value of this attribute.
|
java.lang.String |
getName() |
protected oracle.adfinternal.businesseditor.restapi.BaseObject |
getOwner()
Get the container object that contains this object.
|
protected java.lang.String[] |
getQueryKeys(java.lang.String accessorName)
Different types of objects use different names to find a child object.
|
java.lang.String |
getRequiredExpression()
Returns the expression that determine if this attribute is required.
|
java.util.List<Attribute> |
getSearchAttributes()
Return list of attributes that are included as search criteria in addition
to the selection display value.
|
java.util.List<java.lang.String> |
getSearchAttrs()
Return list of attributes that are included as search criteria in addition
to the selection display value.
|
protected BaseObject.STATE |
getState() |
boolean |
isDefaultValueExpression()
Returns if the default value of this attribute is an expression.
|
boolean |
isDeprecated()
Return if an attribute is deprecated
|
boolean |
isIncludedInServicePayload()
Returns if this attribute is included in the service payload
|
boolean |
isIndexed()
Returns if the attribute is indexed.
|
boolean |
isMultiselectFixedChoiceList()
Returns if this attribute is a multi-select fixed choice list.
|
boolean |
isNew() |
void |
removeDataFilter(DataFilter dataFilter)
Remove the data filter that is used to refine the set of data appearing
within the list of value used by dynamic choice list.
|
void |
removeDisplayAttr(Attribute attr)
Removes an attribute from being included in the List of Values window
for context.
|
void |
removeSearchAttr(Attribute attr)
Removes an attribute from being included as search criteria in addition
to the selection display value.
|
protected void |
setAttribute(java.lang.String attrName,
java.lang.Object value) |
void |
setDatetimeDisplayType(DatetimeDisplayType displayType)
Sets the display type of a Datetime attribute.
|
void |
setDecimalPlace(int value)
Sets the decimal place of this attribute.
|
void |
setDefaultValue(java.lang.String value)
Sets the default value of this attribute.
|
void |
setDescription(java.lang.String text) |
void |
setDisplayHeight(int value)
Sets the display height of this attribute.
|
void |
setDisplayWidth(int value)
Sets the display width of this attribute.
|
void |
setExpression(java.lang.String value)
Sets the expression of this attribute.
|
void |
setFixedChoiceListLookupType(java.lang.String value)
Sets the lookup type of the fixed choice list attribute.
|
void |
setFormulaType(FormulaType formulaType)
Sets the type of data the expression will be setting as this attribute
value.
|
void |
setIncludedInServicePayload(boolean value)
Sets if this attribute is included in the service payload
|
void |
setIndexed(boolean value)
Sets if this attribute is indexed.
|
void |
setListDisplayAttribute(Attribute dataSourceAttribute)
Sets the list display attribute to be used by a dynamic choice list.
|
protected void |
setLogger(oracle.adfinternal.model.logging.contextual.logger.functional.FunctionalLogger logger) |
void |
setMaxLength(int value)
Sets the maximum length of this attribute.
|
void |
setMaxValue(java.math.BigDecimal value)
Sets the maximum value of this attribute.
|
void |
setMinLength(int value)
Sets the minimum length of this attribute.
|
void |
setMinValue(java.math.BigDecimal value)
Sets the minimum value of this attribute.Throws JboException if minimum value cannot be set for the attribute type.
|
void |
setMultiselectFixedChoiceList(boolean value)
Sets if the attribute is a multi-select fixed choice list.
|
void |
setName(java.lang.String name)
Renames this object.
|
void |
setProperty(java.lang.String property,
java.lang.Object value)
Assign a value to a property for the attribute
|
void |
setRequiredExpression(java.lang.String value)
Sets the expression that determine if an attribute is required.
|
void |
setUpdateable(boolean value)
Sets if the attribute is updateable.
|
void |
undoChanges() |
protected void |
verifyObjectIsValid()
Verifies if object is valid.
|
addDependencyAttr, addOtherAttr, createTrigger, createTrigger, createValidator, deleteTrigger, deleteValidator, findTrigger, findValidator, getAccessorNameFromOwner, getBusinessObject, getCustomProperties, getCustomProperty, getDependencyAttributes, getDependencyAttrs, getDisplayLabel, getFixedChoiceListLookupType, getFixedChoiceListValueMap, getFormulaType, getHelpText, getOtherAttributes, getOtherAttrs, getParentChoiceList, getTriggers, getType, getUpdateableExpression, getValidators, initChildObject, isRemovable, isRequired, isSearchable, isUpdateable, removeDependencyAttr, removeOtherAttr, setCustomProperty, setDisplayLabel, setHelpText, setParentChoiceList, setRequired, setSearchable, setUpdateableExpression, toApiName
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addDependencyAttr, createTrigger, createTrigger, createValidator, deleteTrigger, deleteValidator, findTrigger, findValidator, getBusinessObject, getCustomProperties, getCustomProperty, getDependencyAttributes, getDependencyAttrs, getDescription, getDisplayLabel, getFixedChoiceListLookupType, getFixedChoiceListValueMap, getFormulaType, getHelpText, getName, getParentChoiceList, getTriggers, getType, getUpdateableExpression, getValidators, isRemovable, isRequired, isSearchable, isUpdateable, removeDependencyAttr, setCustomProperty, setDescription, setDisplayLabel, setHelpText, setParentChoiceList, setRequired, setSearchable, setUpdateableExpression
public CustomAttributeImpl(BusinessObjectImpl owner, org.codehaus.jettison.json.JSONObject attr) throws java.lang.Exception
java.lang.Exception
public java.lang.String getApiName()
CustomAttribute
getApiName
in interface CustomAttribute
public void setRequiredExpression(java.lang.String value)
CustomAttribute
setRequiredExpression
in interface CustomAttribute
value
- the expression to determine if an attribute is required.public java.lang.String getRequiredExpression()
CustomAttribute
getRequiredExpression
in interface CustomAttribute
public void setDisplayWidth(int value)
CustomAttribute
setDisplayWidth
in interface CustomAttribute
value
- this display widthpublic int getDisplayWidth()
CustomAttribute
getDisplayWidth
in interface CustomAttribute
public void setDisplayHeight(int value)
CustomAttribute
setDisplayHeight
in interface CustomAttribute
value
- the display heightpublic int getDisplayHeight()
CustomAttribute
getDisplayHeight
in interface CustomAttribute
public void setUpdateable(boolean value)
CustomAttribute
setUpdateable
in interface CustomAttribute
value
- if this attribute is updateablepublic void setIndexed(boolean value)
CustomAttribute
setIndexed
in interface CustomAttribute
value
- if this attribute is indexedpublic boolean isIndexed()
CustomAttribute
isIndexed
in interface CustomAttribute
public void setMinLength(int value)
CustomAttribute
setMinLength
in interface CustomAttribute
value
- the minimum lengthpublic int getMinLength()
CustomAttribute
getMinLength
in interface CustomAttribute
public void setMaxLength(int value)
CustomAttribute
setMaxLength
in interface CustomAttribute
value
- the maximum lengthpublic int getMaxLength()
CustomAttribute
getMaxLength
in interface CustomAttribute
public void setMinValue(java.math.BigDecimal value)
CustomAttribute
setMinValue
in interface CustomAttribute
value
- the minimum valuepublic java.math.BigDecimal getMinValue()
CustomAttribute
getMinValue
in interface CustomAttribute
public void setMaxValue(java.math.BigDecimal value)
CustomAttribute
setMaxValue
in interface CustomAttribute
value
- the maximum valuepublic java.math.BigDecimal getMaxValue()
CustomAttribute
getMaxValue
in interface CustomAttribute
public void setDecimalPlace(int value)
CustomAttribute
setDecimalPlace
in interface CustomAttribute
value
- the decimal placepublic int getDecimalPlace()
CustomAttribute
getDecimalPlace
in interface CustomAttribute
public void setDefaultValue(java.lang.String value)
CustomAttribute
setDefaultValue
in interface CustomAttribute
value
- the default valuepublic java.lang.String getDefaultValue()
CustomAttribute
getDefaultValue
in interface CustomAttribute
public void setExpression(java.lang.String value)
CustomAttribute
setExpression
in interface CustomAttribute
value
- the expressionpublic java.lang.String getExpression()
CustomAttribute
getExpression
in interface CustomAttribute
public boolean isDefaultValueExpression()
CustomAttribute
isDefaultValueExpression
in interface CustomAttribute
public void setDatetimeDisplayType(DatetimeDisplayType displayType)
CustomAttribute
setDatetimeDisplayType
in interface CustomAttribute
displayType
- the display typepublic DatetimeDisplayType getDatetimeDisplayType()
CustomAttribute
getDatetimeDisplayType
in interface CustomAttribute
public void setMultiselectFixedChoiceList(boolean value)
CustomAttribute
setMultiselectFixedChoiceList
in interface CustomAttribute
value
- if the attribute is a multi-select fixed choice listpublic boolean isMultiselectFixedChoiceList()
CustomAttribute
isMultiselectFixedChoiceList
in interface CustomAttribute
public void setIncludedInServicePayload(boolean value)
CustomAttribute
setIncludedInServicePayload
in interface CustomAttribute
value
- if this attribute is included in the service payloadpublic boolean isIncludedInServicePayload()
CustomAttribute
isIncludedInServicePayload
in interface CustomAttribute
public void setFixedChoiceListLookupType(java.lang.String value)
CustomAttribute
setFixedChoiceListLookupType
in interface CustomAttribute
value
- the lookup typepublic void setListDisplayAttribute(Attribute dataSourceAttribute)
CustomAttribute
setListDisplayAttribute
in interface CustomAttribute
dataSourceAttribute
- the list display attributepublic Attribute getListDisplayAttribute()
CustomAttribute
getListDisplayAttribute
in interface CustomAttribute
public void addDisplayAttribute(Attribute attr)
CustomAttribute
addDisplayAttribute
in interface CustomAttribute
attr
- the attribute to be addedpublic void removeDisplayAttr(Attribute attr)
CustomAttribute
removeDisplayAttr
in interface CustomAttribute
attr
- the attribute to be removedpublic java.util.List<java.lang.String> getDisplayAttrs()
CustomAttribute
getDisplayAttrs
in interface CustomAttribute
public java.util.List<Attribute> getDisplayAttributes()
CustomAttribute
getDisplayAttributes
in interface CustomAttribute
public void addSearchAttribute(Attribute attr)
CustomAttribute
addSearchAttribute
in interface CustomAttribute
attr
- the attribute to be addedpublic void removeSearchAttr(Attribute attr)
CustomAttribute
removeSearchAttr
in interface CustomAttribute
attr
- the attribute to be removedpublic java.util.List<java.lang.String> getSearchAttrs()
CustomAttribute
getSearchAttrs
in interface CustomAttribute
public java.util.List<Attribute> getSearchAttributes()
CustomAttribute
getSearchAttributes
in interface CustomAttribute
public DataFilter addDataFilter(Attribute attr, java.lang.String operator, java.lang.Object[] values)
CustomAttribute
addDataFilter
in interface CustomAttribute
attr
- Attribute of the search field. The attribute must belong to
the same business object as the list display attributeoperator
- Operator of the filtervalues
- Values of the filterpublic DataFilter addDataFilter(Attribute attr, ComparisonOperator operator, java.lang.Object[] values)
CustomAttribute
addDataFilter
in interface CustomAttribute
attr
- Attribute of the search field. The attribute must belong to
the same business object as the list display attributeoperator
- Operator of the filtervalues
- Values of the filterpublic void removeDataFilter(DataFilter dataFilter)
CustomAttribute
removeDataFilter
in interface CustomAttribute
dataFilter
- filter to removepublic java.util.List<DataFilter> getDataFilters()
CustomAttribute
getDataFilters
in interface CustomAttribute
public void setFormulaType(FormulaType formulaType)
CustomAttribute
setFormulaType
in interface CustomAttribute
formulaType
- formula typepublic void setProperty(java.lang.String property, java.lang.Object value)
CustomAttribute
setProperty
in interface CustomAttribute
property
- the name of the property to be updatedvalue
- the value of the propertypublic void deprecate()
CustomAttribute
deprecate
in interface CustomAttribute
public void activate()
CustomAttribute
activate
in interface CustomAttribute
public boolean isDeprecated()
CustomAttribute
isDeprecated
in interface CustomAttribute
protected oracle.adfinternal.businesseditor.restapi.BaseObject getOwner()
protected java.lang.String[] getQueryKeys(java.lang.String accessorName)
accessorName
- the resource name to reach a particular type of child objectprotected java.lang.String getFinderKey(java.lang.String accessorName)
accessorName
- the resource name to reach a particular type of child objectprotected final java.lang.String getInternalName()
public java.lang.String getName()
public void setName(java.lang.String name)
BaseObject.ChildAlreadyExists
if there
is a name clash. Whether the name can be overloaded or not is left
to the findChild(Class, Matcher)
name
- new namepublic void setDescription(java.lang.String text)
public java.lang.String getDescription()
protected java.lang.Object getAttribute(java.lang.String attrName)
protected void verifyObjectIsValid()
oracle.jbo.JboException
- if object is invalidprotected java.lang.Object getAttribute(java.lang.String attrName, java.lang.Object defaultValue)
attrName
- name of attributedefaultValue
- default valueprotected oracle.adfinternal.model.logging.contextual.logger.functional.FunctionalLogger getLogger()
protected void setLogger(oracle.adfinternal.model.logging.contextual.logger.functional.FunctionalLogger logger)
protected BaseObject.STATE getState()
public boolean isNew()
protected void setAttribute(java.lang.String attrName, java.lang.Object value)
public BaseObject.Matcher getMatcher()
equals(Object)
which does a finer comparision of the whole URL path. For example,
functions from global functions or different business objects might match in signature
but not equal as their URL path will be different.protected java.util.List<oracle.adfinternal.businesseditor.restapi.BaseObject> getChildrenDeleted(BaseObject.Matcher childMatcher)
protected java.util.List<oracle.adfinternal.businesseditor.restapi.BaseObject> getChildrenNew(BaseObject.Matcher childMatcher)
protected <T> T findChild(java.lang.String accessorName, java.lang.String childName, java.lang.Class<T> type)
protected <T> T findChild(java.lang.Class<T> type, BaseObject.Matcher matcher)
protected <T> java.util.List<T> findChildren(java.lang.Class<T> type, BaseObject.Matcher matcher)
T
- Class that is expected type of the returned children objects.type
- Class instance of type Tmatcher
- Matcher that is used to find the correct childrenprotected org.codehaus.jettison.json.JSONArray getChildrenJSON(java.lang.String accessorName) throws java.lang.Exception
accessorName
- resource name or type of the children objectsjava.lang.Exception
- if any thrown by the GET requestprotected <T> java.util.Collection<T> getChildren(java.lang.String accessorName, java.lang.Class<T> type)
protected <T> T createChild(java.lang.String accessorName, java.lang.Class<T> type, org.codehaus.jettison.json.JSONObject obj)
protected void deleteChild(java.lang.String accessorName, java.lang.String childName)
protected void deleteChild(BaseObject.Matcher matcher)
protected org.codehaus.jettison.json.JSONObject convertToJSON(java.lang.Object... attrNameAndValues)
public void doDeleteChildren()
public void doCreateNewChildren()
public void doSetAttributes()
public void undoChanges()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public static java.lang.String getLocalizedString(java.lang.String key, java.lang.Object... args)