Package net.datacrow.core.objects

Examples of net.datacrow.core.objects.DcField


     * Initializes the default fields.
     */
    @Override
    protected void initializeFields() {
        super.initializeFields();
        addField(new DcField(Tab._C_ORDER, getIndex(), "Order",
                false, true, false, false,
                4, ComponentFactory._NUMBERFIELD, getIndex(), DcRepository.ValueTypes._LONG,
                "SortOrder"));
       
        addField(new DcField(Tab._D_MODULE, getIndex(), "Module",
                false, true, false, false,
                4, ComponentFactory._NUMBERFIELD, getIndex(), DcRepository.ValueTypes._LONG,
                "Module"));       
       
        getField(DcObject._ID).setEnabled(false);
View Full Code Here


     */
    @Override
    protected void initializeFields() {
      super.initializeFields();

      addField(new DcField(DcMediaObject._A_TITLE, getIndex(), "Title",
                false, true, false, true,
                255, ComponentFactory._SHORTTEXTFIELD, getIndex(), DcRepository.ValueTypes._STRING,
                "Title"));
        addField(new DcField(DcMediaObject._B_DESCRIPTION, getIndex(), "Description",
                false, true, false, true, 
                8000, ComponentFactory._LONGTEXTFIELD, getIndex(), DcRepository.ValueTypes._STRING,
                "Description"));
        addField(new DcField(DcMediaObject._C_YEAR, getIndex(), "Year",
                false, true, false, true, 
                4, ComponentFactory._NUMBERFIELD, getIndex(), DcRepository.ValueTypes._LONG,
                "Year"));

        if (getIndex() != DcModules._IMAGE && !isAbstract())
            addField(new DcField(DcMediaObject._D_LANGUAGE, getIndex(), "Languages",
                    true, true, false, true, 
                    255, ComponentFactory._REFERENCESFIELD, DcModules._LANGUAGE, DcRepository.ValueTypes._DCOBJECTCOLLECTION,
                    "Languages"));
       
        addField(new DcField(DcMediaObject._E_RATING, getIndex(), "Rating",
                false, true, false, true, 
                255, ComponentFactory._RATINGCOMBOBOX, getIndex(), DcRepository.ValueTypes._LONG,
                "Rating"));
        addField(new DcField(DcMediaObject._F_COUNTRY, getIndex(), "Countries",
                true, true, false, true, 
                255, ComponentFactory._REFERENCESFIELD, DcModules._COUNTRY, DcRepository.ValueTypes._DCOBJECTCOLLECTION,
                "Countries"));          
   
View Full Code Here

        private void checkDependencies() {
            table.cancelEdit();
            int row = table.getSelectedRow();
            if (row > -1) {
                DcFieldDefinition definition = getDefinition(row);
                DcField field = (DcField) table.getValueAt(row, _COL_FIELD, true);
               
                if (field.isUiOnly() || field.getIndex() == DcObject._ID) {
                    table.setValueAt(Boolean.FALSE, row, _COL_REQUIRED);
                    table.setValueAt(Boolean.FALSE, row, _COL_UNIQUE);
                   
                    if (field.getValueType() == DcRepository.ValueTypes._PICTURE)
                        table.setValueAt(Boolean.FALSE, row, _COL_DESCRIPTIVE);
                }
                if (DcModules.get(field.getModule()).getType() == DcModule._TYPE_ASSOCIATE_MODULE) {
                    if (field.getIndex() == DcAssociate._A_NAME)
                        table.setValueAt(Boolean.TRUE, row, _COL_DESCRIPTIVE);
                    else
                        table.setValueAt(Boolean.FALSE, row, _COL_DESCRIPTIVE);
                }
               
View Full Code Here

            if (module.hasInsertView())
                module.getInsertView().applySettings();

            for (DcFieldDefinition def : definitions.getDefinitions()) {
                DcField field = module.getField(def.getIndex());
                field.setRequired(def.isRequired());
                field.setEnabled(def.isEnabled());
            }
        }
View Full Code Here

            boolean required = ((Boolean) table.getValueAt(row, _COL_REQUIRED, true)).booleanValue();
            boolean descriptive = ((Boolean) table.getValueAt(row, _COL_DESCRIPTIVE, true)).booleanValue();
            boolean unique = ((Boolean) table.getValueAt(row,_COL_UNIQUE, true)).booleanValue();
            String tab = ((String) table.getValueAt(row, _COL_TAB, true));
           
            DcField field = (DcField) table.getValueAt(row, _COL_FIELD, true);

            if (field.isReadOnly() || field.isUiOnly())
                required = false;

            return new DcFieldDefinition(field.getIndex(), name, enabled, required, descriptive, unique, tab);
        }
View Full Code Here

     * Creates the default fields.
     */
    @Override
    protected void initializeFields() {
        super.initializeFields();
        addField(new DcField(Permission._A_PLUGIN, getIndex(), "Plugin",
                false, true, false, false,
                255, ComponentFactory._SHORTTEXTFIELD, getIndex(), DcRepository.ValueTypes._STRING,
                "Plugin"));
        addField(new DcField(Permission._B_FIELD, getIndex(), "Field",
                false, true, false, false,
                4000, ComponentFactory._NUMBERFIELD, getIndex(), DcRepository.ValueTypes._LONG,
                "Field"));
        addField(new DcField(Permission._C_MODULE, getIndex(), "Module",
                false, true, false, false,
                10, ComponentFactory._NUMBERFIELD, getIndex(), DcRepository.ValueTypes._LONG,
                "Module"));
        addField(new DcField(Permission._D_VIEW, getIndex(), "View",
                false, true, false, false,
                1, ComponentFactory._CHECKBOX, getIndex(), DcRepository.ValueTypes._BOOLEAN,
                "View"));
        addField(new DcField(Permission._E_EDIT, getIndex(), "Edit",
                false, true, false, false,
                1, ComponentFactory._CHECKBOX, getIndex(), DcRepository.ValueTypes._BOOLEAN,
                "Edit"));
        addField(new DcField(Permission._F_USER, DcModules._USER, "User",
                false, true, false, false,
                36, ComponentFactory._SHORTTEXTFIELD, getIndex(), DcRepository.ValueTypes._DCPARENTREFERENCE,
                "User"));
    }
View Full Code Here

     * Initializes the default fields.
     */
    @Override
    protected void initializeFields() {
        super.initializeFields();
        addField(new DcField(User._A_LOGINNAME, getIndex(), "Login Name",
                false, true, false, true,
                255, ComponentFactory._LOGINNAMEFIELD, getIndex(), DcRepository.ValueTypes._STRING,
                "LoginName"));
        addField(new DcField(User._B_ENABLED, getIndex(), "Enabled",
                false, true, false, true,
                4, ComponentFactory._CHECKBOX, getIndex(), DcRepository.ValueTypes._BOOLEAN,
                "Enabled"));
        addField(new DcField(User._C_NAME, getIndex(), "Name",
                false, true, false, true,
                255, ComponentFactory._SHORTTEXTFIELD, getIndex(), DcRepository.ValueTypes._STRING,
                "Name"));
        addField(new DcField(User._D_DESCRIPTION, getIndex(), "Description",
                false, true, false, true,
                4000, ComponentFactory._LONGTEXTFIELD, getIndex(), DcRepository.ValueTypes._STRING,
                "Description"));
        addField(new DcField(User._E_PHOTO, getIndex(), "Photo",
                true, true, false, false,
                255, ComponentFactory._PICTUREFIELD, getIndex(), DcRepository.ValueTypes._PICTURE,
                "Photo"));       
        addField(new DcField(User._F_EMAIL, getIndex(), "Email",
                false, true, false, true,
                255, ComponentFactory._SHORTTEXTFIELD, getIndex(), DcRepository.ValueTypes._STRING,
                "Email"));       
        addField(new DcField(User._G_ADDRESS, getIndex(), "Address",
                false, true, false, true,
                255, ComponentFactory._SHORTTEXTFIELD, getIndex(), DcRepository.ValueTypes._STRING,
                "Address"));    
        addField(new DcField(User._H_PHONE_HOME, getIndex(), "Phone (Home)",
                false, true, false, false,
                255, ComponentFactory._SHORTTEXTFIELD, getIndex(), DcRepository.ValueTypes._STRING,
                "PhoneHome"));    
        addField(new DcField(User._I_PHONE_WORK, getIndex(), "Phone (Work)",
                false, true, false, false,
                255, ComponentFactory._SHORTTEXTFIELD, getIndex(), DcRepository.ValueTypes._STRING,
                "PhoneWork"));       
        addField(new DcField(User._J_CITY, getIndex(), "City",
                false, true, false, true,
                255, ComponentFactory._SHORTTEXTFIELD, getIndex(), DcRepository.ValueTypes._STRING,
                "City"));
        addField(new DcField(User._K_COUNTRY, getIndex(), "Country",
                false, true, false, true,
                255, ComponentFactory._SHORTTEXTFIELD, getIndex(), DcRepository.ValueTypes._STRING,
                "Country"));
        addField(new DcField(User._L_ADMIN, getIndex(), "Admin",
                false, true, false, true,
                4, ComponentFactory._CHECKBOX, getIndex(), DcRepository.ValueTypes._BOOLEAN,
                "Admin"));
    }
View Full Code Here

    public Object apply() throws WizardException {
        ItemImporter importer = wizard.getDefinition().getImporter();
       
        for (int i = 0; i < table.getRowCount(); i++) {
          String source = (String) table.getValueAt(i, 1, true);
          DcField target = (DcField) table.getValueAt(i, 2, true);
          if (target != null)
            importer.addMapping(source,  target);
        }
        return wizard.getDefinition();
    }
View Full Code Here

          System.out.println();
        }
         
       
        for (DcField field : parent.getFields()) {
            addField(new DcField(field.getIndex(), getIndex(), field.getLabel(), field.isUiOnly(),
                                 field.isEnabled(), field.isReadOnly(), field.isSearchable(),
                                 field.getMaximumLength(), field.getFieldType(), field.getSourceModuleIdx(), field.getValueType(),
                                 field.getDatabaseFieldName()));
        }
    }
View Full Code Here

     * Initializes the standard fields.
     */
    @Override
    protected void initializeFields() {
        super.initializeFields();
        addField(new DcField(DcTemplate._SYS_TEMPLATENAME, getIndex(), "Template Name",
                             false, true, false, true,
                             255, ComponentFactory._SHORTTEXTFIELD, getIndex(), DcRepository.ValueTypes._STRING,
                             "TemplateName"));
        addField(new DcField(DcTemplate._SYS_DEFAULT, getIndex(), "Default",
                             false, true, false, true,
                             255, ComponentFactory._CHECKBOX, getIndex(), DcRepository.ValueTypes._BOOLEAN,
                             "DefaultTemplate"));       
    }
View Full Code Here

TOP

Related Classes of net.datacrow.core.objects.DcField

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.