|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.birt.report.model.metadata.PropertyDefn
org.eclipse.birt.report.model.metadata.ElementPropertyDefn
org.eclipse.birt.report.model.api.core.UserPropertyDefn
public final class UserPropertyDefn
Represents a user-defined property. User-defined properties are created by the user and reside on elements. If element E has a user-defined property, and element C extends E, then element C also has all the user-defined properties defined on element E.
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.
| Field Summary | |
|---|---|
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. |
| Fields inherited from class org.eclipse.birt.report.model.metadata.ElementPropertyDefn |
|---|
groupNameKey, isInheritable, useOwnSearch |
| Fields inherited from class org.eclipse.birt.report.model.metadata.PropertyDefn |
|---|
allowedChoices, allowedUnits, context, defaultUnit, defaultValue, definedBy, details, displayNameID, intrinsic, isList, name, returnType, runtimeSettable, since, subType, supportedSubTypes, type, valueValidator |
| Fields inherited from interface org.eclipse.birt.report.model.api.metadata.IPropertyDefn |
|---|
EXTENSION_MODEL_PROPERTY, EXTENSION_PROPERTY, ODA_PROPERTY, SYSTEM_PROPERTY, USER_PROPERTY |
| Constructor Summary | |
|---|---|
UserPropertyDefn()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
build()
|
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 |
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)
|
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. |
| Methods inherited from class org.eclipse.birt.report.model.metadata.ElementPropertyDefn |
|---|
canInherit, enableContextSearch, getGroupName, getGroupNameKey, hasOwnModel, isEditable, isReadOnly, isStyleProperty |
| Methods inherited from class org.eclipse.birt.report.model.metadata.PropertyDefn |
|---|
buildDefn, buildTriggerDefnSet, canContain, canContain, definedBy, getAllowedChoices, getAllowedElements, getAllowedElements, getAllowedUnits, getBooleanValue, getChoices, getContext, getDefault, getDefaultUnit, getDisplayNameID, getDisplayValue, getFloatValue, getIntValue, getName, getNumberValue, getReturnType, getSince, getStringValue, getSubType, getSubTypeCode, getSupportedSubTypes, getTargetElementType, getTriggerDefnSet, getType, getTypeCode, getXmlValue, hasChoices, isElementType, isEncryptable, isExtended, isIntrinsic, isList, isListType, isRuntimeSettable, isStructureMember, isSystemProperty, isUserProperty, isValueRequired, setContext, setDetails, setDisplayNameID, setIsList, setName, setOwner, setReturnType, setRuntimeSettable, setSince, toString, validateValue, validateXml |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.birt.report.model.api.metadata.IPropertyDefn |
|---|
getAllowedChoices, getAllowedUnits, getChoices, getContext, getDefault, getDisplayNameID, getTargetElementType, getTypeCode, hasChoices, isEncryptable, isList |
| Methods inherited from interface org.eclipse.birt.report.model.metadata.IContainerDefn |
|---|
canContain, canContain, getAllowedElements, getAllowedElements, getName |
| Field Detail |
|---|
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
| Constructor Detail |
|---|
public UserPropertyDefn()
| Method Detail |
|---|
public static java.util.List 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.IPropertySetmodule - the moduleprop - definition of the property to get
public void setProperty(org.eclipse.birt.report.model.metadata.PropertyDefn prop,
java.lang.Object value)
setProperty in interface org.eclipse.birt.report.model.core.IPropertySetprop - definition of the property to setvalue - value to setpublic java.lang.String getStructName()
getStructName in interface IStructurepublic int getValueType()
getValueType in interface IPropertyDefngetValueType in class org.eclipse.birt.report.model.metadata.PropertyDefnpublic IStructure copy()
copy in interface IStructurepublic IStructureDefn getDefn()
getDefn in interface IStructurepublic IObjectDefn getObjectDefn()
getObjectDefn in interface org.eclipse.birt.report.model.core.IPropertySetpublic java.lang.String getDisplayName()
getDisplayName in interface org.eclipse.birt.report.model.metadata.IContainerDefngetDisplayName in class org.eclipse.birt.report.model.metadata.PropertyDefnpublic 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.PropertyDefnmodule - the moduledisplayName - the candidate display name
null.public IStructureDefn getStructDefn()
IPropertyDefn
getStructDefn in interface IPropertyDefngetStructDefn in class org.eclipse.birt.report.model.metadata.PropertyDefnpublic IMethodInfo getMethodInfo()
getMethodInfo in interface IElementPropertyDefngetMethodInfo in class org.eclipse.birt.report.model.metadata.ElementPropertyDefnnullpublic void setType(org.eclipse.birt.report.model.metadata.PropertyType typeDefn)
setType in class org.eclipse.birt.report.model.metadata.PropertyDefntypeDefn - the property type
public 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 property
UserPropertyException - 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 IStructuremodule - the modulepropDefn - definition of the property to get
public java.lang.Object getProperty(org.eclipse.birt.report.model.core.Module module,
java.lang.String memberName)
IStructure
getProperty in interface IStructuremodule - the modulememberName - the name of the property definition
public boolean isReferencable()
IStructure
isReferencable in interface IStructurepublic void setDefault(java.lang.Object value)
setDefault in class org.eclipse.birt.report.model.metadata.PropertyDefn
public void build()
throws org.eclipse.birt.report.model.metadata.MetaDataException
build in class org.eclipse.birt.report.model.metadata.ElementPropertyDefnorg.eclipse.birt.report.model.metadata.MetaDataExceptionpublic boolean isDesignTime()
IStructure
isDesignTime in interface IStructurepublic boolean isVisible()
isVisible in interface IElementPropertyDefnisVisible in class org.eclipse.birt.report.model.metadata.ElementPropertyDefntrue if property is visible.public void setVisible(boolean isVisible)
isVisible -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||