Package com.im.df.api.ddl
Interface DFItem
-
- All Superinterfaces:
PropertiesEditingConfigurable
- All Known Subinterfaces:
DFDataTree
,DFEntity
,DFExportTemplate
,DFField
,DFList
,DFQuery
,DFRelationship
,DFSchema
,DFScript
,DFScriptParent
,DFUserItem
,DFView
,DFVisibilityRestriction
public interface DFItem extends PropertiesEditingConfigurable
The root item and super-interface of all core DDL items in DIF. There are fixed number of these core items. All of them can be extended using capabilities.All
DFItem
s are DDL (data definition) objects. For data manipulation you need to obtain data providers fromDFSchema
.For brief overview of particular IJC items see Instant JChem Terminology or more detailed How the Instant JChem items fit together.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
DFItem.Handle<T extends DFItem>
Represents a handle-like identifier of the item.-
Nested classes/interfaces inherited from interface com.im.df.api.support.PropertiesEditingConfigurable
PropertiesEditingConfigurable.Extra
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PROP_CAPABILITIES
static java.lang.String
PROP_DESCRIPTION
static java.lang.String
PROP_ID
static java.lang.String
PROP_NAME
static java.lang.String
PROP_TYPE
static java.lang.String
PROP_VALID
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Registers PropertyChangeListener to receive events.java.util.List<DFCapability>
getCapabilities()
Get list of all capabilities of this DFItem.java.lang.String
getDescription()
Provides a description of the DFItem.DFItem.Handle<? extends DFItem>
getHandle()
Returns a handle to the Item.java.lang.String
getId()
Returns an ID for the item, something by which it can be identified.java.lang.String
getName()
Getter for property name.java.lang.String
getType()
Getter for property type.boolean
isValid()
Return the validity of this item.void
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes PropertyChangeListener from the list of listeners.void
setDescription(java.lang.String description, com.im.commons.progress.DFEnvironmentRW env)
Sets the description.void
setName(java.lang.String name, com.im.commons.progress.DFEnvironmentRW env)
Setter for property name.-
Methods inherited from interface com.im.df.api.support.PropertiesEditingConfigurable
isPropertyEditable
-
-
-
-
Field Detail
-
PROP_ID
static final java.lang.String PROP_ID
- See Also:
- Constant Field Values
-
PROP_NAME
static final java.lang.String PROP_NAME
- See Also:
- Constant Field Values
-
PROP_TYPE
static final java.lang.String PROP_TYPE
- See Also:
- Constant Field Values
-
PROP_VALID
static final java.lang.String PROP_VALID
- See Also:
- Constant Field Values
-
PROP_CAPABILITIES
static final java.lang.String PROP_CAPABILITIES
- See Also:
- Constant Field Values
-
PROP_DESCRIPTION
static final java.lang.String PROP_DESCRIPTION
- See Also:
- Constant Field Values
-
-
Method Detail
-
getId
java.lang.String getId()
Returns an ID for the item, something by which it can be identified. Potentially two different databases could contain information about the same entity. There should be always only one valid instance of the same ID. It is implementation's responsibility to generate ID big enough to be unique.Note that multiple items with the same ID may created, e.g. by replicating the Schema.
- Returns:
- The ID of this item
-
getName
java.lang.String getName()
Getter for property name. Name is the display name that is seen by the user. The name should be a single line String as most of UI present the name in single line visual components (tree items, lists, text fields...).- Returns:
- Value of property name.
-
setName
void setName(java.lang.String name, com.im.commons.progress.DFEnvironmentRW env)
Setter for property name.- Parameters:
name
- New value of property name.
-
getDescription
java.lang.String getDescription()
Provides a description of the DFItem. Initialynull
(not set), may be an arbitrary string, usually a description set by the DFSchema creator for better understanding of the DFSChema contents by DIF users.- Returns:
- The description, or
null
if none is set.
-
setDescription
void setDescription(java.lang.String description, com.im.commons.progress.DFEnvironmentRW env)
Sets the description. Passingnull
will clear the description. The DFItem must be locked, and the DFLock passed in the 'env'.- Parameters:
description
- The new description or nullenv
- The environment
-
getType
java.lang.String getType()
Getter for property type. This is code name (not human readable string), which represents the type of instance (usually main type implementation name with combination of capabilities). The value can change during lifetime of DFItem instance (e.g. when converting field to a different type). The well know values should be part of each implementations documentation.- Returns:
- Value of property name.
-
getCapabilities
java.util.List<DFCapability> getCapabilities()
Get list of all capabilities of this DFItem. CheckDIFUtilities
to get convenience methods, for example method which find an appropriate DFCapability of the given class. The list of capabilities can change during DFItem lifetime and so you should listen toPROP_CAPABILITIES
changes.
-
isValid
boolean isValid()
Return the validity of this item. The item becomes invalid when it's removed from it's parent or when it's parent become invalid. It's possible to listen to changes of this flag. It's impossible for invalid object to become valid again. When object become invalid, all changes are ignored (are not persistent) and DFItem's method calls can throw unpredictable exceptions.
-
addPropertyChangeListener
void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Registers PropertyChangeListener to receive events. This registration method can be used also for property change events fired from all DFItem's capabilities. It's recommended to use weak listeners when listening to DFItems property changes.- Parameters:
listener
- The listener to register.
-
removePropertyChangeListener
void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes PropertyChangeListener from the list of listeners.- Parameters:
listener
- The listener to remove.
-
getHandle
DFItem.Handle<? extends DFItem> getHandle()
Returns a handle to the Item. The handle uniquely identifies the Item, even though the schema data may be copied or otherwise replicated. Use the Handle instead of DFItem.getId() when registering an Item in collections that extend beyond the DFItem's parent Schema.- Returns:
- The handle to the DFItem.
-
-