Class DefaultAttributeMetaData
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.metadata.AbstractMetaData
-
- org.pentaho.reporting.engine.classic.core.metadata.DefaultAttributeMetaData
-
- All Implemented Interfaces:
Serializable
,AttributeMetaData
,MetaData
public class DefaultAttributeMetaData extends AbstractMetaData implements AttributeMetaData
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.pentaho.reporting.engine.classic.core.metadata.MetaData
VALUEROLE_BUNDLE_KEY, VALUEROLE_BUNDLE_NAME, VALUEROLE_CONTENT, VALUEROLE_DATEFORMAT, VALUEROLE_ELEMENT_NAME, VALUEROLE_FIELD, VALUEROLE_FORMULA, VALUEROLE_GROUP, VALUEROLE_MESSAGE, VALUEROLE_NUMBERFORMAT, VALUEROLE_QUERY, VALUEROLE_RESOURCE, VALUEROLE_VALUE
-
-
Constructor Summary
Constructors Constructor Description DefaultAttributeMetaData(String namespace, String name, String bundleLocation, String keyPrefix, Class<?> targetClass, boolean designTimeValue, int compatibilityLevel)
Creates an expert, non-preferred, hidden, non-mandatory, non-computed and non-transient attribute.DefaultAttributeMetaData(String namespace, String name, String bundleLocation, String keyPrefix, String propertyEditorClass, Class<?> targetClass, boolean expert, boolean preferred, boolean hidden, boolean deprecated, boolean mandatory, boolean computed, boolean transientFlag, String valueRole, boolean bulk, boolean designTimeValue, AttributeCore attributeCore, MaturityLevel maturityLevel, int compatibilityLevel)
DefaultAttributeMetaData(AttributeMetaDataBuilder builder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PropertyEditor
getEditor()
This method can return null if there is no property editor registered for this type.String[]
getExtraCalculationFields()
String
getNameSpace()
String[]
getReferencedFields(ReportElement element, Object attributeValue)
String[]
getReferencedGroups(ReportElement element, Object attributeValue)
ResourceReference[]
getReferencedResources(ReportElement element, org.pentaho.reporting.libraries.resourceloader.ResourceManager resourceManager, Object attributeValue)
Class<?>
getTargetType()
String
getValueRole()
Can be one of "Value", "Resource", "Content", "Field", "Group", "Query", "Message", "Bundle-Key", "Bundle-Name", "Name", "ElementName",boolean
isBulk()
boolean
isComputed()
Indicates if this attribute is computed.boolean
isDesignTimeValue()
Indicates whether this attribute is a design-time value.boolean
isMandatory()
boolean
isTransient()
Indicates whether this attribute should be omitted when element is serialized to disk or written into a PRPT file.String
toString()
-
Methods inherited from class org.pentaho.reporting.engine.classic.core.metadata.AbstractMetaData
computePrefix, getBundle, getBundleLocation, getCompatibilityLevel, getDeprecationMessage, getDescription, getDisplayName, getFeatureMaturityLevel, getGrouping, getGroupingOrdinal, getIcon, getItemOrdinal, getKeyPrefix, getMetaAttribute, getName, isDeprecated, isExperimental, isExpert, isHidden, isPreferred
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.pentaho.reporting.engine.classic.core.metadata.MetaData
getBundleLocation, getCompatibilityLevel, getDeprecationMessage, getDescription, getDisplayName, getFeatureMaturityLevel, getGrouping, getGroupingOrdinal, getItemOrdinal, getKeyPrefix, getMetaAttribute, getName, isDeprecated, isExperimental, isExpert, isHidden, isPreferred
-
-
-
-
Constructor Detail
-
DefaultAttributeMetaData
public DefaultAttributeMetaData(String namespace, String name, String bundleLocation, String keyPrefix, Class<?> targetClass, boolean designTimeValue, int compatibilityLevel)
Creates an expert, non-preferred, hidden, non-mandatory, non-computed and non-transient attribute. This is a suitable constructor to declare internal attributes that should not be edited by an end-user in the report-designer. This constructor is only used for testing.- Parameters:
namespace
-name
-bundleLocation
-keyPrefix
-targetClass
-designTimeValue
-compatibilityLevel
-
-
DefaultAttributeMetaData
public DefaultAttributeMetaData(AttributeMetaDataBuilder builder)
-
DefaultAttributeMetaData
public DefaultAttributeMetaData(String namespace, String name, String bundleLocation, String keyPrefix, String propertyEditorClass, Class<?> targetClass, boolean expert, boolean preferred, boolean hidden, boolean deprecated, boolean mandatory, boolean computed, boolean transientFlag, String valueRole, boolean bulk, boolean designTimeValue, AttributeCore attributeCore, MaturityLevel maturityLevel, int compatibilityLevel)
-
-
Method Detail
-
getValueRole
public String getValueRole()
Can be one of "Value", "Resource", "Content", "Field", "Group", "Query", "Message", "Bundle-Key", "Bundle-Name", "Name", "ElementName",- Specified by:
getValueRole
in interfaceAttributeMetaData
- Returns:
-
isDesignTimeValue
public boolean isDesignTimeValue()
Description copied from interface:AttributeMetaData
Indicates whether this attribute is a design-time value. Such values will not be computed at runtime and any expression given for that attribute will be ignored.- Specified by:
isDesignTimeValue
in interfaceAttributeMetaData
- Returns:
-
isBulk
public boolean isBulk()
- Specified by:
isBulk
in interfaceAttributeMetaData
-
isComputed
public boolean isComputed()
Description copied from interface:AttributeMetaData
Indicates if this attribute is computed. This indicates that values of the attribute will be computed at runtime and any value set in the element itself is merely there for caching purposes and can be removed before writing the PRPT file, before serializing and before deriving an element.- Specified by:
isComputed
in interfaceAttributeMetaData
-
isTransient
public boolean isTransient()
Description copied from interface:AttributeMetaData
Indicates whether this attribute should be omitted when element is serialized to disk or written into a PRPT file. Only mark attributes as transient which contain values that have been handled elsewhere.- Specified by:
isTransient
in interfaceAttributeMetaData
-
isMandatory
public boolean isMandatory()
- Specified by:
isMandatory
in interfaceAttributeMetaData
-
getNameSpace
public String getNameSpace()
- Specified by:
getNameSpace
in interfaceAttributeMetaData
-
getTargetType
public Class<?> getTargetType()
- Specified by:
getTargetType
in interfaceAttributeMetaData
-
getEditor
public PropertyEditor getEditor()
Description copied from interface:AttributeMetaData
This method can return null if there is no property editor registered for this type.- Specified by:
getEditor
in interfaceAttributeMetaData
- Returns:
-
getReferencedFields
public String[] getReferencedFields(ReportElement element, Object attributeValue)
- Specified by:
getReferencedFields
in interfaceAttributeMetaData
-
getReferencedGroups
public String[] getReferencedGroups(ReportElement element, Object attributeValue)
- Specified by:
getReferencedGroups
in interfaceAttributeMetaData
-
getReferencedResources
public ResourceReference[] getReferencedResources(ReportElement element, org.pentaho.reporting.libraries.resourceloader.ResourceManager resourceManager, Object attributeValue)
- Specified by:
getReferencedResources
in interfaceAttributeMetaData
-
getExtraCalculationFields
public String[] getExtraCalculationFields()
- Specified by:
getExtraCalculationFields
in interfaceAttributeMetaData
-
-