public final class UserPropertyDefn extends org.eclipse.birt.report.model.metadata.ElementPropertyDefn implements IStructure
The user property definition implements the IStructure
interface
so that it can be accessed generically, and changes can be done though the
command mechanism to allow undo/redo of style changes.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CHOICES_MEMBER
Name of the choices member.
|
static java.lang.String |
DEFAULT_MEMBER
Name of the default member.
|
static java.lang.String |
DISPLAY_NAME_ID_MEMBER
Name of the display name ID member.
|
static java.lang.String |
DISPLAY_NAME_MEMBER
Name of the display name member.
|
static java.lang.String |
ISVISIBLE_MEMBER
Name of the isVisible member.
|
static java.lang.String |
NAME_MEMBER
Name of the name member.
|
static java.lang.String |
STRUCTURE_NAME
Name of the structure itself.
|
static java.lang.String |
TYPE_MEMBER
Name of the type member.
|
groupNameKey, isInheritable, useOwnSearch
allowedChoices, allowedUnits, allowExpression, context, defaultUnit, defaultValue, definedBy, details, displayNameID, expressionType, intrinsic, isEncryptable, isList, messages, name, nameConfig, returnType, runtimeSettable, since, subType, triggers, trimOption, type, valueRequired, valueValidator
COMMERCIAL_PROPERTY, EXTENSION_MODEL_PROPERTY, EXTENSION_PROPERTY, ODA_PROPERTY, SYSTEM_PROPERTY, USER_PROPERTY
Constructor and Description |
---|
UserPropertyDefn()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
build()
Builds the semantic information for this property.
|
void |
checkUserPropertyDefn(org.eclipse.birt.report.model.core.Module module,
org.eclipse.birt.report.model.core.DesignElement element)
Checks whether the element can take the given user property definition
and the definition is valid.
|
IStructure |
copy()
Makes a copy of this user property definition.
|
static java.util.List<IPropertyType> |
getAllowedTypes()
Gets valid types for user property.
|
IStructureDefn |
getDefn()
Gets the definition of the structure which represents the user property
definition.
|
java.lang.String |
getDisplayName()
Gets the display name of this user property definition.
|
java.lang.Object |
getLocalProperty(org.eclipse.birt.report.model.core.Module module,
org.eclipse.birt.report.model.metadata.PropertyDefn propDefn)
Gets the locale value of a property.
|
IMethodInfo |
getMethodInfo()
User-defined methods are not supported.
|
IObjectDefn |
getObjectDefn()
Gets the object definition of the user property definition.
|
java.lang.Object |
getProperty(org.eclipse.birt.report.model.core.Module module,
org.eclipse.birt.report.model.metadata.PropertyDefn prop)
Gets the value of property by the given property definition.
|
java.lang.Object |
getProperty(org.eclipse.birt.report.model.core.Module module,
java.lang.String memberName)
Gets the locale value of a property.
|
IStructureDefn |
getStructDefn()
Returns the structure definition for this value.
|
java.lang.String |
getStructName()
Gets the name predefined for this structure.
|
int |
getValueType()
Gets the property type.
|
boolean |
isDesignTime()
Justifies whether the structure is generated in design time or not.
|
boolean |
isReferencable()
Justifies whether the structure can be referred by other design elements.
|
boolean |
isVisible()
Checks whether the property is visible to the property sheet.
|
void |
setChoices(UserChoice[] choiceArray)
Sets the (anonymous) set of choices for a property.
|
void |
setDefault(java.lang.Object value)
Sets the default value for the property.
|
void |
setDisplayName(java.lang.String theName)
Sets the display name of the property.
|
void |
setProperty(org.eclipse.birt.report.model.metadata.PropertyDefn prop,
java.lang.Object value)
Sets the value for the given property definition.
|
void |
setType(org.eclipse.birt.report.model.metadata.PropertyType typeDefn)
Sets the property type.
|
void |
setVisible(boolean isVisible)
Sets whether the property is visible to the property sheet.
|
protected java.lang.String |
validateExtendedChoicesByDisplayName(org.eclipse.birt.report.model.core.Module module,
java.lang.String displayName)
Checks whether
displayName matches any items in the choice
set for an extended choice property type on a user defined choice set. |
canInherit, enableContextSearch, getGroupName, getGroupNameKey, hasOwnModel, isEditable, isReadOnly, isStyleProperty
allowExpression, buildDefn, buildTriggerDefnSet, buildTrimOption, canContain, canContain, definedBy, doValidateValueWithExpression, getAllowedChoices, getAllowedElements, getAllowedElements, getAllowedUnits, getBooleanValue, getChoices, getCompatibleTypeAndValue, getContext, getDefault, getDefaultUnit, getDetails, getDisplayNameID, getDisplayValue, getFloatValue, getIntValue, getMessages, getName, getNameConfig, getNumberValue, getReturnType, getSince, getStringValue, getSubType, getSubTypeCode, getTargetElementType, getTriggerDefnSet, getType, getTypeCode, getXmlValue, hasChoices, isElementType, isEncryptable, isExtended, isIntrinsic, isList, isListType, isRuntimeSettable, isStructureMember, isSupportedSubType, isSystemProperty, isUserProperty, isValueRequired, setContext, setDetails, setDisplayNameID, setIsList, setMessages, setName, setNameConfig, setOwner, setReturnType, setRuntimeSettable, setSince, setTrimOption, toString, validateValue, validateXml
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
allowExpression, getAllowedChoices, getAllowedUnits, getChoices, getContext, getDefault, getDisplayNameID, getTargetElementType, getTypeCode, hasChoices, isEncryptable, isList
public static final java.lang.String TYPE_MEMBER
public static final java.lang.String NAME_MEMBER
public static final java.lang.String ISVISIBLE_MEMBER
public static final java.lang.String DEFAULT_MEMBER
public static final java.lang.String DISPLAY_NAME_MEMBER
public static final java.lang.String DISPLAY_NAME_ID_MEMBER
public static final java.lang.String STRUCTURE_NAME
public static final java.lang.String CHOICES_MEMBER
public static java.util.List<IPropertyType> getAllowedTypes()
IPropertyType
.public java.lang.Object getProperty(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.metadata.PropertyDefn prop)
getProperty
in interface org.eclipse.birt.report.model.core.IPropertySet
module
- the moduleprop
- definition of the property to getpublic void setProperty(org.eclipse.birt.report.model.metadata.PropertyDefn prop, java.lang.Object value)
setProperty
in interface org.eclipse.birt.report.model.core.IPropertySet
prop
- definition of the property to setvalue
- value to setpublic java.lang.String getStructName()
getStructName
in interface IStructure
public int getValueType()
getValueType
in interface IPropertyDefn
getValueType
in class org.eclipse.birt.report.model.metadata.PropertyDefn
public IStructure copy()
copy
in interface IStructure
public IStructureDefn getDefn()
getDefn
in interface IStructure
public IObjectDefn getObjectDefn()
getObjectDefn
in interface org.eclipse.birt.report.model.core.IPropertySet
public java.lang.String getDisplayName()
getDisplayName
in interface org.eclipse.birt.report.model.metadata.IContainerDefn
getDisplayName
in class org.eclipse.birt.report.model.metadata.PropertyDefn
public void setDisplayName(java.lang.String theName)
theName
- the display name to setpublic void setChoices(UserChoice[] choiceArray)
choiceArray
- choice array to be set.protected java.lang.String validateExtendedChoicesByDisplayName(org.eclipse.birt.report.model.core.Module module, java.lang.String displayName)
displayName
matches any items in the choice
set for an extended choice property type on a user defined choice set. If
displayName
exists in the choice set, return the name of
this choice. Otherwise, return null
.validateExtendedChoicesByDisplayName
in class org.eclipse.birt.report.model.metadata.PropertyDefn
module
- the moduledisplayName
- the candidate display namenull
.public IStructureDefn getStructDefn()
org.eclipse.birt.report.model.metadata.PropertyDefn
getStructDefn
in interface IPropertyDefn
getStructDefn
in class org.eclipse.birt.report.model.metadata.PropertyDefn
public IMethodInfo getMethodInfo()
getMethodInfo
in interface IElementPropertyDefn
getMethodInfo
in class org.eclipse.birt.report.model.metadata.ElementPropertyDefn
null
public void setType(org.eclipse.birt.report.model.metadata.PropertyType typeDefn)
setType
in class org.eclipse.birt.report.model.metadata.PropertyDefn
typeDefn
- the property typepublic void checkUserPropertyDefn(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element) throws UserPropertyException, org.eclipse.birt.report.model.metadata.MetaDataException
module
- the moduleelement
- the design element that holds the user-defined propertyUserPropertyException
- if the element is not allowed to have user property or the
user property definition is invalid.org.eclipse.birt.report.model.metadata.MetaDataException
- if the user property definition is inconsistent.public java.lang.Object getLocalProperty(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.metadata.PropertyDefn propDefn)
IStructure
getLocalProperty
in interface IStructure
module
- the modulepropDefn
- definition of the property to getpublic java.lang.Object getProperty(org.eclipse.birt.report.model.core.Module module, java.lang.String memberName)
IStructure
getProperty
in interface IStructure
module
- the modulememberName
- the name of the property definitionpublic boolean isReferencable()
IStructure
isReferencable
in interface IStructure
public void setDefault(java.lang.Object value)
org.eclipse.birt.report.model.metadata.PropertyDefn
setDefault
in class org.eclipse.birt.report.model.metadata.PropertyDefn
value
- The default value to set.public void build() throws org.eclipse.birt.report.model.metadata.MetaDataException
org.eclipse.birt.report.model.metadata.ElementPropertyDefn
build
in class org.eclipse.birt.report.model.metadata.ElementPropertyDefn
org.eclipse.birt.report.model.metadata.MetaDataException
- if the build is failedpublic boolean isDesignTime()
IStructure
isDesignTime
in interface IStructure
public boolean isVisible()
isVisible
in interface IElementPropertyDefn
isVisible
in class org.eclipse.birt.report.model.metadata.ElementPropertyDefn
true
if property is visible.public void setVisible(boolean isVisible)
isVisible
- Copyright © 2008 Actuate Corp. All rights reserved.