Class RelatedItemColumn.Specification
java.lang.Object
net.sf.basedb.clients.web.extensions.list.RelatedItemColumn.Specification
- Enclosing class:
- RelatedItemColumn
Represents a specification for loading a related parent or child item.
The general format is: /DIRECTION/ITEMTYPE/subtype-id/property
where
DIRECTION: PARENT or CHILD
ITEMTYPE: Item.name() value for the related item
subtype-id: Id of an
ItemSubtype
or a RawDataType
. It
can also include an extra filter on an annotation: subtype-id&annotationtype-id=value
or item list: subtype-id&list=id
property: a specification of what value to retrieve from the related item.
It can have different formats:
- #annotationtype-id: Id of an annotation type
- !extension-id#action-id: Id of an extension and ListColumnAction
to use for loading the value
Otherwise it is interpreted as a property that is defined on the targeted instance.- Since:
- 3.19.4
-
Field Summary
Modifier and TypeFieldDescription(package private) String
(package private) boolean
(package private) int
(package private) SyncFilter.SourceItemTransform
(package private) String
(package private) String
(package private) String
(package private) String
(package private) String
(package private) String
(package private) String
(package private) String
(package private) boolean
(package private) String
(package private) Item
(package private) String
(package private) String
(package private) Item
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionItemQuery<?>
generateExportTitle
(String title) Generates an export title using target item type and subtype as prefix.generateTitle
(String title) Generates a title using target item type and subtype as prefix.generateTooltip
(String tooltip) Generates a tooltip using target item type and subtype as prefix.Get the action id from the expression.int
Get the annotation id from the expression.Get the parsed value of the DIRECTION.Get the raw value of the DIRECTION.Get the full expression that defines the targeted item and property.Get the extension id from the expression.Get the property from the expression.Get the source item type.Get the target subtype from the expression.Get the name of the targeted subtype.Get the target ITEMTYPE from the expression.boolean
Enabled on a multi-hop path if the path down to the related child from the parent item is allowed to traverse the same items as the path up from the source child item to the parent.boolean
If the property starts with a '/' it is a multi-hop specification.private String
withPrefix
(String prefix, String s) Return prefix+string if string is not null or the empty string otherwise.
-
Field Details
-
expression
String expression -
directionRaw
String directionRaw -
direction
SyncFilter.SourceItemTransform direction -
allowDoublingBack
boolean allowDoublingBack -
sourceType
Item sourceType -
targetType
Item targetType -
subtype
String subtype -
subtypeName
String subtypeName -
filterAnnotationType
String filterAnnotationType -
filterAnnotationTypeName
String filterAnnotationTypeName -
filterAnnotationValue
String filterAnnotationValue -
filterItemList
String filterItemList -
filterItemListName
String filterItemListName -
property
String property -
annotationId
int annotationId -
extensionId
String extensionId -
actionId
String actionId -
multiHop
boolean multiHop
-
-
Constructor Details
-
Specification
public Specification()
-
-
Method Details
-
parse
-
getExpression
Get the full expression that defines the targeted item and property. -
getDirectionRaw
Get the raw value of the DIRECTION. -
getDirection
Get the parsed value of the DIRECTION. -
isDoublingBackAllowed
public boolean isDoublingBackAllowed()Enabled on a multi-hop path if the path down to the related child from the parent item is allowed to traverse the same items as the path up from the source child item to the parent. -
getSourceType
Get the source item type. This is not part of the expression, but is taken from the current list. -
getTargetType
Get the target ITEMTYPE from the expression. -
getSubtype
Get the target subtype from the expression. -
getSubtypeName
Get the name of the targeted subtype. This may not always be available. -
getProperty
Get the property from the expression. -
getAnnotationId
public int getAnnotationId()Get the annotation id from the expression. Only available if the property represents an annotation (it starts with '#'). -
getExtensionId
Get the extension id from the expression. Only available if the property represents an extension (it starts with '!'). -
getActionId
Get the action id from the expression. Only available if the property represents an extension (it starts with '!'). -
isMultiHop
public boolean isMultiHop()If the property starts with a '/' it is a multi-hop specification. A multi-hop specification must be from child->parent->child and must not have more than two hops. -
generateTitle
Generates a title using target item type and subtype as prefix. -
generateExportTitle
Generates an export title using target item type and subtype as prefix. -
generateSubtitle
-
generateTooltip
Generates a tooltip using target item type and subtype as prefix. -
withPrefix
Return prefix+string if string is not null or the empty string otherwise. -
getItemSubtype
-
getFilterAnnotationType
-
getFilterItemList
-
getRawDataType
-
createTargetTypeRestriction
-
createTargetTypeQuery
-