Package net.datacrow.console.wizards

Examples of net.datacrow.console.wizards.WizardException


                     module.getTableName() != null &&
                      !module.getTableName().equals("") ?
                                 module.getTableName() : toTablename(objectName);
                                
        if (Utilities.isKeyword(nameNormalized))
            throw new WizardException(DcResources.getText("msgObjectNameNotAllowed"));
                               
        if (getWizard() instanceof CreateModuleWizard && DcModules.get(nameNormalized) != null)
          throw new WizardException(DcResources.getText("msgModuleNameNotUnique"));

        textName.setText(nameNormalized);
        module.setName(nameNormalized);
        module.setDescription(textDesc.getText());
        module.setEnabled(true);
        module.setObjectName(objectName);
        module.setObjectNamePlural(textObjectNamePlural.getText());
        module.setTableName(nameNormalized);
        module.setTableNameShort(nameNormalized);
        module.setLabel(name);
        module.setCanBeLend(checkCanBeLended.isSelected());
        module.setContainerManaged(checkContainerManaged.isSelected());
        module.setFileBacked(checkFileBacked.isSelected());
        module.setHasInsertView(true);
        module.setHasSearchView(true);

        ImageIcon icon16 = pic16.getIcon();
        ImageIcon icon32 = pic32.getIcon();

        try {
            if (pic16.isChanged() || getWizard() instanceof CreateModuleWizard) {
                module.setIcon16(Utilities.getBytes(icon16.getImage(), DcImageIcon._TYPE_PNG));
                module.setIcon16Filename(saveIcon(new DcImageIcon(module.getIcon16()), "_small"));
            }
           
            if (pic32.isChanged() || getWizard() instanceof CreateModuleWizard) {
                module.setIcon32(Utilities.getBytes(icon32.getImage(), DcImageIcon._TYPE_PNG));
                module.setIcon32Filename(saveIcon(new DcImageIcon(module.getIcon32()), ""));               
            }
        } catch (Exception e) {
          logger.error("Error while reading the icons", e);
          throw new WizardException("Could not store / use the selected icons");
        }

        return module;
    }
View Full Code Here


        return module;
    }
   
    private void checkValue(Object o, String desc) throws WizardException {
        if (o == null || o.toString().trim().length() == 0)
            throw new WizardException(DcResources.getText("msgXNotEntered", desc));
    }
View Full Code Here

    @Override
    public Object apply() throws WizardException {
        DcObject result = internetSearchForm.getSelectedObject();
       
        if (result == null)
            throw new WizardException(DcResources.getText("msgWizardSelectItem"));

        internetSearchForm.stop();
        return result;
    }
View Full Code Here

        dco.addRequest(new CloseWindowRequest(this));
       
        try {
            dco.saveNew(true);
        } catch (ValidationException ve) {
            throw new WizardException(ve.getMessage());
        }
    }
View Full Code Here

           
            if (!existingField) {
                String column = StringUtils.normalize(name).replaceAll(" ", "").replaceAll("[\\-]", "");

                if (Utilities.isKeyword(column))
                    throw new WizardException(DcResources.getText("msgFieldNameNotAllowed"));
               
                if (!existingField) {
                    for (String excludedName : excludedNames) {
                        if (excludedName != null &&
                            excludedName.toLowerCase().equals(column.toLowerCase()))
                            throw new WizardException(DcResources.getText("msgFieldWithSameNameExists"));
                    }
                }
               
                field.setColumn(column);
            }
View Full Code Here

        }
    }
   
    private void checkValue(Object o, String desc) throws WizardException {
        if (Utilities.isEmpty(o))
            throw new WizardException(DcResources.getText("msgXNotEntered", desc));
    }
View Full Code Here

TOP

Related Classes of net.datacrow.console.wizards.WizardException

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.