net.datacrow.core.modules
Class DcChildModule

java.lang.Object
  extended by net.datacrow.core.modules.DcModule
      extended by net.datacrow.core.modules.DcChildModule
All Implemented Interfaces:
java.lang.Comparable<DcModule>, IChildModule
Direct Known Subclasses:
ItemModule, PermissionModule

public class DcChildModule
extends DcModule
implements IChildModule

Items belonging to a child module are dependent on the existence of a parent item. Parent items always belong to another module, represented by the DcParentModule class.

Author:
Robert Jan van der Waals

Field Summary
 
Fields inherited from class net.datacrow.core.modules.DcModule
_TYPE_ASSOCIATE_MODULE, _TYPE_EXTERNALREFERENCE_MODULE, _TYPE_MAPPING_MODULE, _TYPE_MEDIA_MODULE, _TYPE_MODULE, _TYPE_PROPERTY_MODULE, _TYPE_TEMPLATE_MODULE, insertView, searchView
 
Constructor Summary
DcChildModule(int index, boolean topModule, java.lang.String name, java.lang.String description, java.lang.String objectName, java.lang.String objectNamePlural, java.lang.String tableName, java.lang.String tableShortName)
          Creates a new instance.
DcChildModule(XmlModule xmlModule)
          Creates a new instances of this module based on a XML definition.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 DcMinimalisticItemView getItemView(DcObject parent, int module, boolean readonly)
          Creates a new item view.
 int[] getMinimalFields(java.util.Collection<java.lang.Integer> include)
           
 int[] getSupportedViews()
           
protected  void initializeUI()
          Initializes the various views.
 boolean isChildModule()
          Indicates if this module is a child module.
 boolean isTopModule()
          Indicates if this module is a top module.
 
Methods inherited from class net.datacrow.core.modules.DcModule
addField, addValueEnhancer, applySettings, canBeLend, compareTo, createItem, delete, deliversOnlineService, getChartPanel, getChild, getCurrentInsertView, getCurrentSearchView, getDefaultData, getDefaultSortFieldIdx, getDescription, getDisplayFieldIdx, getDisplayIndex, getField, getField, getFieldCount, getFieldDefinitions, getFieldIndices, getFields, getFileField, getFileRenamerDialog, getFilterForm, getIcon16, getIcon16Filename, getIcon32, getIcon32Filename, getIconField, getImporter, getImporterClass, getIndex, getInsertView, getItem, getItemForm, getItemPluralResourceKey, getItemResourceKey, getKeyStroke, getLabel, getMenuBar, getModuleResourceKey, getName, getNameFieldIdx, getObjectName, getObjectNamePlural, getOnlineServices, getParent, getParentReferenceFieldIndex, getPersistentField, getPropertyModule, getQuickView, getQuickViewFieldDefinitions, getSearchView, getSetting, getSettings, getSynchronizer, getSystemDisplayFieldIdx, getSystemField, getSystemObjectName, getSystemObjectNamePlural, getTableName, getTableShortName, getTemplateModule, getType, getViews, getWebFieldDefinitions, getXmlModule, hasActualReferenceTo, hasDependingModules, hashCode, hasInsertView, hasReferenceTo, hasReports, hasSearchView, initializeFields, initializeMultiReferenceFields, initializeSettings, initializeSystemFields, isAbstract, isContainerManaged, isCustomFieldsAllowed, isCustomModule, isDefaultDataLoaded, isEditingAllowed, isEnabled, isEnabled, isFileBacked, isHasImages, isHasReferences, isNew, isParentModule, isSearchViewInitialized, isSelectableInUI, isServingMultipleModules, isValid, release, removeEnhancers, setChild, setDefaultDataLoaded, setIcon16, setIcon32, setNew, setServingMultipleModules, setSetting, setValid, setXmlModule, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.datacrow.core.modules.IChildModule
getIndex
 

Constructor Detail

DcChildModule

public DcChildModule(XmlModule xmlModule)
Creates a new instances of this module based on a XML definition.

Parameters:
xmlModule -

DcChildModule

public DcChildModule(int index,
                     boolean topModule,
                     java.lang.String name,
                     java.lang.String description,
                     java.lang.String objectName,
                     java.lang.String objectNamePlural,
                     java.lang.String tableName,
                     java.lang.String tableShortName)
Creates a new instance.

Parameters:
index - The module index.
topModule - Indicates if the module is a top module. Top modules are allowed to be displayed in the module bar and can be enabled or disabled.
name - The internal unique name of the module.
description - The module description
objectName - The name of the items belonging to this module.
objectNamePlural - The plural name of the items belonging to this module.
tableName - The database table name for this module.
tableShortName - The database table short name for this module.
Method Detail

getItemView

public DcMinimalisticItemView getItemView(DcObject parent,
                                          int module,
                                          boolean readonly)
Creates a new item view.

Specified by:
getItemView in interface IChildModule
Parameters:
parent - The parent item.
readonly - Indicates if editing is allowed.

getSupportedViews

public int[] getSupportedViews()
Overrides:
getSupportedViews in class DcModule

getMinimalFields

public int[] getMinimalFields(java.util.Collection<java.lang.Integer> include)
Overrides:
getMinimalFields in class DcModule

initializeUI

protected void initializeUI()
Initializes the various views.

Overrides:
initializeUI in class DcModule

isChildModule

public boolean isChildModule()
Indicates if this module is a child module.

Overrides:
isChildModule in class DcModule

isTopModule

public boolean isTopModule()
Indicates if this module is a top module. Top modules are allowed to be displayed in the module bar and can be enabled or disabled.

Overrides:
isTopModule in class DcModule

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class DcModule